[ARVADOS] created: 4ac7301cf934c4ae367627efec43e846dcb17343
git at public.curoverse.com
git at public.curoverse.com
Mon Mar 3 22:19:19 EST 2014
at 4ac7301cf934c4ae367627efec43e846dcb17343 (commit)
commit 4ac7301cf934c4ae367627efec43e846dcb17343
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Mar 3 22:18:31 2014 -0500
Making documentation easier to get developers up and running.
diff --git a/doc/install/install-api-server.html.md.liquid b/doc/install/install-api-server.html.md.liquid
index a16e50f..e6418c0 100644
--- a/doc/install/install-api-server.html.md.liquid
+++ b/doc/install/install-api-server.html.md.liquid
@@ -9,9 +9,11 @@ navorder: 1
# API server setup
+This section describes how to set up the API server suitable for Arvados development.
+
## Prerequisites
-1. A GNU/linux (virtual) machine
+1. A GNU/Linux machine or VM
2. A domain name for your api server
## Download the source tree
@@ -30,9 +32,15 @@ Next, configure the database:
cp config/database.yml.sample config/database.yml
Edit database.yml to your liking and make sure the database and db user exist.
-Then set up the database:
+
+Next, set up the environment:
+
+ cp config/environments/development.rb.example config/environments/development.rb
+
+Now create the database:
- RAILS_ENV=production rake db:setup
+ export RAILS_ENV=development
+ rake db:setup
Then set up omniauth:
@@ -54,7 +62,7 @@ and put it in config/initializers/secret_token.rb:
Finally, edit the main configuration:
- cp config/environments/production.rb.example config/environments/production.rb
+ cp config/environments/development.rb.example config/environments/development.rb
First, you want to make sure that
commit 8b7308cd7e9034efecf703b1cb88c382a4ef84fc
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Mon Mar 3 22:05:45 2014 -0500
Making the default configuration easier for setting up dev environment
diff --git a/services/api/Gemfile b/services/api/Gemfile
index 59b16cc..15d237e 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -5,8 +5,8 @@ gem 'rails', '~> 3.2.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
-#gem 'sqlite3'
-gem 'pg'
+gem 'sqlite3'
+#gem 'pg'
# Start using multi_json once we are on Rails 3.2;
# Rails 3.1 has a dependency on multi_json < 1.3.0 but we need version 1.3.4 to
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index 3929125..41d3f18 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -96,7 +96,6 @@ GEM
daemon_controller (>= 1.1.0)
rack
rake (>= 0.8.1)
- pg (0.17.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
@@ -137,6 +136,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.9)
test_after_commit (0.2.2)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
@@ -164,11 +164,11 @@ DEPENDENCIES
omniauth (= 1.1.1)
omniauth-oauth2 (= 1.1.1)
passenger
- pg
rails (~> 3.2.0)
redis
rvm-capistrano
sass-rails (>= 3.2.0)
+ sqlite3
test_after_commit
therubyracer
uglifier (>= 1.0.3)
diff --git a/services/api/config/database.yml.sample b/services/api/config/database.yml.sample
index 62edd84..4dd6a12 100644
--- a/services/api/config/database.yml.sample
+++ b/services/api/config/database.yml.sample
@@ -1,24 +1,4 @@
development:
- adapter: mysql
- encoding: utf8
- database: arvados_development
- username: arvados
- password: ********
- host: localhost
-
-test:
- adapter: mysql
- encoding: utf8
- database: arvados_test
- username: arvados
- password: ********
- host: localhost
-
-production:
- adapter: mysql
- encoding: utf8
- database: arvados_production
- username: arvados
- password: ********
- host: localhost
+ adapter: sqlite3
+ database: arvados_development.sqlite3
diff --git a/services/api/config/initializers/secret_token.rb b/services/api/config/initializers/secret_token.rb
index d63ec8b..f0a3628 100644
--- a/services/api/config/initializers/secret_token.rb
+++ b/services/api/config/initializers/secret_token.rb
@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Server::Application.config.secret_token = 'a107d661bc696fd1263e92c76e7e88d8fa44b6a9793e8f56ccfb23f17cfc95ea8894e28ed7dd132a3a6069673961fb1bf32edd7f8a94c8e88d8a7047bfacdde2'
+Server::Application.config.secret_token = rand(2**512).to_s(36)
diff --git a/services/api/script/rails b/services/api/script/rails
index 88627f5..9efe4d2 100755
--- a/services/api/script/rails
+++ b/services/api/script/rails
@@ -19,13 +19,13 @@ module Rails
:debugger => false,
:pid => File.expand_path("tmp/pids/server.pid"),
:config => File.expand_path("config.ru"),
- :SSLEnable => true,
+ :SSLEnable => false,
:SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
- :SSLPrivateKey => OpenSSL::PKey::RSA.new(
- File.open("config/api.clinicalfuture.com.key.pem").read),
- :SSLCertificate => OpenSSL::X509::Certificate.new(
- File.open("config/api.clinicalfuture.com.crt.pem").read),
- :SSLCertName => [["CN", WEBrick::Utils::getservername]]
+ #:SSLPrivateKey => OpenSSL::PKey::RSA.new(
+ # File.open("config/api.clinicalfuture.com.key.pem").read),
+ #:SSLCertificate => OpenSSL::X509::Certificate.new(
+ # File.open("config/api.clinicalfuture.com.crt.pem").read),
+ #:SSLCertName => [["CN", WEBrick::Utils::getservername]]
})
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list