summaryrefslogtreecommitdiff
path: root/units/trove-garbage-collect.timer
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-02 11:46:11 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-02 12:36:08 +0100
commit766e1dd0c8ef498bd830252200be79915a177cb0 (patch)
treebc194cefd3519b3529c672318624bf704f5d48a0 /units/trove-garbage-collect.timer
parent109c02002baf3c2d8eac57027f29f6c74e5233b5 (diff)
downloadtrove-setup-baserock/sam/artifact-cache-garbage-collect.tar.gz
Add automatic garbage collection service to Trovebaserock/sam/artifact-cache-garbage-collect
We are now using Trove as an artifact server for the Mason continuous delivery system, which can fill up the disk pretty quickly. This adds a rudimetary system for cleaning up old artifacts from an artifact cache server. Note that it does not have any smarts about what to remove other than checking the 'mtime', If you have important release artifacts in the artifact cache, don't run `trove-gc` or enable the trove-garbage-collect service. It wraps the `morph gc` command, currently, so Morph is required on the system. Morph is included in Trove systems via the 'tools' stratum right now. It is hardcoded to remove artifacts until there is at least 15GB of free disk space, and to run once an hour. No cleanup of Git or Lorry data is done.
Diffstat (limited to 'units/trove-garbage-collect.timer')
-rw-r--r--units/trove-garbage-collect.timer9
1 files changed, 9 insertions, 0 deletions
diff --git a/units/trove-garbage-collect.timer b/units/trove-garbage-collect.timer
new file mode 100644
index 0000000..636acea
--- /dev/null
+++ b/units/trove-garbage-collect.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Remove old artifacts once every hour
+
+[Timer]
+OnUnitActiveSec=1h
+
+[Install]
+WantedBy=multi-user.target
+Also=trove-garbage-collect.service