From 13d260bb41286623bce7a2c99d2d53649221e7f7 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Wed, 11 Oct 2023 17:24:10 +0200 Subject: [PATCH] fixup! WIP: Refactor the code structure --- packaging/Makefile | 6 ++---- .../aleph-vm/etc/systemd/system/aleph-vm-supervisor.service | 2 +- packaging/debian-11.dockerfile | 4 +--- packaging/debian-12.dockerfile | 4 +--- packaging/ubuntu-22.04.dockerfile | 4 +--- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/packaging/Makefile b/packaging/Makefile index 48a156a74..159d6214a 100644 --- a/packaging/Makefile +++ b/packaging/Makefile @@ -6,9 +6,7 @@ debian-package: debian-package-resources debian-package-code debian-package-code: rm -fr ./aleph-vm/opt/aleph-vm mkdir -p ./aleph-vm/opt/aleph-vm - cp -r ../vm_supervisor ./aleph-vm/opt/aleph-vm/ - cp -r ../guest_api ./aleph-vm/opt/aleph-vm/ - cp -r ../firecracker ./aleph-vm/opt/aleph-vm/ + cp -r ../src/aleph ./aleph-vm/opt/aleph-vm/ # Fake data for diagnostic and benchmarks mkdir -p ./aleph-vm/opt/aleph-vm/examples/ @@ -49,7 +47,7 @@ download-ipfs-kubo: target-dir build-dir version: python3 ./version_from_git.py --inplace deb aleph-vm/DEBIAN/control - python3 ./version_from_git.py --inplace __version__ ../vm_supervisor/version.py + python3 ./version_from_git.py --inplace __version__ ../aleph/vm/orchestrator/version.py build-dir: mkdir -p target diff --git a/packaging/aleph-vm/etc/systemd/system/aleph-vm-supervisor.service b/packaging/aleph-vm/etc/systemd/system/aleph-vm-supervisor.service index e5a904d28..ab4006c2a 100644 --- a/packaging/aleph-vm/etc/systemd/system/aleph-vm-supervisor.service +++ b/packaging/aleph-vm/etc/systemd/system/aleph-vm-supervisor.service @@ -10,7 +10,7 @@ WorkingDirectory=/opt/aleph-vm Environment=PYTHONPATH=/opt/aleph-vm/:$PYTHONPATH Environment=PYTHONDONTWRITEBYTECODE="enabled" EnvironmentFile=/etc/aleph-vm/supervisor.env -ExecStart=python3 -m vm_supervisor --print-settings --very-verbose +ExecStart=python3 -m aleph.vm.orchestrator --print-settings --very-verbose Restart=always RestartSec=10s diff --git a/packaging/debian-11.dockerfile b/packaging/debian-11.dockerfile index 804486d25..269668516 100644 --- a/packaging/debian-11.dockerfile +++ b/packaging/debian-11.dockerfile @@ -9,9 +9,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get install -y \ && rm -rf /var/lib/apt/lists/* WORKDIR /opt -COPY ../src/aleph/vm/orchestrator ./vm_supervisor -COPY ../src/aleph/vm/guest_api ./guest_api -COPY ../src/aleph/vm/hypervisors/firecracker ./firecracker +COPY ../src/aleph/ ./aleph COPY ../packaging ./packaging COPY ../kernels ./kernels diff --git a/packaging/debian-12.dockerfile b/packaging/debian-12.dockerfile index b7128595f..af484976d 100644 --- a/packaging/debian-12.dockerfile +++ b/packaging/debian-12.dockerfile @@ -9,9 +9,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get install -y \ && rm -rf /var/lib/apt/lists/* WORKDIR /opt -COPY ../src/aleph/vm/orchestrator ./vm_supervisor -COPY ../src/aleph/vm/guest_api ./guest_api -COPY ../src/aleph/vm/hypervisors/firecracker ./firecracker +COPY ../src/aleph ./aleph COPY ../packaging ./packaging COPY ../kernels ./kernels diff --git a/packaging/ubuntu-22.04.dockerfile b/packaging/ubuntu-22.04.dockerfile index 19db3591c..576967d76 100644 --- a/packaging/ubuntu-22.04.dockerfile +++ b/packaging/ubuntu-22.04.dockerfile @@ -9,9 +9,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get install -y \ && rm -rf /var/lib/apt/lists/* WORKDIR /opt -COPY ../src/aleph/vm/orchestrator ./vm_supervisor -COPY ../src/aleph/vm/guest_api ./guest_api -COPY ../src/aleph/vm/hypervisors/firecracker ./firecracker +COPY ../src/aleph ./aleph COPY ../packaging ./packaging COPY ../kernels ./kernels