Project

General

Profile

API server » History » Version 3

Tom Clegg, 04/17/2014 04:12 PM

1 1 Tom Clegg
h1. API server
2
3
This is a reference page for the API server component, colloquially "apiserver", aimed at developers.
4
5
Resources:
6
* 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
7
* Run test suite: see below
8 3 Tom Clegg
* [[Hacking API server]]
9 1 Tom Clegg
10
h2. Prerequisites
11
12
Postgres
13
14
<pre>
15
sudo apt-get install postgresql
16
sudo -u postgres createuser --createdb --encrypted --pwprompt arvados
17
</pre>
18
19
Ruby
20
<pre>
21
sudo apt-get install zlib1g-dev gettext bison libssl-dev libreadline-dev wget
22
23
mkdir -p /usr/local/src
24
cd /usr/local/src
25
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
26
tar xzf ruby-2.1.1.tar.gz
27
cd ruby-2.1.1
28
./configure
29
make
30
sudo make install
31
32
gem install bundler
33
</pre>
34
35
Other
36
<pre>
37
sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev
38
</pre>
39
40
h2. Test suite
41
42
Summary:
43
44
<pre>
45
git clone https://github.com/curoverse/arvados.git
46
cd arvados/services/api
47
cp -i config/application.yml.example config/application.yml
48
edit config/application.yml
49
edit config/database.yml
50
bundle install
51
bundle exec rake test
52
</pre>
53 2 Tom Clegg
54
h2. Generating a self-signed certificate
55
56
Useful for dev/test environments.
57
58
<pre>
59
openssl req -new -x509 -nodes -out ./self-signed.pem -keyout ./self-signed.key -days 3650 -subj '/CN=arvados.example.com'
60
</pre>