Merge branch 'master' of git.curoverse.com:arvados into 6465-optimize-workbench-integ...
[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 Prerequisites
10 -------------
11
12 * Docker
13
14   Docker is a Linux container management system. It is a very young system but
15   is being developed rapidly.
16   [Installation packages](http://www.docker.io/gettingstarted/)
17   are available for several platforms.
18   
19   If a prebuilt docker package is not available for your platform, the
20   short instructions for installing it are:
21   
22   1. Create a `docker` group and add yourself to it.
23
24      <pre>
25      $ sudo addgroup docker
26      $ sudo adduser `whoami` docker
27      </pre>
28
29      Log out and back in.
30          
31   2. Add a `cgroup` filesystem and mount it:
32
33      <pre>
34      $ mkdir -p /cgroup
35      $ grep cgroup /etc/fstab
36      none   /cgroup    cgroup    defaults    0    0
37      $ sudo mount /cgroup
38          </pre>
39          
40   3. [Download and run a docker binary from docker.io.](http://docs.docker.io/en/latest/installation/binaries/)
41
42 * Ruby (version 1.9.3 or greater)
43
44 * sudo privileges to run `debootstrap`
45
46 Building
47 --------
48
49 Type `./build.sh` to configure and build the following Docker images:
50
51    * arvados/api       - the Arvados API server
52    * arvados/compute   - Arvados compute node image
53    * arvados/doc       - Arvados documentation
54    * arvados/keep      - Keep, the Arvados content-addressable filesystem
55    * arvados/keepproxy - Keep proxy
56    * arvados/shell     - Arvados shell node image
57    * arvados/sso       - the Arvados single-signon authentication server
58    * arvados/workbench - the Arvados console
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`.