3 navsection: installguide
4 title: Install Workbench
7 Copyright (C) The Arvados Authors. All rights reserved.
9 SPDX-License-Identifier: CC-BY-SA-3.0
12 # "Install dependencies":#dependencies
13 # "Update config.yml":#update-config
14 # "Update Nginx configuration":#update-nginx
15 # "Install arvados-workbench":#install-packages
16 # "Restart the API server and controller":#restart-api
17 # "Confirm working installation":#confirm-working
18 # "Trusted client setting":#trusted_client
20 h2(#dependencies). Install dependencies
22 # "Install Ruby and Bundler":ruby.html
23 # "Install nginx":nginx.html
24 # "Install Phusion Passenger":https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/install_passenger_main.html
26 h2(#configure). Update config.yml
28 Edit @/etc/arvados/config.yml@ to set the keys below. The full set of configuration options are in the "Workbench section of config.yml":{{site.baseurl}}/admin/config.html
33 ExternalURL: <span class="userinput">"https://workbench.ClustedID.example.com"</span>
35 SecretKeyBase: <span class="userinput">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</span>
37 AutoAdminFirstUser: true
41 This application needs a secret token. Generate a new secret:
44 <pre><code>~$ <span class="userinput">ruby -e 'puts rand(2**400).to_s(36)'</span>
45 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
49 Then put that value in the @Workbench.SecretKeyBase@ field.
51 You probably want to enable @Users.AutoAdminFirstUser@ . The first user to log in when no other admin user exists will automatically be made an admin.
53 h2(#update-nginx). Update nginx configuration
55 Use a text editor to create a new file @/etc/nginx/conf.d/arvados-workbench.conf@ with the following configuration. Options that need attention are marked with "TODO".
59 listen <span class="userinput">[your public IP address]</span>:443 ssl;
60 server_name workbench.<span class="userinput">ClusterID.example.com</span>;
63 ssl_certificate <span class="userinput">/YOUR/PATH/TO/cert.pem</span>;
64 ssl_certificate_key <span class="userinput">/YOUR/PATH/TO/cert.key</span>;
66 root /var/www/arvados-workbench/current/public;
70 # If you're using RVM, uncomment the line below.
71 #passenger_ruby /usr/local/rvm/wrappers/default/ruby;
73 # `client_max_body_size` should match the corresponding setting in
74 # the API.MaxRequestSize and Controller's server's Nginx configuration.
75 client_max_body_size 128m;
80 h2(#install-packages). Install arvados-workbench
85 <pre><code># <span class="userinput">yum install arvados-workbench</span>
92 <pre><code># <span class="userinput">apt-get --no-install-recommends install arvados-workbench</span>
96 h2(#restart-api). Restart the API server and controller
98 After adding Workbench to the Services section, make sure the cluster config file is up to date on the API server host, and restart the API server and controller processes to ensure the changes are applied.
101 <pre><code># <span class="userinput">systemctl restart nginx arvados-controller</span>
105 h2(#confirm-working). Confirm working installation
107 Visit @https://workbench.ClusterID.example.com@ in a browser. You should be able to log in using the login method you configured in the previous step. If @Users.AutoAdminFirstUser@ is true, you will be an admin user.
109 h2(#trusted_client). Trusted client flag
111 Log in to Workbench once to ensure that the Arvados API server has a record of the Workbench client. (It's OK if Workbench says your account hasn't been activated yet. We'll deal with that next.)
113 In the <strong>API server</strong> project root, start the Rails console. {% include 'install_rails_command' %}
115 At the console, enter the following commands to locate the ApiClient record for your Workbench installation (typically, while you're setting this up, the @last@ one in the database is the one you want), then set the @is_trusted@ flag for the appropriate client record:
117 <notextile><pre><code>irb(main):001:0> <span class="userinput">wb = ApiClient.all.last; [wb.url_prefix, wb.created_at]</span>
118 => ["https://workbench.example.com/", Sat, 19 Apr 2014 03:35:12 UTC +00:00]
119 irb(main):002:0> <span class="userinput">include CurrentApiClient</span>
121 irb(main):003:0> <span class="userinput">act_as_system_user do wb.update_attributes!(is_trusted: true) end</span>