Project

General

Profile

API server » History » Revision 2

Revision 1 (Tom Clegg, 04/17/2014 12:56 AM) → Revision 2/5 (Tom Clegg, 04/17/2014 01:10 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 

 h2. Prerequisites 

 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>