Skip to content

Commit 8318c43

Browse files
olethanhMHHukiewitz
authored andcommitted
Installation documentation was moved to aleph doc
Point to it in the documentation and removed duplicated information here
1 parent c7db4ef commit 8318c43

6 files changed

+6
-523
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ Writing programs in Python using ASGI compatible frameworks (
1717

1818
Install Aleph-VM to run an Aleph.im Compute Resource Node easily from official pre-built packages.
1919

20-
- [On Debian 11](./doc/INSTALL-Debian-11.md)
21-
- [On Debian 12](./doc/INSTALL-Debian-12.md)
22-
- [On Ubuntu 22.04](./doc/INSTALL-Ubuntu-22.04.md)
20+
See the official user doc https://docs.aleph.im/nodes/compute/
2321

2422
## 2. Install Aleph-VM from source
2523

doc/INSTALL-Debian-11.md

Lines changed: 1 addition & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1 @@
1-
# Installing Aleph-VM on a server / Debian 11 Bullseye
2-
3-
## 0. Introduction
4-
5-
For production using official Debian packages.
6-
7-
## 1. Requirements
8-
9-
- A [supported Linux server](../src/aleph/vm/orchestrator/README.md#1-supported-platforms)
10-
- A public domain name from a registrar and top level domain you trust.
11-
12-
In order to run an official Aleph.im Compute Resource Node (CRN), you will also need the following resources:
13-
14-
- CPU (2 options):
15-
- Min. 8 cores / 16 threads, 3.0 ghz+ CPU (gaming CPU for fast boot-up of microVMs)
16-
- Min. 12 core / 24 threads, 2.4ghz+ CPU (datacenter CPU for multiple concurrent loads)
17-
- RAM: 64GB
18-
- STORAGE: 1TB (NVMe SSD preferred, datacenter fast HDD possible under conditions, you’ll want a big and fast cache)
19-
- BANDWIDTH: Minimum of 500 MB/s
20-
21-
You will need a public domain name with access to add TXT and wildcard records.
22-
23-
> 💡 This documentation will use the invalid `vm.example.org` domain name. Replace it when needed.
24-
25-
## 2. Installation
26-
27-
Run the following commands as `root`:
28-
29-
First install the [VM-Connector](../vm_connector/README.md) using Docker:
30-
```shell
31-
apt update
32-
apt upgrade
33-
apt install -y docker.io apparmor-profiles
34-
docker run -d -p 127.0.0.1:4021:4021/tcp --restart=always --name vm-connector alephim/vm-connector:alpha
35-
```
36-
37-
Then install the [VM-Supervisor](../src/aleph/vm/orchestrator/README.md) using the official Debian package.
38-
The procedure is similar for updates.
39-
```shell
40-
wget -P /opt https://github.com/aleph-im/aleph-vm/releases/download/0.3.1/aleph-vm.debian-11.deb
41-
apt install /opt/aleph-vm.debian-11.deb
42-
```
43-
44-
Reboot if required (new kernel, ...).
45-
46-
### Configuration
47-
48-
Update the configuration in `/etc/aleph-vm/supervisor.env` using your favourite editor.
49-
50-
#### Hostname
51-
52-
You will want to insert your domain name in the form of:
53-
```
54-
ALEPH_VM_DOMAIN_NAME=vm.example.org
55-
```
56-
57-
#### Network configuration
58-
59-
On some systems, the default network interface is not `eth0` and you will want to configure the default interface
60-
by adding:
61-
```
62-
ALEPH_VM_NETWORK_INTERFACE=enp0s1
63-
```
64-
(don't forget to replace `enp0s1` with the name of your default network interface).
65-
66-
Debian 11 by default uses `/etc/resolv.conf` for DNS resolution. The VM Supervisor uses this by default.
67-
If your system uses [systemd-resolved](https://manpages.debian.org/bullseye/systemd/systemd-resolved.8.en.html)
68-
instead, uncomment and add the following setting:
69-
```
70-
#ALEPH_VM_DNS_RESOLUTION=resolvctl
71-
```
72-
73-
> 💡 You can instead specify the DNS resolvers used by the VMs using `ALEPH_VM_DNS_NAMESERVERS=["1.2.3.4", "5.6.7.8"]`.
74-
75-
#### Volumes and partitions
76-
77-
Two directories are used to store data from the network:
78-
- `/var/lib/aleph/vm` contains all the execution and persistent data.
79-
- `/var/cache/aleph/vm` contains data downloaded from the network.
80-
81-
These two directories must be stored on the same partition.
82-
That partition must meet the minimum requirements specified for a CRN.
83-
84-
> 💡 This is required due to the software using hard links to optimize performance and disk usage.
85-
86-
#### Applying changes
87-
88-
Finally, restart the service:
89-
```shell
90-
systemctl restart aleph-vm-supervisor
91-
```
92-
93-
## 3. Reverse Proxy
94-
95-
We document how to use Caddy as a reverse proxy since it manages and renews HTTPS certificates automatically.
96-
97-
Any other reverse-proxy (Nginx, HAProxy, Apache2, ...) should do the job as well, just make sure to renew the
98-
HTTPS/TLS certificates on time.
99-
100-
First, create a domain name that points to the server on IPv4 (A) and IPv6 (AAAA).
101-
102-
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](/CONFIGURE_CADDY.md).
103-
104-
Again, run these commands as `root`:
105-
```shell
106-
apt install -y debian-keyring debian-archive-keyring apt-transport-https
107-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
108-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
109-
apt update
110-
apt install caddy
111-
```
112-
113-
Then, after replacing the domain `vm.example.org` with your own, use configure Caddy:
114-
```shell
115-
cat >/etc/caddy/Caddyfile <<EOL
116-
{
117-
https_port 443
118-
on_demand_tls {
119-
interval 60s
120-
burst 5
121-
}
122-
}
123-
vm.example.org:443 {
124-
reverse_proxy http://127.0.0.1:4020 {
125-
# Forward Host header to the backend
126-
header_up Host {host}
127-
}
128-
}
129-
EOL
130-
```
131-
Finally, restart Caddy to use the new configuration:
132-
```shell
133-
systemctl restart caddy
134-
```
135-
136-
## 4. Test
137-
138-
Open https://[YOUR DOMAIN] in a web browser, wait for diagnostic to complete and look for
139-
140-
> ![image](https://user-images.githubusercontent.com/404665/150202090-91a02536-4e04-4af2-967f-fe105d116e1f.png)
141-
142-
If you face an issue, check the logs of the different services for errors:
143-
144-
VM-Supervisor:
145-
```shell
146-
journalctl -f -u aleph-vm-supervisor.service
147-
```
148-
149-
Caddy:
150-
```shell
151-
journalctl -f -u caddy.service
152-
```
153-
154-
VM-Connector:
155-
```shell
156-
docker logs -f vm-connector
157-
```
158-
159-
### Common errors
160-
161-
#### "Network interface eth0 does not exist"
162-
163-
Did you update the configuration file `/etc/aleph-vm/supervisor.env` with `ALEPH_VM_NETWORK_INTERFACE` equal to
164-
the default network interface of your server ?
165-
166-
#### "Aleph Connector unavailable"
167-
168-
Investigate the installation of the VM-Connector using Docker in step 2.
1+
[[https://docs.aleph.im/nodes/compute/installation/debian-11/]]

doc/INSTALL-Debian-12.md

Lines changed: 1 addition & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,169 +1 @@
1-
# Installing Aleph-VM on a server / Debian 12 Bookworm
2-
3-
## 0. Introduction
4-
5-
For production using official Debian packages.
6-
7-
## 1. Requirements
8-
9-
- A [supported Linux server](../src/aleph/vm/orchestrator/README.md#1-supported-platforms)
10-
- A public domain name from a registrar and top level domain you trust.
11-
12-
In order to run an official Aleph.im Compute Resource Node (CRN), you will also need the following resources:
13-
14-
- CPU (2 options):
15-
- Min. 8 cores / 16 threads, 3.0 ghz+ CPU (gaming CPU for fast boot-up of microVMs)
16-
- Min. 12 core / 24 threads, 2.4ghz+ CPU (datacenter CPU for multiple concurrent loads)
17-
- RAM: 64GB
18-
- STORAGE: 1TB (NVMe SSD preferred, datacenter fast HDD possible under conditions, you’ll want a big and fast cache)
19-
- BANDWIDTH: Minimum of 500 MB/s
20-
21-
You will need a public domain name with access to add TXT and wildcard records.
22-
23-
> 💡 This documentation will use the invalid `vm.example.org` domain name. Replace it when needed.
24-
25-
## 2. Installation
26-
27-
Run the following commands as `root`:
28-
29-
First install the [VM-Connector](../vm_connector/README.md) using Docker:
30-
```shell
31-
apt update
32-
apt upgrade
33-
apt install -y docker.io apparmor-profiles
34-
docker run -d -p 127.0.0.1:4021:4021/tcp --restart=always --name vm-connector alephim/vm-connector:alpha
35-
```
36-
37-
Then install the [VM-Supervisor](../src/aleph/vm/orchestrator/README.md) using the official Debian package.
38-
The procedure is similar for updates.
39-
```shell
40-
wget -P /opt https://github.com/aleph-im/aleph-vm/releases/download/0.3.1/aleph-vm.debian-12.deb
41-
apt install /opt/aleph-vm.debian-12.deb
42-
```
43-
44-
Reboot if required (new kernel, ...).
45-
46-
### Configuration
47-
48-
Update the configuration in `/etc/aleph-vm/supervisor.env` using your favourite editor.
49-
50-
#### Hostname
51-
52-
You will want to insert your domain name in the form of:
53-
```
54-
ALEPH_VM_DOMAIN_NAME=vm.example.org
55-
```
56-
57-
#### Network configuration
58-
59-
The network configuration is detected automatically.
60-
61-
The default network interface is detected automatically from the IP routes.
62-
You can configure the default interface manually instead by adding:
63-
```
64-
ALEPH_VM_NETWORK_INTERFACE=enp0s1
65-
```
66-
(don't forget to replace `enp0s1` with the name of your default network interface).
67-
68-
You can configure the DNS resolver manually by using one of the following options:
69-
```
70-
ALEPH_VM_DNS_RESOLUTION=resolvectl
71-
ALEPH_VM_DNS_RESOLUTION=resolv.conf
72-
```
73-
74-
> 💡 You can instead specify the DNS resolvers used by the VMs using `ALEPH_VM_DNS_NAMESERVERS=["1.2.3.4", "5.6.7.8"]`.
75-
76-
#### Volumes and partitions
77-
78-
Two directories are used to store data from the network:
79-
- `/var/lib/aleph/vm` contains all the execution and persistent data.
80-
- `/var/cache/aleph/vm` contains data downloaded from the network.
81-
82-
These two directories must be stored on the same partition.
83-
That partition must meet the minimum requirements specified for a CRN.
84-
85-
> 💡 This is required due to the software using hard links to optimize performance and disk usage.
86-
87-
#### Applying changes
88-
89-
Finally, restart the service:
90-
```shell
91-
systemctl restart aleph-vm-supervisor
92-
```
93-
94-
## 3. Reverse Proxy
95-
96-
We document how to use Caddy as a reverse proxy since it manages and renews HTTPS certificates automatically.
97-
98-
Any other reverse-proxy (Nginx, HAProxy, Apache2, ...) should do the job as well, just make sure to renew the
99-
HTTPS/TLS certificates on time.
100-
101-
First, create a domain name that points to the server on IPv4 (A) and IPv6 (AAAA).
102-
103-
This is a simple configuration. For more options, check [CONFIGURE_CADDY.md](/CONFIGURE_CADDY.md).
104-
105-
Again, run these commands as `root`:
106-
```shell
107-
apt install -y debian-keyring debian-archive-keyring apt-transport-https
108-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
109-
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
110-
apt update
111-
apt install caddy
112-
```
113-
114-
Then, after replacing the domain `vm.example.org` with your own, use configure Caddy:
115-
```shell
116-
cat >/etc/caddy/Caddyfile <<EOL
117-
{
118-
https_port 443
119-
on_demand_tls {
120-
interval 60s
121-
burst 5
122-
}
123-
}
124-
vm.example.org:443 {
125-
reverse_proxy http://127.0.0.1:4020 {
126-
# Forward Host header to the backend
127-
header_up Host {host}
128-
}
129-
}
130-
EOL
131-
```
132-
Finally, restart Caddy to use the new configuration:
133-
```shell
134-
systemctl restart caddy
135-
```
136-
137-
## 4. Test
138-
139-
Open https://[YOUR DOMAIN] in a web browser, wait for diagnostic to complete and look for
140-
141-
> ![image](https://user-images.githubusercontent.com/404665/150202090-91a02536-4e04-4af2-967f-fe105d116e1f.png)
142-
143-
If you face an issue, check the logs of the different services for errors:
144-
145-
VM-Supervisor:
146-
```shell
147-
journalctl -f -u aleph-vm-supervisor.service
148-
```
149-
150-
Caddy:
151-
```shell
152-
journalctl -f -u caddy.service
153-
```
154-
155-
VM-Connector:
156-
```shell
157-
docker logs -f vm-connector
158-
```
159-
160-
### Common errors
161-
162-
#### "Network interface eth0 does not exist"
163-
164-
Did you update the configuration file `/etc/aleph-vm/supervisor.env` with `ALEPH_VM_NETWORK_INTERFACE` equal to
165-
the default network interface of your server ?
166-
167-
#### "Aleph Connector unavailable"
168-
169-
Investigate the installation of the VM-Connector using Docker in step 2.
1+
[[https://docs.aleph.im/nodes/compute/installation/debian-12/]]

doc/INSTALL-Ubuntu-20.04.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
# Installing Aleph-VM on a server / Ubuntu 20.04 Focal Fossa (Deprecated)
2-
3-
Support for Ubuntu 20.04 was due to compatibility issues with
4-
the NFTables firewall introduced in version
5-
[0.2.6](https://github.com/aleph-im/aleph-vm/releases/tag/0.2.6).
6-
7-
We recommend upgrading to the newest Ubuntu LTS version
8-
and then use the
9-
[following instructions on Ubuntu 22.04](./INSTALL-Ubuntu-22.04.md)
10-
).
1+
Moved to [[https://docs.aleph.im/nodes/compute/installation/ubuntu-20.04/]]

0 commit comments

Comments
 (0)