Project

General

Profile

API server » History » Revision 4

Revision 3 (Tom Clegg, 04/17/2014 04:12 PM) → Revision 4/5 (Tom Clegg, 05/14/2014 03:05 AM)

h1. API server 

 This is a reference page for the API server component, colloquially "apiserver", aimed at developers. 

 Resources: 
 * Install: "install the API server":http://doc.arvados.org/install/install-api-server.html and "create standard objects":http://doc.arvados.org/install/create-standard-objects.html 
 * Run test suite: see below 
 * [[Hacking API server]] 

 h2. Prerequisites 

 Dependencies are documented at http://doc.arvados.org/install/install-api-server.html. Postgres 

 <pre> 
 sudo apt-get install postgresql 
 sudo -u postgres createuser --createdb --encrypted --pwprompt arvados 
 </pre> 

 Ruby 
 <pre> 
 sudo apt-get install zlib1g-dev gettext bison libssl-dev libreadline-dev wget 

 mkdir -p /usr/local/src 
 cd /usr/local/src 
 wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz 
 tar xzf ruby-2.1.1.tar.gz 
 cd ruby-2.1.1 
 ./configure 
 make 
 sudo make install 

 gem install bundler 
 </pre> 

 Other 
 <pre> 
 sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev 
 </pre> 

 h2. Test suite 

 Summary: 

 <pre> 
 git clone https://github.com/curoverse/arvados.git 
 cd arvados/services/api 
 cp -i config/application.yml.example config/application.yml 
 edit config/application.yml 
 edit config/database.yml 
 bundle install 
 bundle exec rake test 
 </pre> 

 h2. Generating a self-signed certificate 

 Useful for dev/test environments. 

 <pre> 
 openssl req -new -x509 -nodes -out ./self-signed.pem -keyout ./self-signed.key -days 3650 -subj '/CN=arvados.example.com' 
 </pre>