added more container scripts, smaller image

This commit is contained in:
Christian Goll
2022-11-25 11:58:32 +01:00
parent 4a5b5a8317
commit f831db1875
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
[Unit]
Description=warewulf daemon container
Documentation=https://build.opensuse.org/package/show/SUSE:ALP:Workloads/warewulf-container
After=network-online.target
After=local-fs.target
Wants=network-online.target
StartLimitIntervalSec=40
StartLimitBurst=5
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=always
RestartSec=1s
TimeoutStopSec=70
#Environment=WAREWULF_IMAGE_PATH=registry.opensuse.org/suse/alp/workloads/tumbleweed_containerfiles/suse/alp/workloads/warewulf:latest
Environment=WAREWULF_IMAGE_PATH=warewulf:latest
ExecStartPre=-/usr/bin/podman container runlabel --name warewulf install ${WAREWULF_IMAGE_PATH}
ExecStart=/usr/bin/podman container runlabel --name warewulf run ${WAREWULF_IMAGE_PATH}
ExecStop=/usr/bin/podman container stop warewulf
ExecStopPost=/usr/bin/podman container rm warewulf
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Warewulf container configuration
After=local-fs.target
Before=warewulfd.service
Before=dhcpd
[Service]
Type=oneshot
ExecStart=/container/config-warewulf
[Install]
WantedBy=multi-user.target

8
container-scripts/wwctl Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
source /etc/warewulf-container.conf
set -euxo pipefail
# Run the domain
podman exec -ti ${CONTAINER_NAME} wwctl $@