From: Tom Clegg Date: Thu, 13 Mar 2014 15:49:46 +0000 (-0400) Subject: Fix order of steps in install doc, add git_repositories_dir X-Git-Tag: 1.1.0~2690^2~19^2~33 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/113d3f94224ca507ff6341ab61ac98429cad711e Fix order of steps in install doc, add git_repositories_dir instructions, remove troublesome default config. --- diff --git a/doc/install/install-api-server.html.textile.liquid b/doc/install/install-api-server.html.textile.liquid index e5bd5c82bc..ccfc58ecf4 100644 --- a/doc/install/install-api-server.html.textile.liquid +++ b/doc/install/install-api-server.html.textile.liquid @@ -29,37 +29,24 @@ h2. Install gem dependencies h2. Configure the API server -Configure the database: - - -
~/arvados/services/api$ cp -i config/database.yml.sample config/database.yml
-
- -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: -
~/arvados/services/api$ RAILS_ENV=development bundle exec rake db:setup
+
~/arvados/services/api$ cp -i config/application.yml.example config/application.yml
 
-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. - -
~/arvados/services/api$ cp -i config/initializers/omniauth.rb.example config/initializers/omniauth.rb
-
- -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@: -
~/arvados/services/api$ cp -i config/application.yml.example config/application.yml
+
~/arvados/services/api$ sudo mkdir -p /var/cache/git
+~/arvados/services/api$ sudo git clone --bare ../../.git /var/cache/git/arvados.git
 
-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:
~/arvados/services/api$ rake secret
@@ -73,10 +60,28 @@ Put it in @config/application.yml@ in the production or common section:
 
-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: + + +
~/arvados/services/api$ cp -i config/database.yml.sample config/database.yml
+
+ +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: + + +
~/arvados/services/api$ RAILS_ENV=development bundle exec rake db:setup
+
+ +Set up omniauth: + + +
~/arvados/services/api$ cp -i config/initializers/omniauth.rb.example config/initializers/omniauth.rb
+
+ +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: diff --git a/services/api/config/application.yml.example b/services/api/config/application.yml.example index 60193ced87..a9c33a4bae 100644 --- a/services/api/config/application.yml.example +++ b/services/api/config/application.yml.example @@ -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