contrib/systemd: Update bootcfg systemd units

This commit is contained in:
Dalton Hubble
2016-12-07 11:41:08 -08:00
parent a77dd0f55b
commit ce381ff788
4 changed files with 49 additions and 10 deletions

View File

@@ -0,0 +1,24 @@
[Unit]
Description=CoreOS bootcfg Server
Documentation=https://github.com/coreos/coreos-baremetal
[Service]
Environment="IMAGE=quay.io/coreos/bootcfg"
Environment="VERSION=v0.4.1"
Environment="BOOTCFG_ADDRESS=0.0.0.0:8080"
Environment="BOOTCFG_RPC_ADDRESS=0.0.0.0:8081"
Environment="BOOTCFG_LOG_LEVEL=debug"
ExecStartPre=/usr/bin/mkdir -p /etc/bootcfg
ExecStartPre=/usr/bin/mkdir -p /var/lib/bootcfg/assets
ExecStart=/usr/bin/rkt run \
--net=host \
--inherit-env \
--trust-keys-from-https \
--mount volume=data,target=/var/lib/bootcfg \
--mount volume=config,target=/etc/bootcfg \
--volume data,kind=host,source=/var/lib/bootcfg \
--volume config,kind=host,source=/etc/bootcfg \
${IMAGE}:${VERSION}
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,16 @@
[Unit]
Description=CoreOS bootcfg Server
Documentation=https://github.com/coreos/coreos-baremetal
[Service]
User=bootcfg
Group=bootcfg
Environment="BOOTCFG_ADDRESS=0.0.0.0:8080"
ExecStart=/usr/local/bin/bootcfg
# systemd.exec
ProtectHome=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target

View File

@@ -3,20 +3,20 @@ Description=CoreOS bootcfg Server
Documentation=https://github.com/coreos/coreos-baremetal
[Service]
Environment="IMAGE=quay.io/coreos/bootcfg"
Environment="VERSION=v0.4.1"
Environment="BOOTCFG_ADDRESS=0.0.0.0:8080"
ExecStartPre=/usr/bin/mkdir -p /etc/bootcfg
ExecStartPre=/usr/bin/mkdir -p /var/lib/bootcfg/assets
ExecStart=/usr/bin/rkt run \
--net=host \
--inherit-env \
--trust-keys-from-https \
--mount volume=data,target=/var/lib/bootcfg \
--mount volume=config,target=/etc/bootcfg \
--volume data,kind=host,source=/var/lib/bootcfg \
--volume config,kind=host,source=/etc/bootcfg \
quay.io/coreos/bootcfg:v0.4.1 -- -address=0.0.0.0:8080 -rpc-address=0.0.0.0:8081 -log-level=debug
# systemd.exec
ProtectHome=yes
ProtectSystem=full
ReadOnlyPaths=/etc/bootcfg
ReadWritePaths=/var/lib/bootcfg
${IMAGE}:${VERSION}
[Install]
WantedBy=multi-user.target

View File

@@ -5,13 +5,12 @@ Documentation=https://github.com/coreos/coreos-baremetal
[Service]
User=bootcfg
Group=bootcfg
ExecStart=/usr/local/bin/bootcfg -address=0.0.0.0:8080 -rpc-address=0.0.0.0:8081 -log-level=debug
Environment="BOOTCFG_ADDRESS=0.0.0.0:8080"
ExecStart=/usr/bin/bootcfg
# systemd.exec
ProtectHome=yes
ProtectSystem=full
ReadOnlyPaths=/etc/bootcfg
ReadWritePaths=/var/lib/bootcfg
[Install]
WantedBy=multi-user.target