Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update runtime table #126

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/computing/runtimes/custom.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Custom Runtimes
# Create Custom Runtimes

Custom runtimes can be created by customizing the filesystem of Linux distributions or
[entirely from scratch](https://linuxfromscratch.org/lfs/).
Expand Down Expand Up @@ -46,9 +46,9 @@ nix-shell -p debootstrap squashfsTools
## 2. Obtain the build scripts

Download the files `create_disk_image.sh`, `init0.sh` and `init1.py` from the
[official runtime](./index.md#official-runtime-with-debian-11-python-39-and-nodejs-14):
[official runtime](./index.md#official-runtime):

[https://github.com/aleph-im/aleph-vm/tree/main/runtimes/aleph-debian-11-python](https://github.com/aleph-im/aleph-vm/tree/main/runtimes/aleph-debian-11-python)
[https://github.com/aleph-im/aleph-vm/tree/main/runtimes/aleph-debian-12-python](https://github.com/aleph-im/aleph-vm/tree/main/runtimes/aleph-debian-12-python)

Customize these files to suit your needs.

Expand Down
98 changes: 66 additions & 32 deletions docs/computing/runtimes/index.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Introduction

A program runtime is an operating system and software stack that enables your program to run on the aleph.im network.
A **runtime** is an operating system and software stack that enables your program to run on the aleph.im network.

Runtimes are customized Linux root filesystems that integrate with the aleph.im infrastructure and provide access to
APIs, as well as quick responses to HTTP requests and other events.

The project provides official runtimes with all you need for most programs. Additionally, you can build and publish
custom runtimes, and use any available runtime on the network for your program.
The project provides official runtimes with all you need for most programs and in most case you will simply use those.

Additionally, you can build and publish custom runtimes, and use any available runtime on the network for your program.

- [Use existing runtimes](#existing-runtimes)
- [Create custom runtimes](./custom.md)

## Existing Runtimes
### Official runtimes

### Official runtime with Debian 11, Python 3.9 and NodeJS 14

Aleph.im provides users with a default runtime based on [Debian 11 "bullseye"](https://wiki.debian.org/DebianBullseye),
Aleph.im provides users with a default runtime based on [Debian 12 "bookworkm"](https://wiki.debian.org/DebianBookworm),
the current stable version of the Debian project which can
be [found on the Explorer](https://explorer.aleph.im/address/ETH/0x101d8D16372dBf5f1614adaE95Ee5CCE61998Fc9/message/STORE/bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4).
This runtime is built with software available in the distribution, including Python 3.9 and Nodejs 14.
be [found on the Explorer](https://explorer.aleph.im/address/ETH/0x101d8D16372dBf5f1614adaE95Ee5CCE61998Fc9/message/STORE/63f07193e6ee9d207b7d1fcf8286f9aee34e6f12f101d2ec77c1229f92964696).
This runtime is built with software available in the distribution, including Python 3.11 and Nodejs.

To optimize performance, this runtime uses a custom [Linux init](https://en.wikipedia.org/wiki/Init) process. This
process is specially designed to quickly launch the right endpoint in response to events such as HTTP requests. This is
especially useful when using [on-demand execution](../index.md#on-demand-execution).
There is also a [Debian 11 "bullseye"](https://wiki.debian.org/DebianBullseye) runtime, which is deprecated but kept for compatibilities reason.

These are maintained as part of the aleph-vm repository, the code is available in the [`/runtime` folder](https://github.com/aleph-im/aleph-vm/tree/main/runtimes)

[//]: # (Not available yet)

Expand All @@ -34,19 +34,21 @@ especially useful when using [on-demand execution](../index.md#on-demand-executi

[//]: # (system, and does not include interpreters or virtual machines for popular programming languages. This makes launching)

[//]: # (binaries fast and efficient.)
[//]: # (# (binaries fast and efficient.))

### Third-party runtimes

Use third-party runtimes available on the network by specifying their `item_hash` when creating your program.
Runtimes made available on the network by third party can also be used by specifying their `item_hash` when creating your program.

## Init process
User can also build and use their own runtime by uploading them to the aleph network, see [Create custom runtimes](./custom.md)

[On-demand Execution](../index.md#on-demand-execution) relies on a custom [Linux init](https://en.wikipedia.org/wiki/Init) process,
optimized to launch the right endpoint in response to events such as HTTP requests. This custom init consists in two
simple programs,
[init0.sh](https://raw.githubusercontent.com/aleph-im/aleph-vm/main/runtimes/aleph-alpine-3.13-python/init0.sh)
and [init1.py](https://raw.githubusercontent.com/aleph-im/aleph-vm/main/runtimes/aleph-alpine-3.13-python/init1.py).
## Init process

To optimize performance, runtime uses a custom [Linux init](https://en.wikipedia.org/wiki/Init) process. This
process is specially designed to quickly launch the right endpoint in response to events such as HTTP requests. This is
especially useful when using [on-demand execution](../index.md#on-demand-execution).

This custom init consists in two simple programs, [init0.sh](https://raw.githubusercontent.com/aleph-im/aleph-vm/main/runtimes/aleph-alpine-3.13-python/init0.sh) and [init1.py](https://raw.githubusercontent.com/aleph-im/aleph-vm/main/runtimes/aleph-alpine-3.13-python/init1.py).

Use these in your custom runtime by copying them to `/rootfs/sbin/init` and
`/mnt/rootfs/root/init1.py` respectively.
Expand All @@ -55,20 +57,52 @@ Use these in your custom runtime by copying them to `/rootfs/sbin/init` and
of the capabilities provided by the aleph.im ecosystem, using the default of your distribution
(ex: [systemd](https://systemd.io/), [OpenRC](https://github.com/OpenRC/openrc), ...) should work as well.

### List of official runtimes
## List of official runtimes



### Functions
Runtime used for functions

| name | hash | filesystem |
|--------------------------------------------------------------|---------------------------------------------------------------------|------------|
| Official runtime with Debian 11, Python 3.9 & Node.js 14 | bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4 | ext4 |
olethanh marked this conversation as resolved.
Show resolved Hide resolved
| **Official runtime with Debian 12, Python 3.11** | 63f07193e6ee9d207b7d1fcf8286f9aee34e6f12f101d2ec77c1229f92964696 | ext4 |
| Official Node.js LTS runtime (with nvm support) on Debian 11 | 3c238dd3ffba73ab9b2cccb90a11e40e78aff396152de922a6d794a0a65a305e | ext4 |
| Deprecated Debian runtime | f873715dc2feec3833074bd4b8745363a0e0093746b987b4c8191268883b2463 | ext4 |


[//]: # (Web and current SDK)
[//]: # (`63f07193e6ee9d207b7d1fcf8286f9aee34e6f12f101d2ec77c1229f92964696`)
[//]: # (Old doc)
[//]: # (`bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4`)
[//]: # (Old one in the SDK)
[//]: # (`f873715dc2feec3833074bd4b8745363a0e0093746b987b4c8191268883b2463`)

### Instances

#### Roofs for Firecracker
| name | hash | filesystem |
|----------------------|------------------------------------------------------------------|------------|
| Debian 11 “Bullseye” | 887957042bb0e360da3485ed33175882ce72a70d79f1ba599400ff4802b7cee7 | BTRFS |
| Debian 12 “Bookworm” | 6e30de68c6cedfa6b45240c2b51e52495ac6fb1bd4b36457b3d5ca307594d595 | BTRFS |
| Ubuntu 22.04 LTS | 77fef271aa6ff9825efa3186ca2e715d19e7108279b817201c69c34cedc74c27 | BTRFS |


#### QEMU Disk Image
QEMU "runtimes" are regular disk image. The image uploaded to the network are the one directly provided by their respective project, specifically the cloud variant with cloud-init enabled.

#### Instances
| name | hash | filesystem |
|----------------------|------------------------------------------------------------------|------------|
| Debian 11 “Bullseye” | f7e68c568906b4ebcd3cd3c4bfdff96c489cd2a9ef73ba2d7503f244dfd578de | disk img |
| Debian 12 “Bookworm” | b6ff5c3a8205d1ca4c7c3369300eeafff498b558f71b851aa2114afd0a532717 | disk img |
| Ubuntu 22.04 LTS | 4a0f62da42f4478544616519e6f5d58adb1096e069b392b151d47c3609492d0c | disk img |

| name | runtime | filesystem |
| --- | --- | --- |
| Debian 11 “Bullseye” | 887957042bb0e360da3485ed33175882ce72a70d79f1ba599400ff4802b7cee7 | BTRFS |
| Debian 12 “Bookworm” | 6e30de68c6cedfa6b45240c2b51e52495ac6fb1bd4b36457b3d5ca307594d595 | BTRFS |
| Ubuntu 22.04 LTS | 77fef271aa6ff9825efa3186ca2e715d19e7108279b817201c69c34cedc74c27 | BTRFS |
#### Confidential Computing Disk
No runtime or disk image are provided at the moment for confidential computing.

#### Functions
#### Firmware for Confidential computing
The runtime for the confidential image are custom-built OVMF file that are used to validate, decrypt and start confidential VM. Refer to the [confidential section](../../computing/confidential/index.md)

| name | runtime | filesystem |
|--------------------------------------------------------------|------------------------------------------------------------------|------------|
| Official runtime with Debian 11, Python 3.9 & Node.js 14 | bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4 | ext4 |
| Official runtime with Debian 12, Python 3.11 | 63f07193e6ee9d207b7d1fcf8286f9aee34e6f12f101d2ec77c1229f92964696 | ext4 |
| Official Node.js LTS runtime (with nvm support) on Debian 11 | 3c238dd3ffba73ab9b2cccb90a11e40e78aff396152de922a6d794a0a65a305e | ext4 |
* Confidential firmware item hash : `ba5bb13f3abca960b101a759be162b229e2b7e93ecad9d1307e54de887f177ff`
* Hash for verification for the confidentiality validation process `89b76b0e64fe9015084fbffdf8ac98185bafc688bfe7a0b398585c392d03c7ee`
Loading