15067: Corrects vocabulary format documentation.
[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 Workbench2 is the web-based user interface for Arvados.
13
14 {% include 'notebox_begin' %}
15 Workbench2 is the replacement for Arvados Workbench. Workbench2 is currently in <i>beta</i>, it is not yet feature complete.
16 {% include 'notebox_end' %}
17
18 h2(#install_workbench). Install Workbench2 and dependencies
19
20 Workbench2 does not require its own database. It is a set of html, javascript and css files that are served as static files from a web server like Nginx or Apache2.
21
22 On a Debian-based system, install the following package:
23
24 <notextile>
25 <pre><code>~$ <span class="userinput">sudo apt-get install arvados-workbench2</span>
26 </code></pre>
27 </notextile>
28
29 On a Red Hat-based system, install the following package:
30
31 <notextile>
32 <pre><code>~$ <span class="userinput">sudo yum install arvados-workbench2</span>
33 </code></pre>
34 </notextile>
35
36 h2. Set up Web server
37
38 For best performance, we recommend you use Nginx as your Web server to serve Workbench2. Workbench2 consists entirely of static files. To do that:
39
40 <notextile>
41 <ol>
42 <li>Install Nginx</li>
43
44 <li><p>Edit the http section of your Nginx configuration to serve Workbench2's files. You might add a block like the following, adding SSL and logging parameters to taste:</p>
45
46 <pre><code>server {
47   listen       <span class="userinput">[your public IP address]</span>:443 ssl;
48   server_name  workbench2.<span class="userinput">uuid-prefix.your.domain</span>;
49
50   ssl on;
51   ssl_certificate     <span class="userinput">/YOUR/PATH/TO/cert.pem</span>;
52   ssl_certificate_key <span class="userinput">/YOUR/PATH/TO/cert.key</span>;
53
54   index  index.html;
55
56   # Workbench2 uses a call to /config.json to bootstrap itself and talk to the desired API server
57   location /config.json {
58     return 200 '{ "API_HOST": "<span class="userinput">uuid-prefix.your.domain</span>" }';
59   }
60
61   location / {
62     root      /var/www/arvados-workbench2/workbench2;
63     index     index.html;
64     try_files $uri $uri/ /index.html;
65     if (-f $document_root/maintenance.html) {
66       return 503;
67     }
68   }
69 }
70 </code></pre>
71 </li>
72
73 <li>Restart Nginx.</li>
74
75 </ol>
76 </notextile>
77
78 h2. Trusted client setting
79
80 Log in to Workbench2 once to ensure that the Arvados API server has a record of the Workbench2 client.
81
82 In the <strong>API server</strong> project root, start the Rails console.  {% include 'install_rails_command' %}
83
84 At the console, enter the following commands to locate the ApiClient record for your Workbench2 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:
85
86 <notextile><pre><code>irb(main):001:0&gt; <span class="userinput">wb = ApiClient.all.last; [wb.url_prefix, wb.created_at]</span>
87 =&gt; ["https://workbench2.<span class="userinput">uuid_prefix.your.domain</span>/", Sat, 20 Apr 2019 01:23:45 UTC +00:00]
88 irb(main):002:0&gt; <span class="userinput">include CurrentApiClient</span>
89 =&gt; true
90 irb(main):003:0&gt; <span class="userinput">act_as_system_user do wb.update_attributes!(is_trusted: true) end</span>
91 =&gt; true
92 </code></pre>
93 </notextile>
94
95 h2. Vocabulary configuration (optional)
96
97 To configure the property vocabulary definition, please visit the "Workbench2 Vocabulary Format":{{site.baseurl}}/admin/workbench2-vocabulary.html page on the Admin section.