Working on javascript magic to resize svg div so scrolling works nicely. Seems to...
[arvados.git] / docker / README.md
1 Deploying Arvados in Docker Containers
2 ======================================
3
4 This file explains how to build and deploy Arvados servers in Docker
5 containers, so that they can be run easily in different environments
6 (a dedicated server, a developer's laptop, a virtual machine,
7 etc).
8
9 This is a work in progress; instructions will almost certainly be
10 incomplete and possibly out of date.
11
12 Prerequisites
13 -------------
14
15 * Docker
16
17   Docker is a Linux container management system based on LXC. It is a
18   very young system but is being developed rapidly.
19   [Installation packages](http://www.docker.io/gettingstarted/)
20   are available for several platforms.
21   
22   If a prebuilt docker package is not available for your platform, the
23   short instructions for installing it are:
24   
25   1. Create a `docker` group and add yourself to it.
26
27      <pre>
28      $ sudo addgroup docker
29      $ sudo adduser `whoami` docker
30      </pre>
31
32      Log out and back in.
33          
34   2. Add a `cgroup` filesystem and mount it:
35
36      <pre>
37      $ mkdir -p /cgroup
38      $ grep cgroup /etc/fstab
39      none   /cgroup    cgroup    defaults    0    0
40      $ sudo mount /cgroup
41          </pre>
42
43   3. Enable IPv4 forwarding:
44
45      <pre>
46      $ grep ipv4.ip_forward /etc/sysctl.conf
47      net.ipv4.ip_forward=1
48      $ sudo sysctl net.ipv4.ip_forward=1
49      </pre>
50          
51   4. [Download and run a docker binary from docker.io.](http://docs.docker.io/en/latest/installation/binaries/)
52
53 * Ruby (any version)
54
55 * sudo privileges to run `debootstrap`
56
57 Building
58 --------
59
60 1. Copy `config.yml.example` to `config.yml` and edit it with settings
61    for your installation.
62 2. Run `make` to build the following Docker images:
63
64    * arvados/api       - the Arvados API server
65    * arvados/doc       - Arvados documentation
66    * arvados/warehouse - Keep, the Arvados content-addressable filesystem
67    * arvados/workbench - the Arvados console
68    * arvados/sso       - the Arvados single-signon authentication server
69
70    You may also build Docker images for individual Arvados services:
71
72         $ make api-image
73         $ make doc-image
74         $ make warehouse-image
75         $ make workbench-image
76         $ make sso-image
77
78 Deploying
79 ---------
80
81 1. Make sure the `ARVADOS_DNS_SERVER` has been provisioned with the
82    following DNS entries, resolving to the appropriate IP addresses
83    where each service will be deployed.
84
85    * $API_HOSTNAME
86    * keep0.$API_HOSTNAME
87    * compute0.$API_HOSTNAME
88    * controller.$API_HOSTNAME
89    * workbench.$API_HOSTNAME
90
91 2. The `run.sh` script in this directory will start all Arvados
92    servers on your machine.
93