From: Tom Clegg Date: Wed, 3 Apr 2019 15:39:47 +0000 (-0400) Subject: 14796: Add arvados-dispatch-cloud (experimental) to install docs. X-Git-Tag: 1.4.0~80^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/3946324e96170df9a5e62d90af5d3783654d29b6 14796: Add arvados-dispatch-cloud (experimental) to install docs. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/doc/_config.yml b/doc/_config.yml index 1e17d04706..a5b53442ca 100644 --- a/doc/_config.yml +++ b/doc/_config.yml @@ -212,6 +212,8 @@ navbar: - install/crunch2-slurm/install-test.html.textile.liquid - install/install-nodemanager.html.textile.liquid - install/install-compute-ping.html.textile.liquid + - Containers API support on cloud (experimental): + - install/install-dispatch-cloud.html.textile.liquid - Jobs API support (deprecated): - install/install-crunch-dispatch.html.textile.liquid - install/install-compute-node.html.textile.liquid diff --git a/doc/install/install-dispatch-cloud.html.textile.liquid b/doc/install/install-dispatch-cloud.html.textile.liquid new file mode 100644 index 0000000000..54c0ea3b45 --- /dev/null +++ b/doc/install/install-dispatch-cloud.html.textile.liquid @@ -0,0 +1,168 @@ +--- +layout: default +navsection: installguide +title: Install the cloud dispatcher + +... +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} + +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. + +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. + +*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@. + + +
~$ sudo systemctl --now disable crunch-dispatch-slurm
+~$ sudo apt-get remove crunch-dispatch-slurm
+
+
+ +h2. Create a dispatcher token + +If you haven't already done so, create an Arvados superuser token to use as SystemRootToken in your cluster config file. + +{% include 'create_superuser_token' %} + +h2. Create a private key + +Generate an SSH private key with no passphrase. Save it in the cluster configuration file (see @PrivateKey@ in the example below). + + +
~$ ssh-keygen -N '' -f ~/.ssh/id_dispatcher
+Generating public/private rsa key pair.
+Your identification has been saved in /home/user/.ssh/id_dispatcher.
+Your public key has been saved in /home/user/.ssh/id_dispatcher.pub.
+The key fingerprint is:
+[...]
+~$ cat ~/.ssh/id_dispatcher
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAqXoCzcOBkFQ7w4dvXf9B++1ctgZRqEbgRYL3SstuMV4oawks
+ttUuxJycDdsPmeYcHsKo8vsEZpN6iYsX6ZZzhkO5nEayUTU8sBjmg1ZCTo4QqKXr
+...
+oFyAjVoexx0RBcH6BveTfQtJKbktP1qBO4mXo2dP0cacuZEtlAqW9Eb06Pvaw/D9
+foktmqOY8MyctzFgXBpGTxPliGjqo8OkrOyQP2g+FL7v+Km31Xs61P8=
+-----END RSA PRIVATE KEY-----
+
+
+ +You can delete the key files after you have copied the private key to your configuration file. + + +
~$ rm ~/.ssh/id_dispatcher ~/.ssh/id_dispatcher.pub
+
+
+ +h2. Configure the dispatcher + +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. + + +
Clusters:
+  uuid_prefix:
+    ManagementToken: xyzzy
+    SystemRootToken: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+    NodeProfiles:
+      # The key "apiserver" corresponds to ARVADOS_NODE_PROFILE in environment file (see below).
+      apiserver:
+        arvados-dispatch-cloud:
+          Listen: ":9006"
+    Services:
+      Controller:
+        ExternalURL: "https://uuid_prefix.arvadosapi.com"
+    CloudVMs:
+      # BootProbeCommand is a shell command that succeeds when an instance is ready for service
+      BootProbeCommand: "systemctl status docker"
+      ImageID: "https://zzzzzzzz.blob.core.windows.net/system/Microsoft.Compute/Images/images/zzzzz-compute-osDisk.55555555-5555-5555-5555-555555555555.vhd"
+      Driver: azure
+      DriverParameters:
+        SubscriptionID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+        ClientID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+        ClientSecret: 2WyXt0XFbEtutnf2hp528t6Wk9S5bOHWkRaaWwavKQo=
+        TenantID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
+        CloudEnvironment: AzurePublicCloud
+        ResourceGroup: zzzzz
+        Location: centralus
+        Network: zzzzz
+        Subnet: zzzzz-subnet-private
+        StorageAccount: example
+        BlobContainer: vhds
+        DeleteDanglingResourcesAfter: 20s
+        AdminUsername: arvados
+    Dispatch:
+      PrivateKey: |
+        -----BEGIN RSA PRIVATE KEY-----
+        MIIEpQIBAAKCAQEAqXoCzcOBkFQ7w4dvXf9B++1ctgZRqEbgRYL3SstuMV4oawks
+        ttUuxJycDdsPmeYcHsKo8vsEZpN6iYsX6ZZzhkO5nEayUTU8sBjmg1ZCTo4QqKXr
+        FJ+amZ7oYMDof6QEdwl6KNDfIddL+NfBCLQTVInOAaNss7GRrxLTuTV7HcRaIUUI
+        jYg0Ibg8ZZTzQxCvFXXnjseTgmOcTv7CuuGdt91OVdoq8czG/w8TwOhymEb7mQlt
+        lXuucwQvYgfoUgcnTgpJr7j+hafp75g2wlPozp8gJ6WQ2yBWcfqL2aw7m7Ll88Nd
+        [...]
+        oFyAjVoexx0RBcH6BveTfQtJKbktP1qBO4mXo2dP0cacuZEtlAqW9Eb06Pvaw/D9
+        foktmqOY8MyctzFgXBpGTxPliGjqo8OkrOyQP2g+FL7v+Km31Xs61P8=
+        -----END RSA PRIVATE KEY-----
+    InstanceTypes:
+      x1md:
+        ProviderType: x1.medium
+        VCPUs: 8
+        RAM: 64GiB
+        IncludedScratch: 64GB
+        Price: 0.62
+      x1lg:
+        ProviderType: x1.large
+        VCPUs: 16
+        RAM: 128GiB
+        IncludedScratch: 128GB
+        Price: 1.23
+
+
+ +Create the host configuration file @/etc/arvados/environment@. + + +
ARVADOS_NODE_PROFILE=apiserver
+
+
+ +h2. Install the dispatcher + +First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos. + +On Red Hat-based systems: + + +
~$ sudo yum install arvados-dispatch-cloud
+~$ sudo systemctl enable arvados-dispatch-cloud
+
+
+ +On Debian-based systems: + + +
~$ sudo apt-get install arvados-dispatch-cloud
+
+
+ +{% include 'notebox_begin' %} + +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. + +{% include 'notebox_end' %} + +h2. Verify the dispatcher is running + +Use your ManagementToken to test the dispatcher's metrics endpoint. + + +
~$ token="xyzzy"
+~$ curl -H "Authorization: Bearer $token" http://localhost:9006/metrics
+# HELP arvados_dispatchcloud_containers_running Number of containers reported running by cloud VMs.
+# TYPE arvados_dispatchcloud_containers_running gauge
+arvados_dispatchcloud_containers_running 0
+[...]
+
+