From 8cf10e4eaf4f1709054e4bba78c3dfdc6b2c8dd4 Mon Sep 17 00:00:00 2001 From: Olivier Le Thanh Duong Date: Wed, 4 Sep 2024 12:21:59 +0200 Subject: [PATCH] Do not copy the configuration on the server, instead ssh it on the server --- .github/workflows/test-on-droplets-matrix.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-on-droplets-matrix.yml b/.github/workflows/test-on-droplets-matrix.yml index e3883a89..ed08db61 100644 --- a/.github/workflows/test-on-droplets-matrix.yml +++ b/.github/workflows/test-on-droplets-matrix.yml @@ -98,10 +98,6 @@ jobs: - name: Build Package run: | - echo ALEPH_VM_SUPERVISOR_HOST=0.0.0.0 >> packaging/aleph-vm/etc/aleph-vm/supervisor.env - echo ALEPH_VM_ALLOCATION_TOKEN_HASH=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 >> packaging/aleph-vm/etc/aleph-vm/supervisor.env - echo ALEPH_VM_CHECK_FASTAPI_VM_ID=${{ matrix.check_vm.item_hash }} >> packaging/aleph-vm/etc/aleph-vm/supervisor.env - echo ALEPH_VM_SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> packaging/aleph-vm/etc/aleph-vm/supervisor.env cd packaging && make ${{ matrix.os_config.package_build_command }} && cd .. ls packaging/target @@ -117,6 +113,14 @@ jobs: run: | ssh-keyscan -H ${DROPLET_IPV4} > ~/.ssh/known_hosts + # Configuration + echo ALEPH_VM_SUPERVISOR_HOST=0.0.0.0 >> supervisor.env + echo ALEPH_VM_ALLOCATION_TOKEN_HASH=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 >> supervisor.env + echo ALEPH_VM_CHECK_FASTAPI_VM_ID=${{ matrix.check_vm.item_hash }} >> supervisor.env + echo ALEPH_VM_SENTRY_DSN=${{ secrets.SENTRY_DSN }} >> supervisor.env + ssh root@${DROPLET_IPV4} mkdir -p /etc/aleph-vm/ + scp supervisor.env root@${DROPLET_IPV4}:/etc/aleph-vm/supervisor.env + # Wait a few seconds for DigitalOcean to setup the Droplet using apt, which conflicts with our comands: sleep 5 @@ -129,7 +133,8 @@ jobs: 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/${{ matrix.os_config.package_name }} root@${DROPLET_IPV4}:/opt - ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt-get -o DPkg::Lock::Timeout=60 install -y /opt/${{ matrix.os_config.package_name }}" + # "--force-confold" keeps existing config files during package install/upgrade, avoiding prompts. + ssh root@${DROPLET_IPV4} DEBIAN_FRONTEND=noninteractive "apt-get -o DPkg::Lock::Timeout=60 -o Dpkg::Options::="--force-confold" install -y /opt/${{ matrix.os_config.package_name }}" # Allow some time for IPFS Kubo to start sleep 5