14796: Add arvados-dispatch-cloud (experimental) to install docs.
[arvados.git] / doc / install / install-dispatch-cloud.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install the cloud dispatcher
5
6 ...
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 The cloud dispatch service is an *experimental* service for running containers on cloud VMs. It eliminates the need for SLURM, Node Manager, and SLURM dispatcher. It works with Microsoft Azure and Amazon EC2; future versions will also support Google Compute Engine.
14
15 The cloud dispatch service can run on any node that can connect to the Arvados API service, the cloud provider's API, and the SSH service on cloud VMs.  It is not resource-intensive, so you can run it on the API server node.
16
17 *Only one dispatch process should be running at a time.* If you are migrating a system that currently runs @crunch-dispatch-slurm@, it is safest to remove the @crunch-dispatch-slurm@ service entirely before installing @arvados-dispatch-cloud@.
18
19 <notextile>
20 <pre><code>~$ <span class="userinput">sudo systemctl --now disable crunch-dispatch-slurm</span>
21 ~$ <span class="userinput">sudo apt-get remove crunch-dispatch-slurm</span>
22 </code></pre>
23 </notextile>
24
25 h2. Create a dispatcher token
26
27 If you haven't already done so, create an Arvados superuser token to use as SystemRootToken in your cluster config file.
28
29 {% include 'create_superuser_token' %}
30
31 h2. Create a private key
32
33 Generate an SSH private key with no passphrase. Save it in the cluster configuration file (see @PrivateKey@ in the example below).
34
35 <notextile>
36 <pre><code>~$ <span class="userinput">ssh-keygen -N '' -f ~/.ssh/id_dispatcher</span>
37 Generating public/private rsa key pair.
38 Your identification has been saved in /home/user/.ssh/id_dispatcher.
39 Your public key has been saved in /home/user/.ssh/id_dispatcher.pub.
40 The key fingerprint is:
41 [...]
42 ~$ <span class="userinput">cat ~/.ssh/id_dispatcher</span>
43 -----BEGIN RSA PRIVATE KEY-----
44 MIIEpQIBAAKCAQEAqXoCzcOBkFQ7w4dvXf9B++1ctgZRqEbgRYL3SstuMV4oawks
45 ttUuxJycDdsPmeYcHsKo8vsEZpN6iYsX6ZZzhkO5nEayUTU8sBjmg1ZCTo4QqKXr
46 ...
47 oFyAjVoexx0RBcH6BveTfQtJKbktP1qBO4mXo2dP0cacuZEtlAqW9Eb06Pvaw/D9
48 foktmqOY8MyctzFgXBpGTxPliGjqo8OkrOyQP2g+FL7v+Km31Xs61P8=
49 -----END RSA PRIVATE KEY-----
50 </code></pre>
51 </notextile>
52
53 You can delete the key files after you have copied the private key to your configuration file.
54
55 <notextile>
56 <pre><code>~$ <span class="userinput">rm ~/.ssh/id_dispatcher ~/.ssh/id_dispatcher.pub</span>
57 </code></pre>
58 </notextile>
59
60 h2. Configure the dispatcher
61
62 Add or update the following portions of your cluster configuration file, @/etc/arvados/config.yml@. Refer to "config.defaults.yml":https://dev.arvados.org/projects/arvados/repository/revisions/13996-new-api-config/entry/lib/config/config.defaults.yml for information about additional configuration options.
63
64 <notextile>
65 <pre><code>Clusters:
66   <span class="userinput">uuid_prefix</span>:
67     ManagementToken: xyzzy
68     SystemRootToken: <span class="userinput">zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz</span>
69     NodeProfiles:
70       # The key "apiserver" corresponds to ARVADOS_NODE_PROFILE in environment file (see below).
71       apiserver:
72         arvados-dispatch-cloud:
73           Listen: ":9006"
74     Services:
75       Controller:
76         ExternalURL: "https://<span class="userinput">uuid_prefix.arvadosapi.com</span>"
77     CloudVMs:
78       # BootProbeCommand is a shell command that succeeds when an instance is ready for service
79       BootProbeCommand: "systemctl status docker"
80       ImageID: "https://zzzzzzzz.blob.core.windows.net/system/Microsoft.Compute/Images/images/zzzzz-compute-osDisk.55555555-5555-5555-5555-555555555555.vhd"
81       Driver: azure
82       DriverParameters:
83         SubscriptionID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
84         ClientID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
85         ClientSecret: 2WyXt0XFbEtutnf2hp528t6Wk9S5bOHWkRaaWwavKQo=
86         TenantID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
87         CloudEnvironment: AzurePublicCloud
88         ResourceGroup: zzzzz
89         Location: centralus
90         Network: zzzzz
91         Subnet: zzzzz-subnet-private
92         StorageAccount: example
93         BlobContainer: vhds
94         DeleteDanglingResourcesAfter: 20s
95         AdminUsername: arvados
96     Dispatch:
97       PrivateKey: |
98         -----BEGIN RSA PRIVATE KEY-----
99         MIIEpQIBAAKCAQEAqXoCzcOBkFQ7w4dvXf9B++1ctgZRqEbgRYL3SstuMV4oawks
100         ttUuxJycDdsPmeYcHsKo8vsEZpN6iYsX6ZZzhkO5nEayUTU8sBjmg1ZCTo4QqKXr
101         FJ+amZ7oYMDof6QEdwl6KNDfIddL+NfBCLQTVInOAaNss7GRrxLTuTV7HcRaIUUI
102         jYg0Ibg8ZZTzQxCvFXXnjseTgmOcTv7CuuGdt91OVdoq8czG/w8TwOhymEb7mQlt
103         lXuucwQvYgfoUgcnTgpJr7j+hafp75g2wlPozp8gJ6WQ2yBWcfqL2aw7m7Ll88Nd
104         [...]
105         oFyAjVoexx0RBcH6BveTfQtJKbktP1qBO4mXo2dP0cacuZEtlAqW9Eb06Pvaw/D9
106         foktmqOY8MyctzFgXBpGTxPliGjqo8OkrOyQP2g+FL7v+Km31Xs61P8=
107         -----END RSA PRIVATE KEY-----
108     InstanceTypes:
109       x1md:
110         ProviderType: x1.medium
111         VCPUs: 8
112         RAM: 64GiB
113         IncludedScratch: 64GB
114         Price: 0.62
115       x1lg:
116         ProviderType: x1.large
117         VCPUs: 16
118         RAM: 128GiB
119         IncludedScratch: 128GB
120         Price: 1.23
121 </code></pre>
122 </notextile>
123
124 Create the host configuration file @/etc/arvados/environment@.
125
126 <notextile>
127 <pre><code>ARVADOS_NODE_PROFILE=apiserver
128 </code></pre>
129 </notextile>
130
131 h2. Install the dispatcher
132
133 First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos.
134
135 On Red Hat-based systems:
136
137 <notextile>
138 <pre><code>~$ <span class="userinput">sudo yum install arvados-dispatch-cloud</span>
139 ~$ <span class="userinput">sudo systemctl enable arvados-dispatch-cloud</span>
140 </code></pre>
141 </notextile>
142
143 On Debian-based systems:
144
145 <notextile>
146 <pre><code>~$ <span class="userinput">sudo apt-get install arvados-dispatch-cloud</span>
147 </code></pre>
148 </notextile>
149
150 {% include 'notebox_begin' %}
151
152 The arvados-dispatch-cloud package includes configuration files for systemd. If you're using a different init system, configure a service to start and stop an @arvados-dispatch-cloud@ process as desired.
153
154 {% include 'notebox_end' %}
155
156 h2. Verify the dispatcher is running
157
158 Use your ManagementToken to test the dispatcher's metrics endpoint.
159
160 <notextile>
161 <pre><code>~$ <span class="userinput">token="xyzzy"</span>
162 ~$ <span class="userinput">curl -H "Authorization: Bearer $token" http://localhost:9006/metrics</span>
163 # HELP arvados_dispatchcloud_containers_running Number of containers reported running by cloud VMs.
164 # TYPE arvados_dispatchcloud_containers_running gauge
165 arvados_dispatchcloud_containers_running 0
166 [...]
167 </code></pre>
168 </notextile>