2525: prompt example
[arvados.git] / doc / install / install-workbench-app.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Install the Arvados Workbench application
5 ...
6
7 h2. Prerequisites
8
9 # A GNU/linux (virtual) machine (can be shared with the API server)
10 # A hostname for your Workbench application
11
12 h2. Install dependencies
13
14 If you haven't already installed the API server on the same host:
15
16 * Install Ruby 2.1 and Bundler: see the "dependencies" and "Ruby" sections on the "API server installation page":install-api-server.html#dependencies for details.
17 * Omit postgresql. Workbench doesn't need its own database.
18
19 Install graphviz.
20
21 <notextile>
22 <pre><code>~$ <span class="userinput">sudo apt-get install graphviz</span>
23 </code></pre>
24 </notextile>
25
26 h2. Download the source tree
27
28 Please follow the instructions on the "Download page":https://arvados.org/projects/arvados/wiki/Download in the wiki.
29
30 The Workbench application is in @apps/workbench@ in the source tree.
31
32 h2. Install gem dependencies
33
34 <notextile>
35 <pre><code>~$ <span class="userinput">cd arvados/apps/workbench</span>
36 ~/arvados/apps/workbench$ <span class="userinput">bundle install</span>
37 </code></pre>
38 </notextile>
39
40 Alternatively, if you don't have sudo/root privileges on the host, install the gems in your own directory instead of installing them system-wide:
41
42 <notextile>
43 <pre><code>~$ <span class="userinput">cd arvados/apps/workbench</span>
44 ~/arvados/apps/workbench$ <span class="userinput">bundle install --path=vendor/bundle</span>
45 </code></pre></notextile>
46
47 h2. Configure the Workbench application
48
49 This application needs a secret token. Generate a new secret:
50
51 <notextile>
52 <pre><code>~/arvados/apps/workbench$ <span class="userinput">rake secret</span>
53 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
54 </code></pre>
55 </notextile>
56
57 Copy @config/application.yml.example@ to @config/application.yml@ and edit it appropriately for your environment.
58
59 * Set @secret_token@ to the string you generated with @rake secret@.
60 * Point @arvados_login_base@ and @arvados_v1_base@ at your "API server":install-api-server.html
61 * @site_name@ can be any string to identify this Workbench.
62 * Assuming that the SSL certificate you use for development isn't signed by a CA, make sure @arvados_insecure_https@ is @true@.
63
64 Copy @config/piwik.yml.example@ to @config/piwik.yml@ and edit to suit.
65
66 h3. Apache/Passenger (optional)
67
68 Set up Apache and Passenger. Point them to the apps/workbench directory in the source tree.
69
70 h2. Trusted client setting
71
72 Log in to Workbench once (this ensures that the Arvados API server has a record of the Workbench client).
73
74 In the API server project root, start the rails console.  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:
75
76 <notextile><pre><code>~/arvados/services/api$ <span class="userinput">RAILS_ENV=development bundle exec rails console</span>
77 irb(main):001:0&gt; <span class="userinput">wb = ApiClient.all.last; [wb.url_prefix, wb.created_at]</span>
78 =&gt; ["https://workbench.example.com/", Sat, 19 Apr 2014 03:35:12 UTC +00:00]
79 irb(main):002:0&gt; <span class="userinput">include CurrentApiClient</span>
80 =&gt; true
81 irb(main):003:0&gt; <span class="userinput">act_as_system_user do wb.update_attributes!(is_trusted: true) end</span>
82 =&gt; true
83 </code></pre>
84 </notextile>