Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:

- name: Ensure that the relevant files are present in the package
run: |
dpkg --contents packaging/target/${{ matrix.artifact_name }} | grep /opt/kubo/ipfs
dpkg --contents packaging/target/${{ matrix.artifact_name }} | grep /opt/firecracker/firecracker
dpkg --contents packaging/target/${{ matrix.artifact_name }} | grep /opt/firecracker/jailer
dpkg --contents packaging/target/${{ matrix.artifact_name }} | grep /opt/firecracker/vmlinux.bin
Expand Down
5 changes: 3 additions & 2 deletions packaging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ debian-package-code:
build_venv/bin/pip install --no-cache-dir --progress-bar off --target ./aleph-vm/opt/aleph-vm/ 'aleph-message~=1.0.1' 'eth-account==0.10' 'sentry-sdk==1.31.0' 'qmp==1.1.0' 'aleph-superfluid~=0.2.1' 'sqlalchemy[asyncio]>=2.0' 'aiosqlite==0.19.0' 'alembic==1.13.1' 'aiohttp_cors==0.7.0' 'pydantic-settings==2.6.1' 'pyroute2==0.7.12' 'python-cpuid==0.1.0' 'solathon==1.0.2' 'protobuf==5.28.3'
build_venv/bin/python3 -m compileall ./aleph-vm/opt/aleph-vm/

debian-package-resources: firecracker-bins vmlinux download-ipfs-kubo target/bin/sevctl
debian-package-resources: firecracker-bins vmlinux target/bin/sevctl
rm -fr ./aleph-vm/opt/firecracker
mkdir -p ./aleph-vm/opt/firecracker
cp -pr ./target/vmlinux.bin ./aleph-vm/opt/firecracker/
cp -pr ./target/firecracker ./aleph-vm/opt/firecracker/
cp -pr ./target/jailer ./aleph-vm/opt/firecracker/
cp -pr ./target/kubo/kubo ./aleph-vm/opt/kubo
# Disable Kubo installation for now
# cp -pr ./target/kubo/kubo ./aleph-vm/opt/kubo
cp -pr ./target/bin/sevctl ./aleph-vm/opt/sevctl

firecracker-bins: target-dir build-dir
Expand Down
23 changes: 16 additions & 7 deletions packaging/aleph-vm/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,27 @@ rm -fr /srv/jailer # Upgrade from < 0.1.11
rm -fr /tmp/aleph # Upgrade from < 0.1.11
mkdir -p /var/lib/aleph/vm/jailer

# Create the IPFS directory if it does not exist
if [ ! -d "/var/lib/ipfs" ]; then
mkdir -p /var/lib/ipfs
# Set appropriate permissions if needed
chown ipfs:ipfs /var/lib/ipfs
# Clean the IPFS directory if it does exist
if [ -d "/var/lib/ipfs" ]; then
if ! [[ -v container ]]; then
# Check if service is running to stop it
if systemctl is-active --quiet ipfs.service; then
systemctl stop ipfs.service
fi

# Check if service is enabled to disable it
if systemctl is-enabled --quiet ipfs.service; then
systemctl disable ipfs.service
fi
fi

# Remove existing IPFS files to free some space
rm -rf /var/lib/ipfs
fi

# Systemd is absent from containers
if ! [[ -v container ]]; then
systemctl daemon-reload
systemctl enable ipfs.service
systemctl restart ipfs.service
systemctl enable aleph-vm-supervisor.service
systemctl restart aleph-vm-supervisor.service
fi
4 changes: 1 addition & 3 deletions packaging/aleph-vm/DEBIAN/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ fi

set -e

# We will not delete this user on uninstall since there may be files owned by that user in /var/lib/ipfs
addgroup --system ipfs
adduser --system --ingroup ipfs ipfs

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[Unit]
Description=Aleph.im VM execution engine
After=network.target ipfs.service
Wants=ipfs.service
After=network.target

[Service]
User=0
Expand Down
84 changes: 0 additions & 84 deletions packaging/aleph-vm/etc/systemd/system/ipfs.service

This file was deleted.

Loading