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

WIP: Fix the CI failing on Debian 11 and Ubuntu 22.04 #430

Closed
wants to merge 10 commits into from
Closed
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
8 changes: 4 additions & 4 deletions .github/workflows/test-new-runtime-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
run: |
doctl compute droplet create \
--image debian-12-x64 \
--size c-2 \
--region fra1 \
--vpc-uuid 992896c8-c089-4da3-9288-f81e28c095a4 \
--size c-4 \
--region ams3 \
--vpc-uuid 5976b7bd-4417-49e8-8522-672aaa920c30 \
--enable-ipv6 \
--ssh-keys b3:ff:08:7f:57:00:fd:7a:14:00:f2:35:0a:f6:e8:55 \
--ssh-keys ab:2b:25:16:46:6f:25:d0:80:63:e5:be:67:04:cb:64 \
aleph-vm-ci-runtime

- name: "Build custom runtime"
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/test-on-droplet-debian-11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
name: "Run in DigitalOcean Droplet with Debian 11"
runs-on: ubuntu-latest
concurrency: droplet-aleph-vm-debian-11
timeout-minutes: 10

steps:
- name: Checkout repository
Expand All @@ -33,11 +34,11 @@ jobs:
run: |
doctl compute droplet create \
--image debian-11-x64 \
--size c-2 \
--region fra1 \
--vpc-uuid 992896c8-c089-4da3-9288-f81e28c095a4 \
--size c-4 \
--region ams3 \
--vpc-uuid 5976b7bd-4417-49e8-8522-672aaa920c30 \
--enable-ipv6 \
--ssh-keys b3:ff:08:7f:57:00:fd:7a:14:00:f2:35:0a:f6:e8:55 \
--ssh-keys ab:2b:25:16:46:6f:25:d0:80:63:e5:be:67:04:cb:64,9e:8b:06:53:e3:fc:6f:42:64:57:bf:1f:aa:54:11:55 \
aleph-vm-ci-debian-11

- name: Build Debian Package
Expand All @@ -49,30 +50,33 @@ jobs:
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-debian-11 --output json | ./.github/scripts/extract_droplet_ipv4.py)"
until ssh-keyscan -H ${DROPLET_IPV4}; do sleep 1; done
timeout-minutes: 3

- name: Install Aleph-VM on the Droplet
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-debian-11 --output json | ./.github/scripts/extract_droplet_ipv4.py)"
ssh-keyscan -H ${DROPLET_IPV4} > ~/.ssh/known_hosts

ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt-get update"
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt-get upgrade -y"
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt-get 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
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt install -y /opt/aleph-vm.debian-11.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_ALLOCATION_TOKEN_HASH=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_CHECK_FASTAPI_VM_ID=3fc0aa9569da840c43e7bd2033c3c580abb46b007527d6d20f2d4e98e867f7af >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "systemctl restart aleph-vm-supervisor"

- name: Test Aleph-VM on the Droplet
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-debian-11 --output json | ./.github/scripts/extract_droplet_ipv4.py)"

sleep 3
curl --retry 5 --max-time 10 --fail "http://${DROPLET_IPV4}:4020/about/usage/system"
curl --retry 5 --max-time 10 --fail "http://${DROPLET_IPV4}:4020/status/check/fastapi"
curl --retry 5 --max-time 20 --fail "http://${DROPLET_IPV4}:4020/status/check/fastapi"

- name: Schedule an instance on the Droplet by faking a call from the scheduler
run: |
Expand All @@ -85,4 +89,5 @@ jobs:
- name: Cleanup
if: always()
run: |
doctl compute droplet delete -f aleph-vm-ci-debian-11
ls
# doctl compute droplet delete -f aleph-vm-ci-debian-11
11 changes: 7 additions & 4 deletions .github/workflows/test-on-droplet-debian-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
name: "Run in DigitalOcean Droplet with Debian 12"
runs-on: ubuntu-latest
concurrency: droplet-aleph-vm-debian-12
timeout-minutes: 10

steps:
- name: Checkout repository
Expand All @@ -33,11 +34,11 @@ jobs:
run: |
doctl compute droplet create \
--image debian-12-x64 \
--size c-2 \
--region fra1 \
--vpc-uuid 992896c8-c089-4da3-9288-f81e28c095a4 \
--size c-4 \
--region ams3 \
--vpc-uuid 5976b7bd-4417-49e8-8522-672aaa920c30 \
--enable-ipv6 \
--ssh-keys b3:ff:08:7f:57:00:fd:7a:14:00:f2:35:0a:f6:e8:55 \
--ssh-keys ab:2b:25:16:46:6f:25:d0:80:63:e5:be:67:04:cb:64 \
aleph-vm-ci-debian-12

- name: Build Debian Package
Expand All @@ -49,6 +50,7 @@ jobs:
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-debian-12 --output json | ./.github/scripts/extract_droplet_ipv4.py)"
until ssh-keyscan -H ${DROPLET_IPV4}; do sleep 1; done
timeout-minutes: 3

- name: Install Aleph-VM on the Droplet
run: |
Expand All @@ -64,6 +66,7 @@ jobs:
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt 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_ALLOCATION_TOKEN_HASH=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "systemctl restart aleph-vm-supervisor"

- name: Test Aleph-VM on the Droplet
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test-on-droplet-ubuntu-22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
name: "Run in DigitalOcean Droplet with Ubuntu 22.04"
runs-on: ubuntu-latest
concurrency: droplet-aleph-vm-ubuntu-22-04
timeout-minutes: 10

steps:
- name: Checkout repository
Expand Down Expand Up @@ -34,10 +35,10 @@ jobs:
doctl compute droplet create \
--image ubuntu-22-04-x64 \
--size c-4 \
--region fra1 \
--vpc-uuid 992896c8-c089-4da3-9288-f81e28c095a4 \
--region ams3 \
--vpc-uuid 5976b7bd-4417-49e8-8522-672aaa920c30 \
--enable-ipv6 \
--ssh-keys b3:ff:08:7f:57:00:fd:7a:14:00:f2:35:0a:f6:e8:55 \
--ssh-keys ab:2b:25:16:46:6f:25:d0:80:63:e5:be:67:04:cb:64 \
aleph-vm-ci-ubuntu-22-04

- name: Build Ubuntu Package
Expand All @@ -49,6 +50,7 @@ jobs:
run: |
export DROPLET_IPV4="$(doctl compute droplet get aleph-vm-ci-ubuntu-22-04 --output json | ./.github/scripts/extract_droplet_ipv4.py)"
until ssh-keyscan -H ${DROPLET_IPV4}; do sleep 1; done
timeout-minutes: 3

- name: Install Aleph-VM on the Droplet
run: |
Expand All @@ -66,6 +68,7 @@ jobs:
ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt install -y /opt/aleph-vm.ubuntu-22.04.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_ALLOCATION_TOKEN_HASH=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "echo ALEPH_VM_SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> /etc/aleph-vm/supervisor.env"
ssh root@${DROPLET_IPV4} "systemctl restart aleph-vm-supervisor"

- name: Test Aleph-VM on the Droplet
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ node_modules
/examples/example_http_rust/target/
/examples/example_django/static/admin/
/runtimes/aleph-debian-11-python/rootfs/
/runtimes/aleph-debian-12-python/rootfs/
/packaging/aleph-vm/opt/
/packaging/target/
/packaging/repositories/*/db/
Expand Down
Loading