[ARVADOS] updated: 2dd4e1a58e6e7b73bea5c1f352338fd74ff55fa7

git at public.curoverse.com git at public.curoverse.com
Wed Mar 12 22:19:32 EDT 2014


Summary of changes:
 doc/_config.yml                                    |    4 +-
 doc/install/install-api-server.html.md.liquid      |  110 -----------------
 doc/install/install-api-server.html.textile.liquid |  123 ++++++++++++++++++++
 doc/install/install-sso.html.textile.liquid        |    1 +
 doc/install/install-workbench-app.html.md.liquid   |   63 ----------
 .../install-workbench-app.html.textile.liquid      |   59 ++++++++++
 services/api/config/database.yml.sample            |    8 +-
 .../api/config/initializers/omniauth.rb.example    |    2 +-
 8 files changed, 188 insertions(+), 182 deletions(-)
 delete mode 100644 doc/install/install-api-server.html.md.liquid
 create mode 100644 doc/install/install-api-server.html.textile.liquid
 delete mode 100644 doc/install/install-workbench-app.html.md.liquid
 create mode 100644 doc/install/install-workbench-app.html.textile.liquid

       via  2dd4e1a58e6e7b73bea5c1f352338fd74ff55fa7 (commit)
       via  99be0634e48121da5a6ab4abd0faa07773ced52b (commit)
      from  205e2b592cb279526f904542e873c3091f53adcb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2dd4e1a58e6e7b73bea5c1f352338fd74ff55fa7
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 12 22:19:20 2014 -0400

    Updated workbench documentation.

diff --git a/doc/_config.yml b/doc/_config.yml
index 3ec959a..9576725 100644
--- a/doc/_config.yml
+++ b/doc/_config.yml
@@ -105,8 +105,8 @@ navbar:
     - Install:
       - install/index.html.md.liquid
       - install/install-sso.html.textile.liquid
-      - install/install-api-server.html.md.liquid
-      - install/install-workbench-app.html.md.liquid
+      - install/install-api-server.html.textile.liquid
+      - install/install-workbench-app.html.textile.liquid
       - install/client.html.textile.liquid
       - install/create-standard-objects.html.textile.liquid
       - install/install-crunch-dispatch.html.textile.liquid
diff --git a/doc/install/install-api-server.html.textile.liquid b/doc/install/install-api-server.html.textile.liquid
index 5f2a157..e5bd5c8 100644
--- a/doc/install/install-api-server.html.textile.liquid
+++ b/doc/install/install-api-server.html.textile.liquid
@@ -6,11 +6,11 @@ title: Install the API server
 
 h2. Prerequisites:
 
-1. A GNU/Linux (virtual) machine
-2. A domain name for your api server
-3. Ruby >= 2.0.0
-4. Bundler: @gem install bundler@
-5. Curl libraries: @sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev@
+# A GNU/Linux (virtual) machine
+# A domain name for your api server
+# Ruby >= 2.0.0
+# Bundler: @gem install bundler@
+# Curl libraries: @sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev@
 
 h2. Download the source tree
 
diff --git a/doc/install/install-workbench-app.html.md.liquid b/doc/install/install-workbench-app.html.md.liquid
deleted file mode 100644
index d34d54f..0000000
--- a/doc/install/install-workbench-app.html.md.liquid
+++ /dev/null
@@ -1,63 +0,0 @@
----
-layout: default
-navsection: installguide
-title: Install the Arvados workbench application
-navorder: 2
-...
-
-{% include 'alert_stub' %}
-
-# Workbench setup
-
-## Prerequisites
-
-1. A GNU/linux (virtual) machine (can be shared with the API server)
-2. A hostname for your workbench application
-
-## 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 `apps/workbench`.
-
-## Configure the Workbench application
-
-You need to update config/initializers/secret_token.rb. Generate a new secret with
-
-    rake secret
-
-and put it in `config/initializers/secret_token.rb`
-
-    Server::Application.config.secret_token = 'your-new-secret-here'
-
-Adjust the following fields in your `environments/production.rb` file.
-
-* `config.site_name` can be the URL of your workbench install.
-* `config.arvados_login_base` and `config.arvados_v1_base` should point to
-your API server. Use the example values as a guide.
-* If you choose not to use https, make sure to also set
-`config.force_ssl = false` in the API server's `production.rb` file.
-
-Copy `config/piwik.yml.example` to `config/piwik.yml` and edit to suit.
-
-## Apache/Passenger
-
-Set up Apache and Passenger. Point them to the apps/workbench directory in the source tree.
-
-## "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.
-
-    RAILS_ENV=production bundle exec rails c
-
-Locate the ApiClient record for your Workbench installation.
-
-    ApiClient.where('url_prefix like ?', '%workbench%')
-
-Set the `is_trusted` flag for the appropriate client record.
-
-    ApiClient.find(1234).update_attributes is_trusted: true
-
diff --git a/doc/install/install-workbench-app.html.textile.liquid b/doc/install/install-workbench-app.html.textile.liquid
new file mode 100644
index 0000000..177138f
--- /dev/null
+++ b/doc/install/install-workbench-app.html.textile.liquid
@@ -0,0 +1,59 @@
+---
+layout: default
+navsection: installguide
+title: Install the Arvados workbench application
+...
+
+h2. Prerequisites
+
+# A GNU/linux (virtual) machine (can be shared with the API server)
+# A hostname for your workbench application
+
+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 at .
+
+h2. Configure the Workbench application
+
+You need to update @config/initializers/secret_token.rb at . Generate a new secret:
+
+<notextile>
+<pre><code>~/arvados/apps/workbench$ <span class="userinput">rake secret</span>
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+</code></pre>
+</notextile>
+
+and put it in @config/initializers/secret_token.rb@
+
+<notextile><pre><code>~/arvados/apps/workbench$ <span class="userinput">    Server::Application.config.secret_token = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+</span></code></pre>
+</notextile>
+
+Adjust the following fields in your @environments/production.rb@ file.
+
+* @config.site_name@ can be the URL of your workbench install.
+* @config.arvados_login_base@ and @config.arvados_v1_base@ should point to your "API server":install-api-server.html 
+* If you choose not to use https, make sure to also set @config.force_ssl = false@ in the API server's @production.rb@ file.
+
+Copy @config/piwik.yml.example@ to @config/piwik.yml@ and edit to suit.
+
+h3. Apache/Passenger (optional)
+
+Set up Apache and Passenger. Point them to the apps/workbench directory in the source tree.
+
+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:
+
+<notextile><pre><code>~/arvados/services/api$ <span class="userinput">RAILS_ENV=development bundle exec rails console</span>
+irb(main):001:0> <span class="userinput">ApiClient.where('url_prefix like ?', '%workbench%')</span>
+=> {:id => 1234}
+irb(main):002:0> <span class="userinput">ApiClient.find(1234).update_attributes is_trusted: true</span>
+</code></pre>
+</notextile>
+
+

commit 99be0634e48121da5a6ab4abd0faa07773ced52b
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 12 21:53:57 2014 -0400

    Working on improving install documentation.

diff --git a/doc/install/install-api-server.html.md.liquid b/doc/install/install-api-server.html.md.liquid
deleted file mode 100644
index 6eaef18..0000000
--- a/doc/install/install-api-server.html.md.liquid
+++ /dev/null
@@ -1,110 +0,0 @@
----
-layout: default
-navsection: installguide
-title: Install the API server
-navorder: 1
-...
-
-# API server setup
-
-## Prerequisites:
-
-1. A GNU/Linux (virtual) machine
-2. A domain name for your api server
-3. Ruby >= 2.0.0
-4. Bundler: `gem install bundler`
-5. Curl libraries: `sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev`
-
-## Download the source tree
-
-    git clone https://github.com/curoverse/arvados.git
-    cd arvados
-
-See also: [Downloading the source code](https://arvados.org/projects/arvados/wiki/Download) on the Arvados wiki.
-
-## Install gem dependencies
-
-    cd services/api && bundle install
-
-## Configure the API server
-
-Configure the database:
-
-    cp -i config/database.yml.sample config/database.yml
-
-Edit `config/database.yml` to your liking and make sure the database
-and db user exist. Then set up the database:
- 
-    RAILS_ENV=production bundle exec rake db:setup
-
-Then set up omniauth:
-
-    cp -i config/initializers/omniauth.rb.example config/initializers/omniauth.rb
-
-Edit `config/initializers/omniauth.rb`. Choose an *APP_SECRET* and
-*APP_ID*. Also set *CUSTOM_PROVIDER_URL*.
-
-Make sure your Omniauth provider knows about your *APP_ID* and *APP_SECRET*
-combination.
-
-Edit the main configuration.
-
-    cp -i config/application.yml.example config/application.yml
-
-First, choose a unique 5-character alphanumeric string to use as your
-`uuid_prefix`. An example is given that generates a 5-character string
-based on a hash of your hostname. The `uuid_prefix` is a unique
-identifier for your API server. It also serves as the first part of
-the hostname for your API server:
-
-    {{ site.arvados_api_host }}
-
-For a development site, use your own domain instead of arvadosapi.com.
-
-You also need to install a secret_token for signing cookies. Generate
-a new secret:
-
-    rake secret
-
-Put it in `config/application.yml` in the production or common section:
-
-    secret_token: your-new-secret-here
-
-You will also want to change `compute_node_nameservers` to suit your
-environment.
-
-Consult `application.default.yml` for a full list of configuration
-options. Always put your local configuration in `application.yml`
-instead of editing `application.default.yml`.
-
-## Apache/Passenger
-
-Set up Apache and Passenger. Point them to the services/api directory in the source tree.
-
-To enable streaming so users can monitor crunch jobs in real time, add
-to your Apache configuration:
-
-    PassengerBufferResponse off
-
-## Add an admin user
-
-Point browser to the API endpoint. Log in with a google account.
-
-In the rails console:
-
-    Thread.current[:user] = User.find(1)
-    Thread.current[:user].is_admin = true
-    User.find(1).update_attributes is_admin: true, is_active: true
-    User.find(1).is_admin
-
-This should be
-
-     => true
-
-## Create a token
-
-In rails console
-
-     a = ApiClient.new(owner_uuid:'0'); a.save!
-     x = ApiClientAuthorization.new(api_client_id:a.id, user_id:1); x.save; x.api_token
-
diff --git a/doc/install/install-api-server.html.textile.liquid b/doc/install/install-api-server.html.textile.liquid
new file mode 100644
index 0000000..5f2a157
--- /dev/null
+++ b/doc/install/install-api-server.html.textile.liquid
@@ -0,0 +1,123 @@
+---
+layout: default
+navsection: installguide
+title: Install the API server
+...
+
+h2. Prerequisites:
+
+1. A GNU/Linux (virtual) machine
+2. A domain name for your api server
+3. Ruby >= 2.0.0
+4. Bundler: @gem install bundler@
+5. Curl libraries: @sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev@
+
+h2. Download the source tree
+
+<notextile>
+<pre><code>~$ <span class="userinput">git clone https://github.com/curoverse/arvados.git</span>
+</code></pre></notextile>
+
+See also: "Downloading the source code:https://arvados.org/projects/arvados/wiki/Download on the Arvados wiki.
+
+h2. Install gem dependencies
+
+<notextile>
+<pre><code>~$ <span class="userinput">cd arvados/services/api</span>
+~/arvados/services/api$ <span class="userinput">bundle install</span>
+</code></pre></notextile>
+
+h2. Configure the API server
+
+Configure the database:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">cp -i config/database.yml.sample config/database.yml</span>
+</code></pre></notextile>
+
+By default, the development database will use the sqlite3 driver, so no configuration is necessary.  If you wish to use mysql or postgres, edit @config/database.yml@ to your liking and make sure the database and db user exist. Then initialize the database:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">RAILS_ENV=development bundle exec rake db:setup</span>
+</code></pre></notextile>
+
+Then set up omniauth:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">cp -i config/initializers/omniauth.rb.example config/initializers/omniauth.rb
+</code></pre></notextile>
+
+Edit @config/initializers/omniauth.rb at . Set @APP_SECRET@ to the value of @app_secret@ from "installing the single sign on server":install-sso.html .
+
+Next, edit the main configuration:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">cp -i config/application.yml.example config/application.yml
+</code></pre></notextile>
+
+First, choose a unique 5-character alphanumeric string to use as your @uuid_prefix at . An example is given that generates a 5-character string based on a hash of your hostname. The `uuid_prefix` is a unique identifier for your API server. It also serves as the first part of the hostname for your API server.
+
+For a development site, use your own domain instead of arvadosapi.com.
+
+You also need to install a secret_token for signing cookies. Generate a new secret:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">rake secret
+zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+</code></pre></notextile>
+
+Put it in @config/application.yml@ in the production or common section:
+
+<notextile>
+<pre><code><span class="userinput">    secret_token: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz</span>
+</code></pre>
+</notextile>
+
+You will also want to change @compute_node_nameservers@ to suit your environment.
+
+Consult @application.default.yml@ for a full list of configuration options. Always put your local configuration in @application.yml@ instead of editing @application.default.yml at .
+
+You can now run the development server:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">rails server
+</code></pre></notextile>
+
+h3. Apache/Passenger (optional)
+
+You can use "Passenger":https://www.phusionpassenger.com/ for deployment. Point it to the services/api directory in the source tree.
+
+To enable streaming so users can monitor crunch jobs in real time, add to your Passenger configuration in Apache:
+
+<notextile>
+<pre><code><span class="userinput">PassengerBufferResponse off</span>
+</code></pre>
+</notextile>
+
+h2. Add an admin user
+
+Point browser to the API endpoint. Log in with a google account.
+
+In the rails console:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">rails console</span>
+irb(main):001:0> <span class="userinput">Thread.current[:user] = User.find(1)</span>
+irb(main):002:0> <span class="userinput">Thread.current[:user].is_admin = true</span>
+irb(main):003:0> <span class="userinput">User.find(1).update_attributes is_admin: true, is_active: true</span>
+irb(main):004:0> <span class="userinput">User.find(1).is_admin</span>
+=> true
+</code></pre></notextile>
+
+h2. Create an API token
+
+In rails console:
+
+<notextile>
+<pre><code>~/arvados/services/api$ <span class="userinput">rails console</span>
+irb(main):001:0> <span class="userinput">a = ApiClient.new(owner_uuid:'0')</span>
+irb(main):002:0> <span class="userinput">a.save!</span>
+irb(main):003:0> <span class="userinput">x = ApiClientAuthorization.new(api_client_id:a.id, user_id:1)</span>
+irb(main):004:0> <span class="userinput">x.save</span>
+irb(main):005:0> <span class="userinput">x.api_token</span>
+</code></pre></notextile>
diff --git a/doc/install/install-sso.html.textile.liquid b/doc/install/install-sso.html.textile.liquid
index b12bc51..f220ef6 100644
--- a/doc/install/install-sso.html.textile.liquid
+++ b/doc/install/install-sso.html.textile.liquid
@@ -19,5 +19,6 @@ irb(main):003:0> <span class="userinput">c.app_id = "arvados-server"</span>
 irb(main):004:0> <span class="userinput">c.app_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"</span>
 irb(main):005:0> <span class="userinput">c.save!</span>
 irb(main):006:0> <span class="userinput">quit</span>
+~/sso-devise-omniauth-provider$ <span class="userinput">rails server --port=3002</span>
 </code></pre>
 </notextile>
diff --git a/services/api/config/database.yml.sample b/services/api/config/database.yml.sample
index 8f54e66..25fcc7a 100644
--- a/services/api/config/database.yml.sample
+++ b/services/api/config/database.yml.sample
@@ -1,10 +1,6 @@
 development:
-  adapter: postgresql
-  encoding: utf8
-  database: arvados_development
-  username: arvados
-  password: ********
-  host: localhost
+  adapter: sqlite3
+  database: db/arvados_development.sqlite3
 
 test:
   adapter: postgresql
diff --git a/services/api/config/initializers/omniauth.rb.example b/services/api/config/initializers/omniauth.rb.example
index 05d1ee6..aefcf56 100644
--- a/services/api/config/initializers/omniauth.rb.example
+++ b/services/api/config/initializers/omniauth.rb.example
@@ -4,7 +4,7 @@ APP_ID = 'arvados-server'
 APP_SECRET = rand(2**512).to_s(36) # CHANGE ME!
 
 # Update your custom Omniauth provider URL here
-CUSTOM_PROVIDER_URL = 'http://auth.curoverse.com'
+CUSTOM_PROVIDER_URL = 'http://localhost:3002'
 
 Rails.application.config.middleware.use OmniAuth::Builder do
   provider :josh_id, APP_ID, APP_SECRET, CUSTOM_PROVIDER_URL

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list