19070: Still trying to fix test_with_arvbox
[arvados.git] / doc / _includes / _install_compute_docker.liquid
1 {% comment %}
2 Copyright (C) The Arvados Authors. All rights reserved.
3
4 SPDX-License-Identifier: CC-BY-SA-3.0
5 {% endcomment %}
6
7 h2(#cgroups). Configure Linux cgroups accounting
8
9 Linux can report what compute resources are used by processes in a specific cgroup or Docker container.  Crunch can use these reports to share that information with users running compute work.  This can help workflow authors debug and optimize their workflows.
10
11 To enable cgroups accounting, you must boot Linux with the command line parameters @cgroup_enable=memory swapaccount=1@.
12
13 Currently Arvados is not compatible with the new cgroups accounting, also known as cgroups v2. Currently, all supported GNU/Linux distributions don't use cgroups v2 as default
14 If you are using a distribution in the compute nodes that ships with cgroups v2 enabled, make sure to disable it by booting Linux with the command line parameters @systemd.unified_cgroup_hierarchy=0@.
15
16 After making changes, reboot the system to make these changes effective.
17
18 h3. Red Hat and CentOS
19
20 <notextile>
21 <pre><code>~$ <span class="userinput">sudo grubby --update-kernel=ALL --args='cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0'</span>
22 </code></pre>
23 </notextile>
24
25 h3. Debian and Ubuntu
26
27 Open the file @/etc/default/grub@ in an editor.  Find where the string @GRUB_CMDLINE_LINUX@ is set.  Add @cgroup_enable=memory swapaccount=1 systemd.unified_cgroup_hierarchy=0@ to that string.  Save the file and exit the editor.  Then run:
28
29 <notextile>
30 <pre><code>~$ <span class="userinput">sudo update-grub</span>
31 </code></pre>
32 </notextile>
33
34 h2(#install_docker). Install Docker
35
36 Compute nodes must have Docker installed to run containers.  This requires a relatively recent version of Linux (at least upstream version 3.10, or a distribution version with the appropriate patches backported).  Follow the "Docker Engine installation documentation":https://docs.docker.com/install/ for your distribution.
37
38 Make sure Docker is enabled to start on boot:
39
40 <notextile>
41 <pre><code># <span class="userinput">systemctl enable --now docker</span>
42 </code></pre>
43 </notextile>
44
45 h2(#configure_docker_daemon). Configure the Docker daemon
46
47 Depending on your anticipated workload or cluster configuration, you may need to tweak Docker options.
48
49 For information about how to set configuration options for the Docker daemon, see https://docs.docker.com/config/daemon/systemd/
50
51 h3. Changing ulimits
52
53 Docker containers inherit ulimits from the Docker daemon.  However, the ulimits for a single Unix daemon may not accommodate a long-running Crunch job.  You may want to increase default limits for compute containers by passing @--default-ulimit@ options to the Docker daemon.  For example, to allow containers to open 10,000 files, set @--default-ulimit nofile=10000:10000@.
54
55 h2. Troubleshooting
56
57 h3. Workflows fail with @ValidationException: Not found: '/var/lib/cwl/workflow.json#main'@
58
59 A possible configuration error is having Docker installed as a @snap@ package rather than a @deb@ package.  This is a problem because @snap@ packages are partially containerized and may have a different view of the filesystem than @crunch-run@.  This will produce confusing problems, for example, directory bind mounts sent to Docker that are empty (instead of containing the intended files) and resulting in unexpected "file not found" errors.
60
61 To check for this situation, run @snap list@ and look for @docker@.  If found, run @snap remove docker@ and follow the instructions to above to "install Docker Engine":#install_docker .