3 navsection: installguide
4 title: Multi host Arvados
7 Copyright (C) The Arvados Authors. All rights reserved.
9 SPDX-License-Identifier: CC-BY-SA-3.0
12 # "Introduction":#introduction
13 # "Prerequisites and planning":#prerequisites
14 # "Download the installer":#download
15 # "Initialize the installer":#copy_config
16 # "Choose the SSL configuration":#certificates
17 ## "Using a self-signed certificates":#self-signed
18 ## "Using a Let's Encrypt certificates":#lets-encrypt
19 ## "Bring your own certificates":#bring-your-own
20 # "Create a compute image":#create_a_compute_image
21 # "Further customization of the installation (modifying the salt pillars and states)":#further_customization
22 # "Begin installation":#installation
23 # "Install the CA root certificate":#ca_root_certificate
24 # "Initial user and login":#initial_user
25 # "Test the installed cluster running a simple workflow":#test_install
26 # "After the installation":#post_install
28 h2(#introduction). Introduction
30 This multi host installer is the recommendend way to set up a production Arvados cluster. These instructions include speciic details for installing on Amazon Web Services (AWS), which are marked as "AWS specific". However with additional customization the installer can be used as a template for deployment on other cloud provider or HPC systems.
32 h2(#prerequisites). Prerequisites and planning
34 h3. Cluster ID and base domain
36 Choose a 5-character cluster identifier that will represent the cluster. Here are "guidelines on choosing a cluster identifier":../architecture/federation.html#cluster_id . Only lowercase letters and digits 0-9 are allowed. Examples will use @xarv1@ or ${CLUSTER}, you should substitute the cluster id you have selected.
38 Determine the base domain for the cluster. This will be referred to as ${DOMAIN}
40 For example, if CLUSTER is "xarv1" and DOMAIN is "example.com", then "controller.${CLUSTER}.${DOMAIN}" means "controller.xargv1.example.com".
42 h3. Virtual Private Cloud (AWS specific)
44 We recommend setting Arvados up in a "Virtual Private Cloud (VPC)":https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
46 When you do so, you need to configure a couple of additional things:
48 # "Create a subnet for the compute nodes":https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html
49 # You should set up a "security group which allows SSH access (port 22)":https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html
50 # Make sure to add a "VPC S3 endpoint":https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html
52 h3. S3 Bucket (AWS specific)
54 We recommend "creating an S3 bucket":https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html for data storage named @${CLUSTER}-nyw5e-000000000000000-volume@
56 Then create an IAM role called @${CLUSTER}-keepstore-00-iam-role@ which has "permission to read and write the bucket":https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create.html
60 You will need to allocate (virtual) machines for the fixed infrastructure of the Arvados cluster. These machines should have at least 2 cores and 8 GiB of RAM, running a "supported Arvados distribution":{{site.baseurl}}/install/install-manual-prerequisites.html#supportedlinux
62 Allocate these as appropriate for your site. On AWS you may choose to do it manually with the AWS console, or using a DevOps tool such as CloudFormation or Terraform.
64 The installer will set up the Arvados services on your machines. Here is the default assignment of services to machines:
69 ## arvados controller (recommendend hostname @controller.${CLUSTER}.${DOMAIN}@)
70 ## arvados websocket (recommendend hostname @ws.${CLUSTER}.${DOMAIN}@)
71 ## arvados cloud dispatcher
72 ## arvados keepbalance
73 # KEEPSTORE nodes (at least 2)
74 ## arvados keepstore (recommendend hostnames @keep0.${CLUSTER}.${DOMAIN}@ and @keep1.${CLUSTER}.${DOMAIN}@)
76 ## arvados keepproxy (recommendend hostname @keep.${CLUSTER}.${DOMAIN}@)
77 ## arvados keepweb (recommendend hostname @download.${CLUSTER}.${DOMAIN}@ and @*.collections.${CLUSTER}.${DOMAIN}@)
79 ## arvados workbench (recommendend hostname @workbench.${CLUSTER}.${DOMAIN}@)
80 ## arvados workbench2 (recommendend hostname @workbench2.${CLUSTER}.${DOMAIN}@)
81 ## arvados webshell (recommendend hostname @webshell.${CLUSTER}.${DOMAIN}@)
82 # SHELL node (optional)
83 ## arvados shell (recommended hostname @shell.${CLUSTER}.${DOMAIN}@)
85 Additional prerequisites when preparing machines to run the installer:
87 # root or passwordless sudo access
88 # from the account where you are performing the install, passwordless @ssh@ to each machine (meaning, the client's public key added to @~/.ssh/authorized_keys@ on each node)
89 # @git@ installed on each machine
90 # port 443 reachable by clients
91 # DNS hostnames for each service
92 ## @controller.${CLUSTER}.${DOMAIN}@
93 ## @ws.${CLUSTER}.${DOMAIN}@
94 ## @keep0.${CLUSTER}.${DOMAIN}@
95 ## @keep1.${CLUSTER}.${DOMAIN}@
96 ## @keep.${CLUSTER}.${DOMAIN}@
97 ## @download.${CLUSTER}.${DOMAIN}@
98 ## @*.collections.${CLUSTER}.${DOMAIN}@ -- important note, this should be a wildcard DNS, going to the keepweb service
99 ## @workbench.${CLUSTER}.${DOMAIN}@
100 ## @workbench2.${CLUSTER}.${DOMAIN}@
101 ## @webshell.${CLUSTER}.${DOMAIN}@
102 ## @shell.${CLUSTER}.${DOMAIN}@
104 (AWS specific) The machine that runs the arvados cloud dispatcher will need an "IAM role that allows it to create EC2 instances, see here for details .":https://doc.arvados.org/v2.4/install/crunch2-cloud/install-dispatch-cloud.html
106 If your infrastructure differs from the setup proposed above (ie, different hostnames, or using AWS RDS or an existing DB server), you can still use the installer, but additional customization will be necessary.
108 h2(#download). Download the installer
110 {% assign local_params_src = 'multiple_hosts' %}
111 {% assign config_examples_src = 'multi_host/aws'%}
112 {% include 'download_installer' %}
114 h2. Edit @local.params@
116 This can be found wherever you choose to initialize the install files (@~/setup-arvados-xarv1@ in these examples).
118 # Set @CLUSTER@ to the 5-character cluster identifier (e.g "xarv1")
119 # Set @DOMAIN@ to the base DNS domain of the environment, e.g. "example.com"
120 # Edit Internal IP settings. Since services share hosts, some hosts are the same.
121 # Edit @CLUSTER_INT_CIDR@, this should be the CIDR of the private network that Arvados is running on, e.g. the VPC
122 AWS Specific: Go to the AWS console and into the VPC service, there is a column in
123 this table view of the VPCs that gives the CIDR for the VPC (IPv4 CIDR).
124 # Set @INITIAL_USER_EMAIL@ to your email address, as you will be the first admin user of the system.
125 # Set each @KEY@ / @TOKEN@ to a random string
126 Here's an easy way to create five random tokens:
127 <pre><code>for i in 1 2 3 4 5; do
128 tr -dc A-Za-z0-9 </dev/urandom | head -c 32 ; echo ''
131 # Set @DATABASE_PASSWORD@ to a random string
132 Important! If this contains any non-alphanumeric characters, in particular ampersand ('&'), it is necessary to add backslash quoting.
133 For example, if the password is `Cq&WU<A']p?j`
134 With backslash quoting the special characters it should appear like this in local.params:
135 <pre><code>DATABASE_PASSWORD="Cq\&WU\<A\'\]p\?j"</code></pre>
137 {% include 'ssl_config_multi' %}
139 h2(#create_a_compute_image). Configure Keep on S3 (AWS specific)
141 Once you have that image created, Open @local_config_dir/pillars/arvados.sls@ and edit as follows:
143 1. In the @arvados.cluster.Volumes@ section, set @Region@ to the appropriate AWS region (e.g. 'us-east-1')
145 h2(#create_a_compute_image). Create a compute image
147 {% include 'branchname' %}
149 On cloud installations, containers are dispatched in Docker daemons running in the <i>compute instances</i>, which need some special setup. Follow "the instructions build a cloud compute node image":https://doc.arvados.org/install/crunch2-cloud/install-compute-node.html using the "compute image builder script":https://github.com/arvados/arvados/tree/{{ branchname }}/tools/compute-images .
151 Once you have that image created, Open @local_config_dir/pillars/arvados.sls@ and edit as follows (AWS specific settings described here, configuration for Azure is similar):
153 # In the @arvados.cluster.Containers.CloudVMs@ section:
154 ## Set @ImageID@ to the AMI output from Packer
155 ## Set @Region@ to the appropriate AWS region
156 ## Set @AdminUsername@ to the admin user account on the image
157 ## Set the @SecurityGroupIDs@ list to the VPC security group which you set up to allow SSH connections to these nodes
158 ## Set @SubnetID@ to the value of SubnetId of your VPC
159 # Update @arvados.cluster.Containers.DispatchPrivateKey@ and paste the contents of the @~/.ssh/id_dispatcher@ file you generated in an earlier step.
160 # Update @arvados.cluster.InstanceTypes@ as necessary. If t3 and m5/c5 node types are not available, replace them with t2 and m4/c4. You'll need to double check the values for Price and IncludedScratch/AddedScratch for each type that is changed.
162 h2(#further_customization). Further customization of the installation
164 If you are installing on AWS and following the naming conventions recommend in this guide, then likely no further configuration is necessary and you can begin installation.
166 If your infrastructure differs from the setup proposed above (ie, using AWS RDS or an existing DB server), you can still use the installer, but additional customization will be necessary.
168 This is done by editing the Saltstack pillars and states files found in @local_config_dir@. In particular, @local_config_dir/pillars/arvados.sls@ has the template used to produce the Arvados configuration file that is distributed to all the nodes.
170 Any extra salt <i>state</i> file you add under @local_config_dir/states@ will be added to the salt run and applied to the hosts.
172 h2(#installation). Begin installation
174 At this point, you are ready to run the installer script in deploy mode that will conduct all of the Arvados installation.
176 Run this in ~/arvados-setup-xarv1:
179 ./installer.sh deploy
182 This will deploy all the nodes. It will take a while and produce a lot of logging. If it runs into an error, it will stop.
184 When everything has finished, you can run the diagnostics.
186 Depending on where you are running the installer, you need to provide @-internal-client@ or @-external-client@.
188 You are probably an "internal client" if you are running the diagnostics from one of the Arvados machines inside the VPC.
190 You are an "external client" if you running the diagnostics from your workstation outside of the VPC.
193 ./installer.sh diagnostics (-internal-client|-external-client)
196 h3. Diagnosing issues
198 Most service logs go to @/var/log/syslog@
200 The logs for Rails API server and for Workbench can be found in
202 @/var/www/arvados-api/current/log/production.log@
204 @/var/www/arvados-workbench/current/log/production.log@
206 on the appropriate instances.
208 Workbench2 is a client-side Javascript application, if it having trouble loading, check the browser's developer console.
210 h3(#iterating). Iterating on config changes
212 You can iterate on the config and maintain the cluster by making changes to @local.params@ and @local_config_dir@ and running @installer.sh deploy@ again.
214 If you are debugging a configuration issue on a specific node, you can speed up the cycle a bit by deploying just one node:
216 @installer.sh deploy keep0.xarv1.example.com@
218 However, once you have a final configuration, you should run a full deploy to ensure that the configuration has been synchronized on all the nodes.
220 h3. Common problems and solutions
222 * (AWS Specific) If the AMI wasn't built with ENA (extended networking) support and the instance type requires it, it'll fail to start. You'll see an error in syslog on the node that runs @arvados-dispatch-cloud@. The solution is to build a new AMI with --aws-ena-support true
224 * The arvados-api-server package sets up the database as a post-install script. If the database host or password wasn't set correctly (or quoted correctly) at the time that package is installed, it won't be able to set up the database.
226 This will manifest as an error like this:
229 #<ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation \"api_clients\" does not exist
232 If this happens, you need to
234 1. correct the database information
235 2. run "installer.sh deploy xngs2.rdcloud.bms.com" to update the configuration on the API/controller node
236 3. On the API/controller server node, run this command to re-run the post-install script, which will set up the database:
239 dpkg-reconfigure arvados-api-server
242 4. Re-run 'installer.sh deploy' again to synchronize everything, and so that the install steps that need to contact the API server are run successfully.
244 {% include 'install_ca_cert' %}
246 h2(#initial_user). Initial user and login
248 At this point you should be able to log into the Arvados cluster. The initial URL will be
250 * https://workbench.${CLUSTER}.${DOMAIN}
252 By default, the provision script creates an initial user for testing purposes. This user is configured as administrator of the newly created cluster.
254 Assuming you didn't change these values in the @local.params@ file, the initial credentials are:
257 * Password: 'password'
258 * Email: 'admin@${CLUSTER}.${DOMAIN}'
260 h2(#test_install). Test the installed cluster running a simple workflow
262 As part of the installation, the @provision.sh@ script saves a simple example test workflow in the @/tmp/cluster_tests@ directory in the @shell@ node. If you want to run it, just ssh to the node, then run:
265 <pre><code>cd /tmp/cluster_tests
270 It will create a test user (by default, the same one as the admin user), upload a small workflow and run it. If everything goes OK, the output should similar to this (some output was shortened for clarity):
273 <pre><code>Creating Arvados Standard Docker Images project
274 Arvados project uuid is 'arva2-j7d0g-0prd8cjlk6kfl7y'
277 "uuid":"arva2-o0j2j-n4zu4cak5iifq2a",
278 "owner_uuid":"arva2-tpzed-000000000000000",
281 Uploading arvados/jobs' docker image to the project
282 2.1.1: Pulling from arvados/jobs
283 8559a31e96f4: Pulling fs layer
285 Status: Downloaded newer image for arvados/jobs:2.1.1
286 docker.io/arvados/jobs:2.1.1
287 2020-11-23 21:43:39 arvados.arv_put[32678] INFO: Creating new cache file at /home/vagrant/.cache/arvados/arv-put/c59256eda1829281424c80f588c7cc4d
288 2020-11-23 21:43:46 arvados.arv_put[32678] INFO: Collection saved as 'Docker image arvados jobs:2.1.1 sha256:0dd50'
289 arva2-4zz18-1u5pvbld7cvxuy2
290 Creating initial user ('admin')
291 Setting up user ('admin')
296 "owner_uuid":"arva2-tpzed-000000000000000",
298 "uuid":"arva2-o0j2j-1ownrdne0ok9iox"
302 "owner_uuid":"arva2-tpzed-000000000000000",
304 "uuid":"arva2-o0j2j-1zbeyhcwxc1tvb7"
308 "email":"admin@arva2.arv.local",
310 "owner_uuid":"arva2-tpzed-000000000000000",
313 "uuid":"arva2-tpzed-3wrm93zmzpshrq2",
317 "kind":"arvados#HashList"
319 Activating user 'admin'
322 "email":"admin@arva2.arv.local",
325 "uuid":"arva2-tpzed-3wrm93zmzpshrq2",
328 Running test CWL workflow
329 INFO /usr/bin/cwl-runner 2.1.1, arvados-python-client 2.1.1, cwltool 3.0.20200807132242
330 INFO Resolved 'hasher-workflow.cwl' to 'file:///tmp/cluster_tests/hasher-workflow.cwl'
332 INFO Using cluster arva2 (https://arva2.arv.local:8443/)
333 INFO Upload local files: "test.txt"
334 INFO Uploaded to ea34d971b71d5536b4f6b7d6c69dc7f6+50 (arva2-4zz18-c8uvwqdry4r8jao)
335 INFO Using collection cache size 256 MiB
336 INFO [container hasher-workflow.cwl] submitted container_request arva2-xvhdp-v1bkywd58gyocwm
337 INFO [container hasher-workflow.cwl] arva2-xvhdp-v1bkywd58gyocwm is Final
338 INFO Overall process status is success
339 INFO Final output collection d6c69a88147dde9d52a418d50ef788df+123
342 "basename": "hasher3.md5sum.txt",
344 "location": "keep:d6c69a88147dde9d52a418d50ef788df+123/hasher3.md5sum.txt",
348 INFO Final process status is success
352 h2(#post_install). After the installation
354 As part of the operation of @installer.sh@, it automatically creates a @git@ repository with your configuration templates. You should retain this repository but be aware that it contains sensitive information (passwords and tokens used by the Arvados services).
356 As described in "Iterating on config changes":#iterating you may use @installer.sh deploy@ to re-run the Salt to deploy configuration changes and upgrades. However, be aware that the configuration templates created for you by @installer.sh@ are a snapshot which are not automatically kept up to date.
358 When deploying upgrades, consult the "Arvados upgrade notes":{{site.baseurl}}/admin/upgrading.html to see if changes need to be made to the configuration file template in @local_config_dir/pillars/arvados.sls@.
360 See "Maintenance and upgrading":{{site.baseurl}}/admin/maintenance-and-upgrading.html for more information.