3 navsection: installguide
4 title: Install a shell server
7 There is nothing inherently special about an Arvados shell server. It is just a GNU/Linux machine with Arvados utilites and SDKs installed. For optimal performance, the Arvados shell server should be on the same LAN as the Arvados cluster, but that is not required.
11 Please follow the "API token guide":../user/reference/api-tokens.html to get API tokens for your Arvados account and install them on your shell server. We will use those tokens to test the SDKs as we install them.
13 h2. Install the Ruby SDK and utilities
15 First, install the curl development libraries necessary to build the Arvados Ruby SDK. On Debian-based systems:
18 <pre><code>~$ <span class="userinput">sudo apt-get install libcurl4-openssl-dev</span>
22 On Red Hat-based systems:
25 <pre><code>~$ <span class="userinput">sudo yum install libcurl-devel</span>
29 Next, install the arvados-cli Ruby gem. If you're using RVM:
32 <pre><code>~$ <span class="userinput">sudo /usr/local/rvm/bin/rvm-exec default gem install arvados-cli</span>
36 If you're not using RVM:
39 <pre><code>~$ <span class="userinput">sudo gem install arvados-cli</span>
43 h2. Install the Python SDK and utilities
45 {% include 'note_python27_sc' %}
47 On Debian-based systems:
50 <pre><code>~$ <span class="userinput">sudo apt-get install python-arvados-python-client python-arvados-fuse crunchrunner</span>
54 On Red Hat-based systems:
57 <pre><code>~$ <span class="userinput">sudo yum install python27-python-arvados-python-client python27-python-arvados-fuse crunchrunner</span>
61 h2. Install Git and curl
63 {% include 'install_git_curl' %}
67 Configure git to use the ARVADOS_API_TOKEN environment variable to authenticate to arv-git-httpd. We use the @--system@ flag so it takes effect for all current and future user accounts. It does not affect git's behavior when connecting to other git servers.
71 <code>~$ <span class="userinput">sudo git config --system 'credential.https://git.<b>uuid_prefix.your.domain</b>/.username' none</span></code>
72 <code>~$ <span class="userinput">sudo git config --system 'credential.https://git.<b>uuid_prefix.your.domain</b>/.helper' '!cred(){ cat >/dev/null; if [ "$1" = get ]; then echo password=$ARVADOS_API_TOKEN; fi; };cred'</span></code>
76 h2. Install arvados-login-sync
78 This program makes it possible for Arvados users to log in to the shell server -- subject to permissions assigned by the Arvados administrator -- using the SSH keys they upload to Workbench. It sets up login accounts, updates group membership, and adds users' public keys to the appropriate @authorized_keys@ files.
80 Create an Arvados virtual_machine object representing this shell server. This will assign a UUID.
84 <code>apiserver:~$ <span class="userinput">arv --format=uuid virtual_machine create --virtual-machine '{"hostname":"<b>your.shell.server.hostname</b>"}'</span>
85 zzzzz-2x53u-zzzzzzzzzzzzzzz</code>
89 Create a token that is allowed to read login information for this VM.
93 <code>apiserver:~$ <span class="userinput">arv api_client_authorization create --api-client-authorization '{"scopes":["GET /arvados/v1/virtual_machines/<b>zzzzz-2x53u-zzzzzzzzzzzzzzz</b>/logins"]}'
96 "api_token":"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
102 Note the UUID and the API token output by the above commands: you will need them in a minute.
104 Install the arvados-login-sync program.
110 <code>shellserver:~$ <span class="userinput">sudo -i `which rvm-exec` default gem install arvados-login-sync</span></code>
114 If you're not using RVM:
118 <code>shellserver:~$ <span class="userinput">sudo -i gem install arvados-login-sync</span></code>
124 On Debian-based systems:
127 <pre><code>~$ <span class="userinput">sudo apt-get install cron</span>
131 On Red Hat-based systems:
134 <pre><code>~$ <span class="userinput">sudo yum install cron</span>
138 Configure cron to run the @arvados-login-sync@ program every 2 minutes.
144 <code>shellserver:~$ <span class="userinput">sudo bash -c 'umask 077; tee /etc/cron.d/arvados-login-sync' <<'EOF'
145 ARVADOS_API_HOST="<strong>uuid_prefix.your.domain</strong>"
146 ARVADOS_API_TOKEN="<strong>the_token_you_created_above</strong>"
147 ARVADOS_VIRTUAL_MACHINE_UUID="<strong>zzzzz-2x53u-zzzzzzzzzzzzzzz</strong>"
148 */2 * * * * root /usr/local/rvm/bin/rvm-exec default arvados-login-sync
153 If you're not using RVM:
157 <code>shellserver:~$ <span class="userinput">sudo bash -c 'umask 077; tee /etc/cron.d/arvados-login-sync' <<'EOF'
158 ARVADOS_API_HOST="<strong>uuid_prefix.your.domain</strong>"
159 ARVADOS_API_TOKEN="<strong>the_token_you_created_above</strong>"
160 ARVADOS_VIRTUAL_MACHINE_UUID="<strong>zzzzz-2x53u-zzzzzzzzzzzzzzz</strong>"
161 */2 * * * * root arvados-login-sync
166 A user should be able to log in to the shell server when the following conditions are satisfied:
167 * The user has uploaded an SSH public key: Workbench → Account menu → "SSH keys" item → "Add new SSH key" button.
168 * As an admin user, you have given the user permission to log in: Workbench → Admin menu → "Users" item → "Show" button → "Admin" tab → "Setup shell account" button.
169 * Two minutes have elapsed since the above conditions were satisfied, and the cron job has had a chance to run.