Merge branch 'master' into 2257-inequality-conditions
[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. [Download and run a docker binary from docker.io.](http://docs.docker.io/en/latest/installation/binaries/)
44
45 * Ruby (version 1.9.3 or greater)
46
47 * sudo privileges to run `debootstrap`
48
49 Building
50 --------
51
52 Type `./build.sh` to configure and build the following Docker images:
53
54    * arvados/api       - the Arvados API server
55    * arvados/doc       - Arvados documentation
56    * arvados/warehouse - Keep, the Arvados content-addressable filesystem
57    * arvados/workbench - the Arvados console
58    * arvados/sso       - the Arvados single-signon authentication server
59
60 `build.sh` will generate reasonable defaults for all configuration
61 settings.  If you want more control over the way Arvados is
62 configured, first copy `config.yml.example` to `config.yml` and edit
63 it with appropriate configuration settings, and then run `./build.sh`.
64
65 Running
66 -------
67
68 The `arvdock` script in this directory is used to start, stop and
69 restart Arvados servers on your machine.  The simplest and easiest way
70 to use it is `./arvdock start` to start the full complement of Arvados
71 servers, and `./arvdock stop` and `./arvdock restart` to stop and
72 restart all servers, respectively.
73
74 Developers who are working on individual servers can start, stop or
75 restart just those containers, e.g.:
76
77 * `./arvdock start --api --sso` to start just the API and SSO services.
78 * `./arvdock stop --keep` to stop just the Keep services.
79 * `./arvdock restart --workbench=8000` restarts just the Workbench service on port 8000.
80
81 For a full set of arguments, use `./arvdock --help`.