diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-07-20 20:29:02 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-07-21 10:21:33 +0100 |
commit | b7d12bbdfdc5b58fc19dba985a1ffa1e36522ff1 (patch) | |
tree | a4b49dc471eaab0d140e74138920dbf849370611 | |
parent | dbe1204d2e77192cdece1f75a4db8df40e132ca4 (diff) | |
download | infrastructure-b7d12bbdfdc5b58fc19dba985a1ffa1e36522ff1.tar.gz |
baserock_ostree: Update for changes in BuildStreamsam/update-ostree
We now need a timer job to update the summary file, see:
https://buildstream.gitlab.io/buildstream/artifacts.html#summary-file-updates
I also updated BuildStream which changes the artifact push protocol.
Sadly the protocol isn't versioned yet so old versions will now fail to
push with weird errors.
4 files changed, 34 insertions, 1 deletions
diff --git a/baserock_ostree/etc/systemd/system/ostree-cache-update-summary.service b/baserock_ostree/etc/systemd/system/ostree-cache-update-summary.service new file mode 100644 index 00000000..d070aec8 --- /dev/null +++ b/baserock_ostree/etc/systemd/system/ostree-cache-update-summary.service @@ -0,0 +1,11 @@ +[Unit] +Description = Update OSTree summary file for cache + +[Service] +Type = oneshot +ExecStart = /usr/bin/ostree --repo=/srv/ostree/cache/ summary -u +User = ostree +Group = ostree + +[Install] +WantedBy=default.target diff --git a/baserock_ostree/etc/systemd/system/ostree-cache-update-summary.timer b/baserock_ostree/etc/systemd/system/ostree-cache-update-summary.timer new file mode 100644 index 00000000..0be7bc51 --- /dev/null +++ b/baserock_ostree/etc/systemd/system/ostree-cache-update-summary.timer @@ -0,0 +1,8 @@ +[Unit] +Description = Update OSTree summary file for cache + +[Timer] +OnUnitActiveSec = 5min + +[Install] +WantedBy = default.target diff --git a/baserock_ostree/image-config.yml b/baserock_ostree/image-config.yml index 24e8be9b..b4cdcef5 100644 --- a/baserock_ostree/image-config.yml +++ b/baserock_ostree/image-config.yml @@ -39,7 +39,7 @@ dnf: name=python3-pip state=latest - name: buildstream sources - git: dest=/home/fedora/buildstream repo=https://gitlab.com/buildstream/buildstream version=dd15b1ba494c4725fd452b6723ff799d1708830c + git: dest=/home/fedora/buildstream repo=https://gitlab.com/buildstream/buildstream version=977210795c9ec67309eae3b78e2100c6b2281823 - name: buildstream installed command: /usr/bin/pip3 install . diff --git a/baserock_ostree/instance-config.yml b/baserock_ostree/instance-config.yml index 5286c61b..e3c6d214 100644 --- a/baserock_ostree/instance-config.yml +++ b/baserock_ostree/instance-config.yml @@ -39,3 +39,17 @@ - name: restart sshd server service: name=sshd enabled=yes state=restarted + + - name: install systemd units + copy: src=./{{item}} dest=/{{item}} + sudo: yes + with_items: + - etc/systemd/system/ostree-cache-update-summary.service + - etc/systemd/system/ostree-cache-update-summary.timer + + - name: enable systemd units + systemd: name={{item}} enabled=yes daemon_reload=yes state=started + sudo: yes + with_items: + - ostree-cache-update-summary.service + - ostree-cache-update-summary.timer |