Use ignition as a systemd service
simple init.d ignition fails as systemd is needed to set up drivers, etc. Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
committed by
Jonathon Anderson
parent
a7df560a30
commit
cfbb38d570
@@ -0,0 +1,32 @@
|
||||
[Unit]
|
||||
Description=Ignition warewulf (disks)
|
||||
Documentation=https://hpcng.github.io/warewulf
|
||||
ConditionPathExists=/warewulf/ignition.json
|
||||
ConditionPathExists=/usr/lib/dracut/modules.d/30ignition/ignition
|
||||
DefaultDependencies=false
|
||||
|
||||
Before=ignition-ww4-mount.service
|
||||
|
||||
# This stage runs between `basic.target` and `initrd-root-device.target`,
|
||||
# see https://www.freedesktop.org/software/systemd/man/bootup.html
|
||||
# Make sure to run before the file system checks, as sgdisk will trigger
|
||||
# udev events, potentially resulting in race conditions due to disappearing
|
||||
# devices.
|
||||
|
||||
# Note that CL runs this before `local-fs-pre.target` to allow for configs that
|
||||
# completely wipe the rootfs. Though we're not there yet. But we still run
|
||||
# before `sysroot.mount` on principle.
|
||||
Before=initrd-root-device.target
|
||||
Before=sysroot.mount
|
||||
|
||||
#OnFailure=emergency.target
|
||||
#OnFailureJobMode=isolate
|
||||
|
||||
# This stage requires udevd to detect disk partitioning changes.
|
||||
Requires=systemd-udevd.service
|
||||
After=systemd-udevd.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/lib/dracut/modules.d/30ignition/ignition --platform=metal --stage=disks --config-cache /warewulf/ignition.json
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Ignition warewulf (mount)
|
||||
Documentation=https://hpcng.github.io/warewulf
|
||||
ConditionPathExists=/warewulf/ignition.json
|
||||
ConditionPathExists=/usr/lib/dracut/modules.d/30ignition/ignition
|
||||
DefaultDependencies=false
|
||||
Before=ignition-complete.target
|
||||
|
||||
After=ignition-ww4-disks.service
|
||||
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/lib/dracut/modules.d/30ignition/ignition --platform=metal --stage=mount --config-cache /warewulf/ignition.json
|
||||
ExecStop=/usr/lib/dracut/modules.d/30ignition/ignition --platform=metal --stage=umount --config-cache /warewulf/ignition.json
|
||||
@@ -0,0 +1 @@
|
||||
/etc/systemd/system/ignition-ww4-disks.service
|
||||
@@ -0,0 +1 @@
|
||||
/etc/systemd/system/ignition-ww4-mount.service
|
||||
1
overlays/wwinit/warewulf/ignition.json.ww
Normal file
1
overlays/wwinit/warewulf/ignition.json.ww
Normal file
@@ -0,0 +1 @@
|
||||
{{ IgnitionJson }}
|
||||
Reference in New Issue
Block a user