Merge branch 'master' into 15572-new-install-docs
[arvados.git] / doc / install / install-workbench2-app.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install Workbench2 (beta)
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 # "Update config.yml":#update-config
13 # "Update Nginx configuration":#update-nginx
14 # "Install arvados-workbench2":#install-packages
15 # "Restart the API server and controller":#restart-api
16 # "Confirm working installation":#confirm-working
17 # "Trusted client setting":#trusted_client
18
19 Workbench2 is the web-based user interface for Arvados.
20
21 {% include 'notebox_begin' %}
22 Workbench2 is the replacement for Arvados Workbench. Workbench2 is currently in <i>beta</i>, it is not yet feature complete.
23 {% include 'notebox_end' %}
24
25 h2(#configure). Update config.yml
26
27 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
28
29 <notextile>
30 <pre><code>    Services:
31       Workbench2:
32         ExternalURL: <span class="userinput">"https://workbench2.ClustedID.example.com"</span>
33 </code></pre>
34 </notextile>
35
36 h2. Vocabulary configuration (optional)
37
38 Workbench2 can load a vocabulary file which lists available metadata properties for groups and collections.  To configure the property vocabulary definition, please visit the "Workbench2 Vocabulary Format":{{site.baseurl}}/admin/workbench2-vocabulary.html page in the Admin section.
39
40 h2(#update-nginx). Update Nginx configuration
41
42 Workbench2 does not require its own database. It is a set of html, javascript and css files that are served as static files from Nginx.
43
44 Use a text editor to create a new file @/etc/nginx/conf.d/arvados-workbench2.conf@ with the following configuration.  Options that need attention are marked with "TODO".
45
46 <notextile>
47 <pre><code>server {
48   listen       <span class="userinput">[your public IP address]</span>:443 ssl;
49   server_name  workbench2.<span class="userinput">ClusterID.example.com</span>;
50
51   ssl on;
52   ssl_certificate     <span class="userinput">/YOUR/PATH/TO/cert.pem</span>;
53   ssl_certificate_key <span class="userinput">/YOUR/PATH/TO/cert.key</span>;
54
55   index  index.html;
56
57   # Workbench2 uses a call to /config.json to bootstrap itself and talk to the desired API server
58   location /config.json {
59     return 200 '{ "API_HOST": "<span class="userinput">ClusterID.example.com</span>" }';
60   }
61
62   location / {
63     root      /var/www/arvados-workbench2/workbench2;
64     index     index.html;
65     try_files $uri $uri/ /index.html;
66     if (-f $document_root/maintenance.html) {
67       return 503;
68     }
69   }
70 }
71 </code></pre>
72 </notextile>
73
74 h2(#install-packages). Install arvados-workbench2
75
76 h3. Centos 7
77
78 <notextile>
79 <pre><code># <span class="userinput">yum install arvados-workbench2</span>
80 </code></pre>
81 </notextile>
82
83 h3. Debian and Ubuntu
84
85 <notextile>
86 <pre><code># <span class="userinput">apt-get --no-install-recommends install arvados-workbench2</span>
87 </code></pre>
88 </notextile>
89
90 h2(#restart-api). Restart the API server and controller
91
92 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.
93
94 <notextile>
95 <pre><code># <span class="userinput">systemctl restart nginx arvados-controller</span>
96 </code></pre>
97 </notextile>
98
99 h2(#confirm-working). Confirm working installation
100
101 Visit @https://workbench2.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.
102
103 h2(#trusted_client). Trusted client flag
104
105 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.)
106
107 In the <strong>API server</strong> project root, start the Rails console.  {% include 'install_rails_command' %}
108
109 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:
110
111 <notextile><pre><code>irb(main):001:0&gt; <span class="userinput">wb = ApiClient.all.last; [wb.url_prefix, wb.created_at]</span>
112 =&gt; ["https://workbench.example.com/", Sat, 19 Apr 2014 03:35:12 UTC +00:00]
113 irb(main):002:0&gt; <span class="userinput">include CurrentApiClient</span>
114 =&gt; true
115 irb(main):003:0&gt; <span class="userinput">act_as_system_user do wb.update_attributes!(is_trusted: true) end</span>
116 =&gt; true
117 </code></pre>
118 </notextile>