Advertise filters param in discovery doc.
[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 Running
79 -------
80
81 The `arvdock` script in this directory is used to start, stop and
82 restart Arvados servers on your machine.  The simplest and easiest way
83 to use it is `./arvdock start` to start the full complement of Arvados
84 servers, and `./arvdock stop` and `./arvdock restart` to stop and
85 restart all servers, respectively.
86
87 Developers who are working on individual servers can start, stop or
88 restart just those containers, e.g.:
89
90 * `./arvdock start --api --sso` to start just the API and SSO services.
91 * `./arvdock stop --keep` to stop just the Keep services.
92 * `./arvdock restart --workbench=8000` restarts just the Workbench service on port 8000.
93
94 For a full set of arguments, use `./arvdock --help`.