Compare commits

..

1 Commits

Author SHA1 Message Date
d32f5bd293
added information about testnet 2025-01-27 17:04:30 +02:00

@ -41,19 +41,68 @@ DTRFS is based on ArchLinux, however the kernel and the initramfs support any di
## Distributions ## Distributions
Our system currently offers 3 distributions: ArchLinux, Ubuntu and Fedora. You are free to package your own OS template. It should work as long as the operating system works with a generic kernel. Please take the following things into consideration: Our system currently offers 3 distributions: ArchLinux, Ubuntu and Fedora. You are free to package your own OS template. It should work as long as the operating system works with a generic kernel. Please take the following things into consideration:
The VM does not need `/boot/`, meaning it does not need a kernel or a initramfs - The VM does not need `/boot/`, meaning it does not need a kernel or a initramfs
As a consequence, the VM also does not need kernel modules - As a consequence, the VM also does not need kernel modules
Make sure `sshd` will start and will listen on `0.0.0.0:22` after boot - Make sure `sshd` will start and will listen on `0.0.0.0:22` after boot
Here is a short tutorial on how to create your own ArchLinux OS Template: After creating the image, upload it to any webserver you want and add provide the URL to the CLI. Don't forget to also update the sha256sum of the image, as it gets verified during the installation process.
### ArchLinux example
Create an arch VM on DeTEE:
```
$ detee-cli vm deploy --distro arch
No hostname specified! Using random VM name: mythical-mop
Node price: 0.00002/unit/minute. Total Units for hardware requested: 61. Locking 0.0732 tokens (offering the VM for 1 hours).
Injecting disk encryption key into VM. This will take a minute. Do not interrupt.
VM CREATED! To ssh, run the following command:
ssh -p 49545 root@173.234.17.2
```
SSH into the VM using the command above (`ssh -p 49545 root@173.234.17.2` in our case) and execute the following commands to build your OS template:
```
pacman -Syu --noconfirm
pacman -S --noconfirm arch-install-scripts fsarchiver
pacstrap /mnt base openssh
ln -s /usr/lib/systemd/system/sshd.service /mnt/etc/systemd/system/multi-user.target.wants/sshd.service
rm -rf /mnt/var/cache/pacman/pkg
fsarchiver savedir /tmp/os_template.fsa /mnt
```
Download the OS arch template:
```
scp -P 49545 root@173.234.17.2:/tmp/os_template.fsa ./detee_arch_$(date -I).fsa
# and grab sha256sum:
sha256sum ./detee_arch_$(date -I).fsa
```
And upload it to your registry.
### Ubuntu example
Create an ubuntu VM on DeTEE:
```
detee-cli vm deploy --distro ubuntu
```
SSH into the VM by using the SSH command offered by the installer (for example `ssh -p 48331 root@173.234.17.2`) and run the following bash commands:
```
apt update
apt dist-upgrade -y
apt install software-properties-common -y
add-apt-repository universe -y
apt install fsarchiver debootstrap -y
debootstrap --include=openssh-server --arch=amd64 noble /mnt http://archive.ubuntu.com/ubuntu/
rm -rf /mnt/var/cache/apt/archives/
ln -s /usr/lib/systemd/system/sshd.service /mnt/etc/systemd/system/multi-user.target.wants/sshd.service
fsarchiver savedir /tmp/os_template.fsa /mnt
```
Logout of SSH and scp the file to your machine:
```
scp -P 48331 root@173.234.17.2:/tmp/os_template.fsa ./detee_ubuntu_$(date -I).fsa
```
- start any archlinux machine (the arch installer also works)
- install `arch-install-scripts`
- run `pacstrap /mnt base openssh` to install base packages to /mnt
- run `ln -s /usr/lib/systemd/system/sshd.service /mnt/etc/systemd/system/multi-user.target.wants/sshd.service`
- run `fsarchiver savedir /tmp/os_template.fsa /mnt` to save your OS template
- download `/tmp/os_template.fsa` to your machine
- upload the `os_template.fsa` anywhere so that it can be downloaded with wget
## Experimenting on your own ## Experimenting on your own