Fix order of steps in install doc, add git_repositories_dir
[arvados.git] / doc / install / install-api-server.html.textile.liquid
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>