Skip to content

Commit

Permalink
autoupdate-host: new example
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed May 4, 2023
1 parent f152539 commit 8ba00bc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoupdate-unit/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This example injects a systemd unit to perform automatic daily OS updates.
FROM quay.io/fedora/fedora-coreos:stable
# The key content is in [usr/lib/systemd/system](usr/lib/systemd/system)
ADD usr usr
# At the current time, zincati cannot be used for container updates. More in https://github.com/coreos/fedora-coreos-tracker/issues/1263
RUN systemctl mask zincati
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Automatic host upgrades
[Service]
Type=simple
# Note that this will be a no-op if there are no changes.
ExecStart=rpm-ostree upgrade --reboot
# We'll use https://github.com/coreos/rpm-ostree/pull/4384 in the future
StandardOutput=null
7 changes: 7 additions & 0 deletions autoupdate-unit/usr/lib/systemd/system/autoupdate-host.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Unit]
Description=Automatic daily host upgrades
[Timer]
OnBootSec=1h
OnUnitInactiveSec=1d
[Install]
WantedBy=timers.target

0 comments on commit 8ba00bc

Please sign in to comment.