Fix order of steps in install doc, add git_repositories_dir
authorTom Clegg <tom@curoverse.com>
Thu, 13 Mar 2014 15:49:46 +0000 (11:49 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 13 Mar 2014 16:34:56 +0000 (12:34 -0400)
instructions, remove troublesome default config.

doc/install/install-api-server.html.textile.liquid
services/api/config/application.yml.example

index e5bd5c82bc9fc183ef5836dc83805c38a650feaa..ccfc58ecf44591cc7b8b6b2c0e12badbed980da8 100644 (file)
@@ -29,37 +29,24 @@ h2. Install gem dependencies
 
 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:
+Edit the main configuration:
 
 <notextile>
-<pre><code>~/arvados/services/api$ <span class="userinput">RAILS_ENV=development bundle exec rake db:setup</span>
+<pre><code>~/arvados/services/api$ <span class="userinput">cp -i config/application.yml.example config/application.yml</span>
 </code></pre></notextile>
 
-Then set up omniauth:
+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.
 
-<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@. Set @APP_SECRET@ to the value of @app_secret@ from "installing the single sign on server":install-sso.html .
+For a development site, use your own domain instead of arvadosapi.com.
 
-Next, edit the main configuration:
+Make sure a clone of the arvados repository exists in @git_repositories_dir@:
 
 <notextile>
-<pre><code>~/arvados/services/api$ <span class="userinput">cp -i config/application.yml.example config/application.yml
+<pre><code>~/arvados/services/api$ <span class="userinput">sudo mkdir -p /var/cache/git</span>
+~/arvados/services/api$ <span class="userinput">sudo git clone --bare ../../.git /var/cache/git/arvados.git</span>
 </code></pre></notextile>
 
-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.
-
-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:
+Generate a new secret token for signing cookies:
 
 <notextile>
 <pre><code>~/arvados/services/api$ <span class="userinput">rake secret
@@ -73,10 +60,28 @@ Put it in @config/application.yml@ in the production or common section:
 </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@.
 
+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>
+
+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@. Set @APP_SECRET@ to the value of @app_secret@ from "installing the single sign on server":install-sso.html .
+
 You can now run the development server:
 
 <notextile>
index 60193ced8786c38f139afbc4dfd57ff5662a6ec9..a9c33a4bae199e1cb6f486c8f90ab40eb2eefd36 100644 (file)
@@ -19,7 +19,8 @@ production:
   uuid_prefix: bogus
 
   # This is suitable for AWS; see common section below for a static example.
-  compute_node_nameservers: <%=
+  #
+  #compute_node_nameservers: <%#
     require 'net/http'
     ['local', 'public'].collect do |iface|
       Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0]
@@ -31,3 +32,10 @@ test:
   secret_token: <%= rand(2**512).to_s(36) %>
 
 common:
+
+  # Git repositories must be readable by api server, or you won't be
+  # able to submit crunch jobs. To pass the test suites, put a clone
+  # of the arvados tree in {git_repositories_dir}/arvados.git or
+  # {git_repositories_dir}/arvados/.git
+  #
+  #git_repositories_dir: /var/cache/git