X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6fb70ef1e1398c30137580c8417e98693dfbfc1d..c1ab715afeb9c095efed7e6064ce10021c067c35:/doc/_includes/_install_docker_cleaner.liquid diff --git a/doc/_includes/_install_docker_cleaner.liquid b/doc/_includes/_install_docker_cleaner.liquid index 5671a54ad5..5b0e1551ed 100644 --- a/doc/_includes/_install_docker_cleaner.liquid +++ b/doc/_includes/_install_docker_cleaner.liquid @@ -1,41 +1,34 @@ +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} + h2. Configure the Docker cleaner The arvados-docker-cleaner program removes least recently used Docker images as needed to keep disk usage below a configured limit. {% include 'notebox_begin' %} -This also removes all containers as soon as they exit, as if they were run with @docker run --rm@. If you need to debug or inspect containers after they stop, temporarily stop arvados-docker-cleaner or run it with @--remove-stopped-containers never@. +This also removes all containers as soon as they exit, as if they were run with @docker run --rm@. If you need to debug or inspect containers after they stop, temporarily stop arvados-docker-cleaner or configure it with @"RemoveStoppedContainers":"never"@. {% include 'notebox_end' %} -Create a file @/etc/systemd/system/arvados-docker-cleaner.service@ in an editor. Include the text below as its contents. Make sure to edit the @ExecStart@ line appropriately for your compute node. +Create a file @/etc/arvados/docker-cleaner/docker-cleaner.json@ in an editor, with the following contents. -
[Service]
-# Most deployments will want a quota that's at least 10G.  From there,
-# a larger quota can help reduce compute overhead by preventing reloading
-# the same Docker image repeatedly, but will leave less space for other
-# files on the same storage (usually Docker volumes).  Make sure the quota
-# is less than the total space available for Docker images.
-# If your deployment uses a Python 3 Software Collection, uncomment the
-# ExecStart line below, and delete the following one:
-# ExecStart=scl enable python33 "python3 -m arvados_docker.cleaner --quota 20G"
-ExecStart=python3 -m arvados_docker.cleaner --quota 20G
-Restart=always
-RestartPreventExitStatus=2
-
-[Install]
-WantedBy=default.target
-
-[Unit]
-After=docker.service
+
{
+    "Quota": "10G",
+    "RemoveStoppedContainers": "always"
+}
 
-Then enable and start the service: +*Choosing a quota:* Most deployments will want a quota that's at least 10G. From there, a larger quota can help reduce compute overhead by preventing reloading the same Docker image repeatedly, but will leave less space for other files on the same storage (usually Docker volumes). Make sure the quota is less than the total space available for Docker images. + +Restart the service after updating the configuration file. -
~$ sudo systemctl enable arvados-docker-cleaner.service
-~$ sudo systemctl start arvados-docker-cleaner.service
+
~$ sudo systemctl restart arvados-docker-cleaner
 
-If you are using a different daemon supervisor, or if you want to test the daemon in a terminal window, use the command on the @ExecStart@ line above. +*If you are using a different daemon supervisor,* or if you want to test the daemon in a terminal window, run @arvados-docker-cleaner@. Run @arvados-docker-cleaner --help@ for more configuration options.