Add dependency info to Workbench install page. Fix "is_trusted" recipe.
authorTom Clegg <tom@curoverse.com>
Sat, 19 Apr 2014 03:46:21 +0000 (23:46 -0400)
committerTom Clegg <tom@curoverse.com>
Sat, 19 Apr 2014 03:46:21 +0000 (23:46 -0400)
doc/install/install-api-server.html.textile.liquid
doc/install/install-workbench-app.html.textile.liquid

index 14f58779872faa00011ddb6f13f5b82e36358bfa..7d09dc5060959623a85527edfe4b6ebe7e6190fa 100644 (file)
@@ -9,7 +9,7 @@ h2. Prerequisites:
 # A GNU/Linux (virtual) machine
 # A domain name for your api server
 
-h2. Install dependencies
+h2(#dependencies). Install dependencies
 
 <notextile>
 <pre><code>~$ <span class="userinput">sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev \
@@ -17,7 +17,7 @@ h2. Install dependencies
     libpq-dev sqlite3 libsqlite3-dev build-essential wget postgresql
 </span></code></pre></notextile>
 
-h2. Install Ruby and bundler
+h2(#ruby). Install Ruby and bundler
 
 We recommend Ruby >= 2.1.
 
index be6a04de21ea2bc60ffc327f59742eba37e59f7b..c9395c6ce736f1c51e9d84c47adee56766e0c28c 100644 (file)
@@ -9,11 +9,40 @@ h2. Prerequisites
 # A GNU/linux (virtual) machine (can be shared with the API server)
 # A hostname for your Workbench application
 
+h2. Install dependencies
+
+If you haven't already installed the API server on the same host:
+
+* 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.
+* Omit postgresql. Workbench doesn't need its own database.
+
+Install graphviz.
+
+<notextile>
+<pre><code>~$ <span class="userinput">sudo apt-get install graphviz</span>
+</code></pre>
+</notextile>
+
 h2. Download the source tree
 
 Please follow the instructions on the "Download page":https://arvados.org/projects/arvados/wiki/Download in the wiki.
 
-The Workbench application is in @arvados/apps/workbench@.
+The Workbench application is in @apps/workbench@ in the source tree.
+
+h2. Install gem dependencies
+
+<notextile>
+<pre><code>~$ <span class="userinput">cd arvados/apps/workbench</span>
+~/arvados/apps/workbench$ <span class="userinput">bundle install</span>
+</code></pre>
+</notextile>
+
+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:
+
+<notextile>
+<pre><code>~$ <span class="userinput">cd arvados/apps/workbench</span>
+~/arvados/apps/workbench$ <span class="userinput">bundle install --path=vendor/bundle</span>
+</code></pre></notextile>
 
 h2. Configure the Workbench application
 
@@ -42,11 +71,14 @@ h2. Trusted client setting
 
 Log in to Workbench once (this ensures that the Arvados API server has a record of the Workbench client).
 
-In the API server project root, start the rails console.  Locate the ApiClient record for your Workbench installation, then set the `is_trusted` flag for the appropriate client record:
+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:
 
 <notextile><pre><code>~/arvados/services/api$ <span class="userinput">RAILS_ENV=development bundle exec rails console</span>
-irb(main):001:0&gt; <span class="userinput">ApiClient.where('url_prefix like ?', '%workbench%')</span>
-=&gt; {:id => 1234}
-irb(main):002:0&gt; <span class="userinput">ApiClient.find(1234).update_attributes is_trusted: true</span>
+irb(main):001:0&gt; <span class="userinput">wb = ApiClient.all.last; [wb.url_prefix, wb.created_at]</span>
+=&gt; ["https://workbench.example.com/", Sat, 19 Apr 2014 03:35:12 UTC +00:00]
+irb(main):002:0&gt; <span class="userinput">include CurrentApiClient</span>
+=&gt; true
+irb(main):003:0&gt; <span class="userinput">act_as_system_user do wb.update_attributes!(is_trusted: true) end</span>
+=&gt; true
 </code></pre>
 </notextile>