Skip to content

Commit

Permalink
Use Debian 12 by default in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Sep 26, 2023
1 parent f73068d commit e8ff4e3
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 19 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/build-deb-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ jobs:
name: aleph-vm.debian-11.deb
path: packaging/target/aleph-vm.debian-11.deb

build_deb_debian_12:
name: "Build Debian Package"
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Fetch the whole history for all tags and branches (required for aleph.__version__)
fetch-depth: 0

- run: |
cd packaging && make all-podman-debian-12 && cd ..
ls packaging/target
- uses: actions/upload-artifact@v3
with:
name: aleph-vm.debian-12.deb
path: packaging/target/aleph-vm.debian-12.deb

build_deb_ubuntu_22_04:
name: "Build Ubuntu Package"
runs-on: ubuntu-latest
Expand All @@ -43,7 +63,7 @@ jobs:
name: aleph-vm.ubuntu-22.04.deb
path: packaging/target/aleph-vm.ubuntu-22.04.deb

build_rootfs:
build_rootfs_debian_11:
name: "Build runtime aleph-debian-11-python"
runs-on: ubuntu-latest

Expand All @@ -64,6 +84,26 @@ jobs:
name: aleph-debian-11-python.squashfs
path: runtimes/aleph-debian-11-python/rootfs.squashfs

build_rootfs_debian_12:
name: "Build runtime aleph-debian-12-python"
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Workaround github issue https://github.com/actions/runner-images/issues/7192
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc

- run: |
sudo apt update
sudo apt install -y debootstrap
cd runtimes/aleph-debian-12-python && sudo ./create_disk_image.sh && cd ../..
- uses: actions/upload-artifact@v3
with:
name: aleph-debian-12-python.squashfs
path: runtimes/aleph-debian-12-python/rootfs.squashfs

build_example_venv_volume:
name: "Build example squashfs volume using Docker"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
sudo chown $(whoami) /opt/packages
- run: |
pip3 install aleph-client
pip3 install aleph-sdk-python
- run: |
ls -la
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test-new-runtime-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:
push

jobs:
run_debian_11:
name: "Test new runtime on Droplet with Debian 11"
run_debian_12:
name: "Test new runtime on Droplet with Debian 12"
runs-on: ubuntu-latest
concurrency: droplet-aleph-vm-runtime

Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Create the Droplet
run: |
doctl compute droplet create \
--image debian-11-x64 \
--image debian-12-x64 \
--size c-2 \
--region fra1 \
--vpc-uuid 992896c8-c089-4da3-9288-f81e28c095a4 \
Expand All @@ -47,16 +47,16 @@ jobs:
run: |
sudo apt update
sudo apt install -y debootstrap
cd runtimes/aleph-debian-11-python && sudo ./create_disk_image.sh && cd ../..
cd runtimes/aleph-debian-12-python && sudo ./create_disk_image.sh && cd ../..
- uses: actions/upload-artifact@v3
with:
name: aleph-debian-11-python.squashfs
path: runtimes/aleph-debian-11-python/rootfs.squashfs
name: aleph-debian-12-python.squashfs
path: runtimes/aleph-debian-12-python/rootfs.squashfs

- name: Build Debian Package
run: |
cd packaging && make all-podman-debian-11 && cd ..
cd packaging && make all-podman-debian-12 && cd ..
ls packaging/target
- name: Wait for the system to setup and boot
Expand All @@ -68,7 +68,7 @@ jobs:
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-runtime --output json | ./.github/scripts/extract_droplet_ipv4.py)"
ssh-keyscan -H ${DROPLET_IPV4} > ~/.ssh/known_hosts
scp runtimes/aleph-debian-11-python/rootfs.squashfs root@${DROPLET_IPV4}:/opt
scp runtimes/aleph-debian-12-python/rootfs.squashfs root@${DROPLET_IPV4}:/opt
- name: Install Aleph-VM on the Droplet
run: |
Expand All @@ -80,9 +80,9 @@ jobs:
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt-get -o DPkg::Lock::Timeout=60 install -y docker.io apparmor-profiles"
ssh root@${DROPLET_IPV4} "docker run -d -p 127.0.0.1:4021:4021/tcp --restart=always --name vm-connector alephim/vm-connector:alpha"
scp packaging/target/aleph-vm.debian-11.deb root@${DROPLET_IPV4}:/opt
scp packaging/target/aleph-vm.debian-12.deb root@${DROPLET_IPV4}:/opt
scp -pr ./examples root@${DROPLET_IPV4}:/opt/
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt -o DPkg::Lock::Timeout=60 install -y /opt/aleph-vm.debian-11.deb"
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt -o DPkg::Lock::Timeout=60 install -y /opt/aleph-vm.debian-12.deb"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_SUPERVISOR_HOST=0.0.0.0 >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_FAKE_DATA_PROGRAM=/opt/examples/example_fastapi >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_FAKE_DATA_RUNTIME=/opt/rootfs.squashfs >> /etc/aleph-vm/supervisor.env"
Expand Down
7 changes: 0 additions & 7 deletions runtimes/aleph-debian-12-python/create_disk_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ ln -s agetty /etc/init.d/agetty.ttyS0
echo ttyS0 > /etc/securetty
EOT


# Generate SSH host keys
#systemd-nspawn -D ./rootfs/ ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key
#systemd-nspawn -D ./rootfs/ ssh-keygen -q -N "" -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key
#systemd-nspawn -D ./rootfs/ ssh-keygen -q -N "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
#systemd-nspawn -D ./rootfs/ ssh-keygen -q -N "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key

cat <<EOT > ./rootfs/etc/inittab
# /etc/inittab
Expand Down

0 comments on commit e8ff4e3

Please sign in to comment.