3 navsection: installguide
4 title: Set up a shell node
7 Copyright (C) The Arvados Authors. All rights reserved.
9 SPDX-License-Identifier: CC-BY-SA-3.0
12 # "Introduction":#introduction
13 # "Install Dependencies and SDKs":#dependencies
14 # "Install git and curl":#install-packages
15 # "Create record for VM":#vm-record
16 # "Install arvados-login-sync":#arvados-login-sync
17 # "Confirm working installation":#confirm-working
19 h2(#introduction). Introduction
21 Arvados support for shell nodes allows you to use Arvados permissions to grant Linux shell accounts to users.
23 A shell node runs the @arvados-login-sync@ service to manage user accounts, and typically has Arvados utilities and SDKs pre-installed. Users are allowed to log in and run arbitrary programs. For optimal performance, the Arvados shell server should be on the same LAN as the Arvados cluster.
25 Because Arvados @config.yml@ _contains secrets_ it should *not* be present on shell nodes.
27 Shell nodes should be separate virtual machines from the VMs running other Arvados services. You may choose to grant root access to users so that they can customize the node, for example, installing new programs. This has security considerations depending on whether a shell node is single-user or multi-user.
29 A single-user shell node should be set up so that it only stores Arvados access tokens that belong to that user. In that case, that user can be safely granted root access without compromising other Arvados users.
31 In the multi-user shell node case, a malicious user with @root@ access could access other user's Arvados tokens. Users should only be given @root@ access on a multi-user shell node if you would trust them to be Arvados administrators. Be aware that with access to the @docker@ daemon, it is trival to gain *root* access to any file on the system, so giving users @docker@ access should be considered equivalent to @root@ access.
33 h2(#dependencies). Install Dependencies and SDKs
35 # "Install Ruby and Bundler":ruby.html
36 # "Install the Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html
37 # "Install the FUSE driver":{{site.baseurl}}/sdk/fuse/install.html
38 # "Install the CLI":{{site.baseurl}}/sdk/cli/install.html
39 # "Install the R SDK":{{site.baseurl}}/sdk/R/index.html (optional)
40 # "Install Docker":install-docker.html (optional)
42 {% assign arvados_component = 'git curl' %}
44 {% include 'install_packages' %}
46 h2(#vm-record). Create record for VM
48 As an admin, create an Arvados virtual_machine object representing this shell server. This will return a uuid.
52 <code>apiserver:~$ <span class="userinput">arv --format=uuid virtual_machine create --virtual-machine '{"hostname":"<b>shell.ClusterID.example.com</b>"}'</span>
53 zzzzz-2x53u-zzzzzzzzzzzzzzz</code>
57 h2(#arvados-login-sync). Install arvados-login-sync
59 The @arvados-login-sync@ service makes it possible for Arvados users to log in to the shell server. It sets up login accounts, updates group membership, adds each user's SSH public keys to the @~/.ssh/authorized_keys@ file, and adds an Arvados token to @~/.config/arvados/settings.conf@ .
61 Install the @arvados-login-sync@ program from RubyGems.
65 <code>shellserver:# <span class="userinput">gem install arvados-login-sync</span></code>
69 h2(#arvados-login-sync). Run arvados-login-sync periodically
71 Create a cron job to run the @arvados-login-sync@ program every 2 minutes. This will synchronize user accounts.
73 If this is a single-user shell node, then @ARVADOS_API_TOKEN@ should be a token for that user. See "Create a token for a user":{{site.baseurl}}/admin/user-management-cli.html#create-token .
75 If this is a multi-user shell node, then @ARVADOS_API_TOKEN@ should be an administrator token such as the @SystemRootToken@. See discussion in the "introduction":#introduction about security on multi-user shell nodes.
77 Set @ARVADOS_VIRTUAL_MACHINE_UUID@ to the UUID from "Create record for VM":#vm-record
79 h3. Standalone cluster
83 <code>shellserver:# <span class="userinput">umask 0700; tee /etc/cron.d/arvados-login-sync <<EOF
84 ARVADOS_API_HOST="<strong>ClusterID.example.com</strong>"
85 ARVADOS_API_TOKEN="<strong>xxxxxxxxxxxxxxxxx</strong>"
86 ARVADOS_VIRTUAL_MACHINE_UUID="<strong>zzzzz-2x53u-zzzzzzzzzzzzzzz</strong>"
87 */2 * * * * root arvados-login-sync
92 h3. Part of a LoginCluster federation
94 If the cluster is part of a "federation with centralized user management":../admin/federation.html#LoginCluster , the login sync script needs to be given an admin token from the login cluster.
98 <code>shellserver:# <span class="userinput">umask 0700; tee /etc/cron.d/arvados-login-sync <<EOF
99 ARVADOS_API_HOST="<strong>ClusterID.example.com</strong>"
100 ARVADOS_API_TOKEN="<strong>yyyloginclusteradmintokenyyyy</strong>"
101 ARVADOS_VIRTUAL_MACHINE_UUID="<strong>zzzzz-2x53u-zzzzzzzzzzzzzzz</strong>"
102 */2 * * * * root arvados-login-sync
108 h2(#confirm-working). Confirm working installation
110 A user should be able to log in to the shell server when the following conditions are satisfied:
112 # As an admin user, you have given the user permission to log in using the Workbench → Admin menu → "Users" item → "Show" button → "Admin" tab → "Setup account" button.
113 # The cron job has run.
115 In order to log in via SSH, the user must also upload an SSH public key. Alternately, if configured, users can log in using "Webshell":install-webshell.html .
117 See also "how to add a VM login permission link at the command line":../admin/user-management-cli.html