16306: Merge branch 'master'
[arvados.git] / doc / install / salt-single-host.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Single host Arvados
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 # "Install Saltstack":#saltstack
13 # "Single host install using the provision.sh script":#single_host
14 # "Final steps":#final_steps
15 ## "DNS configuration":#dns_configuration
16 ## "Install root certificate":#ca_root_certificate
17 # "Initial user and login":#initial_user
18 # "Test the installed cluster running a simple workflow":#test_install
19
20 h2(#saltstack). Install Saltstack
21
22 If you already have a Saltstack environment you can skip this section.
23
24 The simplest way to get Salt up and running on a node is to use the bootstrap script they provide:
25
26 <notextile>
27 <pre><code>curl -L https://bootstrap.saltstack.com -o /tmp/bootstrap_salt.sh
28 sudo sh /tmp/bootstrap_salt.sh -XUdfP -x python3
29 </code></pre>
30 </notextile>
31
32 For more information check "Saltstack's documentation":https://docs.saltstack.com/en/latest/topics/installation/index.html
33
34 h2(#single_host). Single host install using the provision.sh script
35
36 This is a package-based installation method. The Salt scripts are available from the "tools/salt-install":https://github.com/arvados/arvados/tree/master/tools/salt-install directory in the Arvados git repository.
37
38 Use the @provision.sh@ script to deploy Arvados, which is implemented with the @arvados-formula@ in a Saltstack master-less setup:
39
40 * edit the variables at the very beginning of the file,
41 * run the script as root
42 * wait for it to finish
43
44 This will install all the main Arvados components to get you up and running. The whole installation procedure takes somewhere between 15 to 60 minutes, depending on the host and your network bandwidth. On a virtual machine with 1 core and 1 GB RAM, it takes ~25 minutes to do the initial install.
45
46 If everything goes OK, you'll get some final lines stating something like:
47
48 <notextile>
49 <pre><code>arvados: Succeeded: 109 (changed=9)
50 arvados: Failed:      0
51 </code></pre>
52 </notextile>
53
54 h2(#final_steps). Final configuration steps
55
56 h3(#dns_configuration). DNS configuration
57
58 After the setup is done, you need to set up your DNS to be able to access the cluster.
59
60 The simplest way to do this is to edit your @/etc/hosts@ file (as root):
61
62 <notextile>
63 <pre><code>export CLUSTER="arva2"
64 export DOMAIN="arv.local"
65 export HOST_IP="127.0.0.2"    # This is valid either if installing in your computer directly
66                               # or in a Vagrant VM. If you're installing it on a remote host
67                               # just change the IP to match that of the host.
68 echo "${HOST_IP} api keep keep0 collections download ws workbench workbench2 ${CLUSTER}.${DOMAIN} api.${CLUSTER}.${DOMAIN} keep.${CLUSTER}.${DOMAIN} keep0.${CLUSTER}.${DOMAIN} collections.${CLUSTER}.${DOMAIN} download.${CLUSTER}.${DOMAIN} ws.${CLUSTER}.${DOMAIN} workbench.${CLUSTER}.${DOMAIN} workbench2.${CLUSTER}.${DOMAIN}" >> /etc/hosts
69 </code></pre>
70 </notextile>
71
72 h3(#ca_root_certificate). Install root certificate
73
74 Arvados uses SSL to encrypt communications. Its UI uses AJAX which will silently fail if the certificate is not valid or signed by an unknown Certification Authority.
75
76 For this reason, the @arvados-formula@ has a helper state to create a root certificate to authorize Arvados services. The @provision.sh@ script will leave a copy of the generated CA's certificate (@arvados-snakeoil-ca.pem@) in the script's directory so you can add it to your workstation.
77
78 Installing the root certificate into your web browser will prevent security errors when accessing Arvados services with your web browser.
79
80 # Go to the certificate manager in your browser.
81 #* In Chrome, this can be found under "Settings &rarr; Advanced &rarr; Manage Certificates" or by entering @chrome://settings/certificates@ in the URL bar.
82 #* In Firefox, this can be found under "Preferences &rarr; Privacy & Security" or entering @about:preferences#privacy@ in the URL bar and then choosing "View Certificates...".
83 # Select the "Authorities" tab, then press the "Import" button.  Choose @arvados-snakeoil-ca.pem@
84
85 The certificate will be added under the "Arvados Formula".
86
87 To access your Arvados instance using command line clients (such as arv-get and arv-put) without security errors, install the certificate into the OS certificate storage.
88
89 * On Debian/Ubuntu:
90
91 <notextile>
92 <pre><code>cp arvados-root-cert.pem /usr/local/share/ca-certificates/
93 /usr/sbin/update-ca-certificates
94 </code></pre>
95 </notextile>
96
97 * On CentOS:
98
99 <notextile>
100 <pre><code>cp arvados-root-cert.pem /etc/pki/ca-trust/source/anchors/
101 /usr/bin/update-ca-trust
102 </code></pre>
103 </notextile>
104
105 h2(#initial_user). Initial user and login
106
107 At this point you should be able to log into the Arvados cluster.
108
109 If you changed nothing in the @provision.sh@ script, the initial URL will be:
110
111 * https://workbench.arva2.arv.local
112
113 or, in general, the url format will be:
114
115 * https://workbench.@<cluster>.<domain>@
116
117 By default, the provision script creates an initial user for testing purposes. This user is configured as administrator of the newly created cluster.
118
119 Assuming you didn't change these values in the @provision.sh@ script, the initial credentials are:
120
121 * User: 'admin'
122 * Password: 'password'
123 * Email: 'admin@arva2.arv.local'
124
125 h2(#test_install). Test the installed cluster running a simple workflow
126
127 The @provision.sh@ script saves a simple example test workflow in the @/tmp/cluster_tests@. If you want to run it, just change to that directory and run:
128
129 <notextile>
130 <pre><code>cd /tmp/cluster_tests
131 ./run-test.sh
132 </code></pre>
133 </notextile>
134
135 It will create a test user, upload a small workflow and run it. If everything goes OK, the output should similar to this (some output was shortened for clarity):
136
137 <notextile>
138 <pre><code>Creating Arvados Standard Docker Images project
139 Arvados project uuid is 'arva2-j7d0g-0prd8cjlk6kfl7y'
140 {
141  ...
142  "uuid":"arva2-o0j2j-n4zu4cak5iifq2a",
143  "owner_uuid":"arva2-tpzed-000000000000000",
144  ...
145 }
146 Uploading arvados/jobs' docker image to the project
147 2.1.1: Pulling from arvados/jobs
148 8559a31e96f4: Pulling fs layer
149 ...
150 Status: Downloaded newer image for arvados/jobs:2.1.1
151 docker.io/arvados/jobs:2.1.1
152 2020-11-23 21:43:39 arvados.arv_put[32678] INFO: Creating new cache file at /home/vagrant/.cache/arvados/arv-put/c59256eda1829281424c80f588c7cc4d
153 2020-11-23 21:43:46 arvados.arv_put[32678] INFO: Collection saved as 'Docker image arvados jobs:2.1.1 sha256:0dd50'
154 arva2-4zz18-1u5pvbld7cvxuy2
155 Creating initial user ('admin')
156 Setting up user ('admin')
157 {
158  "items":[
159   {
160    ...
161    "owner_uuid":"arva2-tpzed-000000000000000",
162    ...
163    "uuid":"arva2-o0j2j-1ownrdne0ok9iox"
164   },
165   {
166    ...
167    "owner_uuid":"arva2-tpzed-000000000000000",
168    ...
169    "uuid":"arva2-o0j2j-1zbeyhcwxc1tvb7"
170   },
171   {
172    ...
173    "email":"admin@arva2.arv.local",
174    ...
175    "owner_uuid":"arva2-tpzed-000000000000000",
176    ...
177    "username":"admin",
178    "uuid":"arva2-tpzed-3wrm93zmzpshrq2",
179    ...
180   }
181  ],
182  "kind":"arvados#HashList"
183 }
184 Activating user 'admin'
185 {
186  ...
187  "email":"admin@arva2.arv.local",
188  ...
189  "username":"admin",
190  "uuid":"arva2-tpzed-3wrm93zmzpshrq2",
191  ...
192 }
193 Running test CWL workflow
194 INFO /usr/bin/cwl-runner 2.1.1, arvados-python-client 2.1.1, cwltool 3.0.20200807132242
195 INFO Resolved 'hasher-workflow.cwl' to 'file:///tmp/cluster_tests/hasher-workflow.cwl'
196 ...
197 INFO Using cluster arva2 (https://arva2.arv.local:8443/)
198 INFO Upload local files: "test.txt"
199 INFO Uploaded to ea34d971b71d5536b4f6b7d6c69dc7f6+50 (arva2-4zz18-c8uvwqdry4r8jao)
200 INFO Using collection cache size 256 MiB
201 INFO [container hasher-workflow.cwl] submitted container_request arva2-xvhdp-v1bkywd58gyocwm
202 INFO [container hasher-workflow.cwl] arva2-xvhdp-v1bkywd58gyocwm is Final
203 INFO Overall process status is success
204 INFO Final output collection d6c69a88147dde9d52a418d50ef788df+123
205 {
206     "hasher_out": {
207         "basename": "hasher3.md5sum.txt",
208         "class": "File",
209         "location": "keep:d6c69a88147dde9d52a418d50ef788df+123/hasher3.md5sum.txt",
210         "size": 95
211     }
212 }
213 INFO Final process status is success
214 </code></pre>
215 </notextile>