Skip to content

Commit

Permalink
Merge branch 'main' into add-wagmi-support-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
philogicae authored Oct 16, 2024
2 parents 6fd488c + 9b29946 commit da46c2a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 183 deletions.
2 changes: 2 additions & 0 deletions docs/computing/confidential/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This section explain how to allocate your VM on the Aleph Network and start it on a chosen CRN.

If you encounter any problem, check the [Confidential VM troubleshooting](./troubleshooting.md) guide

## Ensure you have uploaded your VM in the aleph network.
See previous section: [Encrypted Virtual Machine image](./encrypted-disk.md)

Expand Down
26 changes: 15 additions & 11 deletions docs/computing/confidential/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

## System

Creating a confidential virtual machine currently requires the creation of an encrypted disk on a machine you trust.
Creating a confidential virtual machine currently requires the creation of an encrypted disk on a machine you trust.
This machine must run Linux on x86_64 (64 bit CPU, most recent PCs but not Mac) and have IPv6 connectivity.

The documentation below assumes a Linux system based on [Debian](https://www.debian.org/) or [Ubuntu](https://ubuntu.com/), but the procedure can be adjusted to other distributions.
The documentation below assumes a Linux system based on [Debian](https://www.debian.org/) or [Ubuntu](https://ubuntu.com/), but the procedure can be adjusted to other distributions.

This requirement will be lifted in the future with confidential virtual machines that encrypt the filesystem themself.

## Software required

* The [aleph-client](https://github.com/aleph-im/aleph-client/) command-line tool
* The [sevctl](https://github.com/virtee/sevctl) tool from AMD
* A [OpenSSH](https://www.openssh.com/) keypair
* An [IPFS Server](https://github.com/ipfs/kubo)
* Optional: [Qemu](https://www.qemu.org/) to test your VM locally
- The [aleph-client](https://github.com/aleph-im/aleph-client/) command-line tool
- The [sevctl](https://github.com/virtee/sevctl) tool from AMD
- A [OpenSSH](https://www.openssh.com/) keypair
- An [IPFS Server](https://github.com/ipfs/kubo)
- Optional: [Qemu](https://www.qemu.org/) to test your VM locally

### aleph-client

Expand All @@ -25,22 +25,26 @@ following [the documentation here](../../tools/aleph-client/index.md).
### sevctl

Installing [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):

```shell
curl https://sh.rustup.rs -sSf | sh
```

or on Ubuntu 24.04:
Some packages may need to be installed on some systems (ex: Ubuntu) in order to build sevctl:

```
apt install cargo
```shell
apt install -y pkg-config libssl-dev asciidoctor
```

The [sevctl](https://github.com/virtee/sevctl) tool can then be installed using `cargo`:

```shell
cargo install sevctl
set --export PATH ~.cargo/bin:$PATH
```

> ℹ️ On Windows, we recommend using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) following the same previous steps.
### guestmount

This tool is used to create the encrypted disk.
Expand All @@ -62,4 +66,4 @@ make it available on [IPFS](https://ipfs.tech/).

---

Next: [Creating an encrypted filesystem](./encrypted-disk.md)
Next: [Creating an encrypted filesystem](./encrypted-disk.md)
43 changes: 43 additions & 0 deletions docs/computing/confidential/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Troubleshooting a confidential VM

What to do in case your confidential VM is not working

## Fetch the logs
If the VM is supposed to be started but cannot be reached, try fetching the logs of your VM, use the commands:

```shell
aleph instance logs <vm_id>
```

If you don't know the id of your VM use `aleph instance list`

You should see in the logs, the disk unlocking , the boot logs and the system invite.

The last lines should be something similar to this
```
cloud-init[502]: Cloud-init v. 24.1.3-0ubuntu1~22.04.5 finished at Thu, 05 Sep 2024 19:36:07 +0000. Datasource DataSourceNoCloud [seed=/dev/sr0][dsmode=net]. Up 23.63 seconds
[ OK ] Finished Execute cloud user/final scripts.
[ OK ] Reached target Cloud-init target.
Ubuntu 22.04.4 LTS dbnszzoulvoea7crseir75egj4xbm5zzzaaut2nbpknjadidp3ua ttyS0
```

## Attempt launching the VM locally

If the VM fail to start, try launching your VM disk image locally in QEMU, this will allow to check if the disk image has been
properly built.

```shell
sudo qemu-system-x86_64 \
-enable-kvm \
-m 2048 \
-nic user,model=virtio \
-nographic \
-serial mon:stdio \
-drive if=pflash,format=raw,unit=0,file=/usr/share/ovmf/OVMF.fd,readonly=on
-drive format=raw,file=</path/to/your/image.img> \
```

> Note: Once you have entered your password you might have to wait a minute or so for the disk to decrypt and boot.
To exit qemu: press `Ctrl + a`, then `x` and then `[Enter]`
2 changes: 1 addition & 1 deletion docs/nodes/compute/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resource nodes
## Requirements

### 1. Installation
Follow the [installation guide](./installation/debian-11.md) to install the server.
Follow the [installation guide](./installation/debian-12.md) to install the server.

### 2. Registration
Follow the [registration](https://medium.com/aleph-im/step-by-step-on-how-to-create-and-register-your-compute-resource-node-e5308130fbf7) guide first.
168 changes: 0 additions & 168 deletions docs/nodes/compute/installation/debian-11.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/nodes/compute/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ After setting up a CRN, users may encounter a `404: Invalid message reference` e

2. **Configure Hostname Correctly:**

- Ensure the hostname is properly configured as per the [CRN installation guide](./installation/debian-11.md#2-installation).
- Make sure the domain name in the supervisor.env file matches the domain used in your SSL configuration.
- Ensure the hostname is properly configured as per the [CRN installation guide](./installation/debian-12.md#2-installation).
- Make sure the domain name in the supervisor.env file matches the domain used in your SSL configuration.

3. **Restart Services:**

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ nav:
- 'Introduction': nodes/compute/index.md
- 'Installations':
- 'Configure Caddy': nodes/compute/installation/configure-caddy.md
- 'Debian 11': nodes/compute/installation/debian-11.md
- 'Debian 12': nodes/compute/installation/debian-12.md
- 'Ubuntu 20.04': nodes/compute/installation/ubuntu-20.04.md
- 'Ubuntu 22.04': nodes/compute/installation/ubuntu-22.04.md
Expand Down Expand Up @@ -124,6 +123,7 @@ nav:
- 'Requirements': computing/confidential/requirements.md
- 'Encrypted disk image': computing/confidential/encrypted-disk.md
- 'Instance': computing/confidential/instance.md
- 'Troubleshooting': computing/confidential/troubleshooting.md
- 'Tutorials':
- 'Testing microVMs': guides/testing_microvms.md
- 'Update a program': guides/update_a_program.md
Expand Down

0 comments on commit da46c2a

Please sign in to comment.