forked from coreos/layering-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In service to coreos/fedora-coreos-docs#540
- Loading branch information
Showing
4 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
8 changes: 8 additions & 0 deletions
8
autoupdate-unit/usr/lib/systemd/system/autoupdate-host.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
1 change: 1 addition & 0 deletions
1
autoupdate-unit/usr/lib/systemd/system/timers.target.wants/autoupdate-host.timer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../autoupdate-host.timer |