Deploying Arvados in Docker Containers
======================================

This file explains how to build and deploy Arvados servers in Docker
containers, so that they can be run easily in different environments
(a dedicated server, a developer's laptop, a virtual machine,
etc).

This is a work in progress; instructions will almost certainly be
incomplete and possibly out of date.

PREREQUISITES
-------------

* Docker

  Docker is a Linux container management system based on LXC. It is a
  very young system but is being developed rapidly.  See
  http://www.docker.io/gettingstarted/#h_installation for an
  installation package for your platform.

* Ruby (any version)

* sudo privileges to run `debootstrap'

BUILDING
--------

1. Copy `config.yml.example' to `config.yml' and edit it with settings
   for your installation.

2. Run `make' to build the following Docker images:

     arvados/api       - the Arvados API server
     arvados/docserver - Arvados documentation
     arvados/warehouse - Keep, the Arvados content-addressable filesystem
     arvados/workbench - the Arvados console
     arvados/sso       - the Arvados single-signon authentication server

   You may also build Docker images for individual Arvados services:

     make api-image
     make docserver-image
     make warehouse-image
     make workbench-image
     make sso-image

DEPLOYING
---------

1. Make sure the ARVADOS_DNS_SERVER has been provisioned with the
   following DNS entries, resolving to the appropriate IP addresses
   where each service will be deployed.

   $API_HOSTNAME
   keep0.$API_HOSTNAME
   compute0.$API_HOSTNAME
   controller.$API_HOSTNAME
   workbench.$API_HOSTNAME

2. Deploying API:
   docker run -p 80:80 -p 443:443 arvados/api

3. Deploying Keep:
   mkdir /tmp/keepfs
   mount -t tmpfs -o size=512M tmpfs /tmp/keepfs
   docker run -p 25107:25107 -v /tmp/keepfs:/dev/keep-0 arvados/warehouse