From b7d12bbdfdc5b58fc19dba985a1ffa1e36522ff1 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 20 Jul 2017 20:29:02 +0100 Subject: baserock_ostree: Update for changes in BuildStream 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. --- .../etc/systemd/system/ostree-cache-update-summary.service | 11 +++++++++++ .../etc/systemd/system/ostree-cache-update-summary.timer | 8 ++++++++ baserock_ostree/image-config.yml | 2 +- baserock_ostree/instance-config.yml | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 baserock_ostree/etc/systemd/system/ostree-cache-update-summary.service create mode 100644 baserock_ostree/etc/systemd/system/ostree-cache-update-summary.timer 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 -- cgit v1.2.1