Merge branch '21719-deps-security-updates'. Closes #21719
[arvados.git] / doc / install / config.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Configuration files
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 h2. Arvados /etc/arvados/config.yml
13
14 The configuration file is normally found at @/etc/arvados/config.yml@ and will be referred to as just @config.yml@ in this guide.  This configuration file must be kept in sync across every service node in the cluster, but not shell and compute nodes (which do not require config.yml).
15
16 h3. Syntax
17
18 The configuration file is in "YAML":https://yaml.org/ format.  This is a block syntax where indentation is significant (similar to Python).  By convention we use two space indent.  The first line of the file is always "Clusters:", underneath it at the first indent level is the Cluster ID.  All the actual cluster configuration follows under the Cluster ID.  This means all configuration parameters are indented by at least two levels (four spaces).  Comments start with @#@ .
19
20 We recommend a YAML-syntax plugin for your favorite text editor, such as @yaml-mode@ (Emacs) or @yaml-vim@.
21
22 Example file:
23
24 <pre>
25 Clusters:                         # Clusters block, everything else is listed under this
26   abcde:                          # Cluster ID, everything under it is configuration for this cluster
27     ExampleConfigKey: "fghijk"    # An example configuration key
28     ExampleConfigGroup:           # A group of keys
29       ExampleDurationConfig: 12s  # Example duration
30       ExampleSizeConfig: 99KiB    # Example with a size suffix
31 </pre>
32
33 Each configuration group may only appear once.  When a configuration key is within a config group, it will be written with the group name leading, for example @ExampleConfigGroup.ExampleSizeConfig@.
34
35 Duration suffixes are s=seconds, m=minutes or h=hours.
36
37 Size suffixes are K=10 ^3^, Ki=2 ^10^ , M=10 ^6^, Mi=2 ^20^, G=10 ^9^, Gi=2 ^30^, T=10 ^12^, Ti=2 ^40^, P=10 ^15^, Pi=2 ^50^, E=10 ^18^, Ei=2 ^60^.  You can optionally follow with a "B" (eg "MB" or "MiB") for readability (it does not affect the units.)
38
39 h3(#empty). Create empty configuration file
40
41 Change @webserver-user@ to the user that runs your web server process.  This is @www-data@ on Debian-based systems, and @nginx@ on Red Hat-based systems.
42
43 <notextile>
44 <pre><code># <span class="userinput">export ClusterID=xxxxx</span>
45 # <span class="userinput">umask 027</span>
46 # <span class="userinput">mkdir -p /etc/arvados</span>
47 # <span class="userinput">cat &gt; /etc/arvados/config.yml &lt;&lt;EOF
48 Clusters:
49   ${ClusterID}:
50 EOF</span>
51 # <span class="userinput">chgrp webserver-user /etc/arvados /etc/arvados/config.yml</span>
52 </span></code></pre>
53 </notextile>
54
55 h2. Nginx configuration
56
57 This guide will also cover setting up "Nginx":https://www.nginx.com/ as a reverse proxy for Arvados services.  Nginx performs two main functions: TLS termination and virtual host routing.  The virtual host configuration for each component will go in its own file in @/etc/nginx/conf.d/@.
58
59 h2. Synchronizing config file
60
61 The Arvados configuration file must be kept in sync across every service node in the cluster.  We strongly recommend using a devops configuration management tool such as "Puppet":https://puppet.com/open-source/ to synchronize the config file.  Alternately, something like the following script to securely copy the configuration file to each node may be helpful.  Replace the @ssh@ targets with your nodes.
62
63 <notextile>
64 <pre><code>#!/bin/sh
65 sudo cat /etc/arvados/config.yml | ssh <span class="userinput">10.0.0.2</span> sudo sh -c "'cat > /etc/arvados/config.yml'"
66 sudo cat /etc/arvados/config.yml | ssh <span class="userinput">10.0.0.3</span> sudo sh -c "'cat > /etc/arvados/config.yml'"
67 </code></pre>
68 </notextile>