3 navsection: installguide
4 title: Install the cloud dispatcher
7 Copyright (C) The Arvados Authors. All rights reserved.
9 SPDX-License-Identifier: CC-BY-SA-3.0
12 # "Introduction":#introduction
13 # "Create compute node VM image":#create-image
14 # "Update config.yml":#update-config
15 # "Install arvados-dispatch-cloud":#install-packages
16 # "Start the service":#start-service
17 # "Restart the API server and controller":#restart-api
18 # "Confirm working installation":#confirm-working
20 h2(#introduction). Introduction
22 The cloud dispatch service is for running containers on cloud VMs. It works with Microsoft Azure and Amazon EC2; future versions will also support Google Compute Engine.
24 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.
26 *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@.
29 <pre><code>~$ <span class="userinput">sudo systemctl --now disable crunch-dispatch-slurm</span>
30 ~$ <span class="userinput">sudo apt-get remove crunch-dispatch-slurm</span>
34 h2(#create-image). Create compute node VM image
36 Create a VM image following the steps "to set up a compute node":crunch2-slurm/install-compute-node.html
38 h2(#update-config). Update config.yml
40 h3. Create a private key
42 Generate an SSH private key with no passphrase. Save it in the cluster configuration file (see @PrivateKey@ in the example below).
45 <pre><code>~$ <span class="userinput">ssh-keygen -N '' -f ~/.ssh/id_dispatcher</span>
46 Generating public/private rsa key pair.
47 Your identification has been saved in /home/user/.ssh/id_dispatcher.
48 Your public key has been saved in /home/user/.ssh/id_dispatcher.pub.
49 The key fingerprint is:
51 ~$ <span class="userinput">cat ~/.ssh/id_dispatcher</span>
52 -----BEGIN RSA PRIVATE KEY-----
53 MIIEpQIBAAKCAQEAqXoCzcOBkFQ7w4dvXf9B++1ctgZRqEbgRYL3SstuMV4oawks
54 ttUuxJycDdsPmeYcHsKo8vsEZpN6iYsX6ZZzhkO5nEayUTU8sBjmg1ZCTo4QqKXr
56 oFyAjVoexx0RBcH6BveTfQtJKbktP1qBO4mXo2dP0cacuZEtlAqW9Eb06Pvaw/D9
57 foktmqOY8MyctzFgXBpGTxPliGjqo8OkrOyQP2g+FL7v+Km31Xs61P8=
58 -----END RSA PRIVATE KEY-----
62 You can delete the key files after you have copied the private key to your configuration file.
65 <pre><code>~$ <span class="userinput">rm ~/.ssh/id_dispatcher ~/.ssh/id_dispatcher.pub</span>
69 h3. Configure CloudVMs
71 Add or update the following portions of your cluster configuration file, @/etc/arvados/config.yml@. Refer to "config.defaults.yml":{{site.baseurl}}/admin/config.html for information about additional configuration options.
77 "http://localhost:9006": {}
80 # BootProbeCommand is a shell command that succeeds when an instance is ready for service
81 BootProbeCommand: "sudo systemctl status docker"
83 <b># --- driver-specific configuration goes here --- see Amazon and Azure examples below ---</b>
86 -----BEGIN RSA PRIVATE KEY-----
87 MIIEpQIBAAKCAQEAqXoCzcOBkFQ7w4dvXf9B++1ctgZRqEbgRYL3SstuMV4oawks
88 ttUuxJycDdsPmeYcHsKo8vsEZpN6iYsX6ZZzhkO5nEayUTU8sBjmg1ZCTo4QqKXr
89 FJ+amZ7oYMDof6QEdwl6KNDfIddL+NfBCLQTVInOAaNss7GRrxLTuTV7HcRaIUUI
90 jYg0Ibg8ZZTzQxCvFXXnjseTgmOcTv7CuuGdt91OVdoq8czG/w8TwOhymEb7mQlt
91 lXuucwQvYgfoUgcnTgpJr7j+hafp75g2wlPozp8gJ6WQ2yBWcfqL2aw7m7Ll88Nd
93 oFyAjVoexx0RBcH6BveTfQtJKbktP1qBO4mXo2dP0cacuZEtlAqW9Eb06Pvaw/D9
94 foktmqOY8MyctzFgXBpGTxPliGjqo8OkrOyQP2g+FL7v+Km31Xs61P8=
95 -----END RSA PRIVATE KEY-----
98 ProviderType: x1.medium
101 IncludedScratch: 64GB
104 ProviderType: x1.large
107 IncludedScratch: 128GB
112 Minimal configuration example for Amazon EC2:
115 <pre><code> Containers:
117 ImageID: ami-01234567890abcdef
120 AccessKeyID: EALMF21BJC7MKNF9FVVR
121 SecretAccessKey: yKJAPmoCQOMtYWzEUQ1tKTyrocTcbH60CRvGP3pM
124 SubnetID: subnet-0123abcd
127 AdminUsername: debian
131 Minimal configuration example for Azure:
134 <pre><code> Containers:
136 ImageID: "https://zzzzzzzz.blob.core.windows.net/system/Microsoft.Compute/Images/images/zzzzz-compute-osDisk.55555555-5555-5555-5555-555555555555.vhd"
139 SubscriptionID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
140 ClientID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
141 ClientSecret: 2WyXt0XFbEtutnf2hp528t6Wk9S5bOHWkRaaWwavKQo=
142 TenantID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
143 CloudEnvironment: AzurePublicCloud
147 Subnet: zzzzz-subnet-private
148 StorageAccount: example
150 DeleteDanglingResourcesAfter: 20s
151 AdminUsername: arvados
155 h3. Test your configuration
157 Run the @cloudtest@ tool to verify that your configuration works. This creates a new cloud VM, confirms that it boots correctly and accepts your configured SSH private key, and shuts it down.
160 <pre><code>~$ <span class="userinput">arvados-server cloudtest && echo "OK!"</span>
164 Refer to the "cloudtest tool documentation":../admin/cloudtest.html for more information.
166 {% assign arvados_component = 'arvados-dispatch-cloud' %}
168 {% include 'install_packages' %}
170 {% include 'start_service' %}
172 {% include 'restart_api' %}
174 h2(#confirm-working). Confirm working installation
176 On the dispatch node, start monitoring the arvados-dispatch-cloud logs:
179 <pre><code>~$ <span class="userinput">sudo journalctl -o cat -fu arvados-dispatch-cloud.service</span>
183 Submit a simple container request:
186 <pre><code>shell:~$ <span class="userinput">arv container_request create --container-request '{
188 "state": "Committed",
190 "container_image": "arvados/jobs:latest",
191 "command": ["echo", "Hello, Crunch!"],
192 "output_path": "/out",
199 "runtime_constraints": {
207 This command should return a record with a @container_uuid@ field. Once @arvados-dispatch-cloud@ polls the API server for new containers to run, you should see it dispatch that same container.
209 The @arvados-dispatch-cloud@ API a list of queued and running jobs. For example:
212 <pre><code>~$ <span class="userinput">curl ...</span>
216 When the container finishes, the dispatcher will log it.
218 After the container finishes, you can get the container record by UUID *from a shell server* to see its results:
221 <pre><code>shell:~$ <span class="userinput">arv get <b>zzzzz-dz642-hdp2vpu9nq14tx0</b></span>
225 "log":"a01df2f7e5bc1c2ad59c60a837e90dc6+166",
226 "output":"d41d8cd98f00b204e9800998ecf8427e+0",
233 You can use standard Keep tools to view the container's output and logs from their corresponding fields. For example, to see the logs from the collection referenced in the @log@ field:
236 <pre><code>~$ <span class="userinput">arv keep ls <b>a01df2f7e5bc1c2ad59c60a837e90dc6+166</b></span>
240 ~$ <span class="userinput">arv-get <b>a01df2f7e5bc1c2ad59c60a837e90dc6+166</b>/stdout.txt</span>
241 2016-08-05T13:53:06.201011Z Hello, Crunch!
245 If the container does not dispatch successfully, refer to the @arvados-dispatch-cloud@ logs for information about why it failed.