2 Copyright (C) The Arvados Authors. All rights reserved.
4 SPDX-License-Identifier: CC-BY-SA-3.0
9 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/ for your distribution.
11 For Debian-based systems, the Arvados package repository includes a backported @docker.io@ package with a known-good version you can install.
13 h2(#configure_docker_daemon). Configure the Docker daemon
15 Crunch runs Docker containers with relatively little configuration. You may need to start the Docker daemon with specific options to make sure these jobs run smoothly in your environment. This section highlights options that are useful to most installations. Refer to the "Docker daemon reference":https://docs.docker.com/reference/commandline/daemon/ for complete information about all available options.
17 The best way to configure these options varies by distribution.
19 * If you're using our backported @docker.io@ package, you can list these options in the @DOCKER_OPTS@ setting in @/etc/default/docker.io@.
20 * If you're using another Debian-based package, you can list these options in the @DOCKER_OPTS@ setting in @/etc/default/docker@.
21 * On Red Hat-based distributions, you can list these options in the @other_args@ setting in @/etc/sysconfig/docker@.
25 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@.
29 Your containers must be able to resolve the hostname of your API server and any hostnames returned in Keep service records. If these names are not in public DNS records, you may need to specify a DNS resolver for the containers by setting the @--dns@ address to an IP address of an appropriate nameserver. You may specify this option more than once to use multiple nameservers.
31 h2. Configure Linux cgroups accounting
33 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 pipeline authors debug and optimize their workflows.
35 To enable cgroups accounting, you must boot Linux with the command line parameters @cgroup_enable=memory swapaccount=1@.
37 On Debian-based systems, open the file @/etc/default/grub@ in an editor. Find where the string @GRUB_CMDLINE_LINUX@ is set. Add @cgroup_enable=memory swapaccount=1@ to that string. Save the file and exit the editor. Then run:
40 <pre><code>~$ <span class="userinput">sudo update-grub</span>
44 On Red Hat-based systems, run:
47 <pre><code>~$ <span class="userinput">sudo grubby --update-kernel=ALL --args='cgroup_enable=memory swapaccount=1'</span>
51 Finally, reboot the system to make these changes effective.
53 h2. Create a project for Docker images
55 Here we create a default project for the standard Arvados Docker images, and give all users read access to it. The project is owned by the system user.
58 <pre><code>~$ <span class="userinput">uuid_prefix=`arv --format=uuid user current | cut -d- -f1`</span>
59 ~$ <span class="userinput">project_uuid=`arv --format=uuid group create --group "{\"owner_uuid\":\"$uuid_prefix-tpzed-000000000000000\", \"name\":\"Arvados Standard Docker Images\"}"`</span>
60 ~$ <span class="userinput">echo "Arvados project uuid is '$project_uuid'"</span>
61 ~$ <span class="userinput">read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"</span>
62 <span class="userinput">{
63 "tail_uuid":"$all_users_group_uuid",
64 "head_uuid":"$project_uuid",
65 "link_class":"permission",
69 </code></pre></notextile>
71 h2. Download and tag the latest arvados/jobs docker image
73 In order to start workflows from workbench, there needs to be Docker image tagged @arvados/jobs:latest@. The following command downloads the latest arvados/jobs image from Docker Hub, loads it into Keep, and tags it as 'latest'. In this example @$project_uuid@ should be the the UUID of the "Arvados Standard Docker Images" project.
76 <pre><code>~$ <span class="userinput">arv-keepdocker --project-uuid $project_uuid --pull arvados/jobs latest</span>
77 </code></pre></notextile>
79 If the image needs to be downloaded from Docker Hub, the command can take a few minutes to complete, depending on available network bandwidth.