Project

General

Profile

API server » History » Version 2

Tom Clegg, 04/17/2014 01:10 AM

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