Merge branch 'master' into 3140-project-content-tabs
[arvados.git] / doc / install / install-docker.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Installing with Docker
5 ...
6
7 {% include 'alert_docker' %}
8
9 h2. Prerequisites:
10
11 # A GNU/Linux (virtual) machine
12 # A working Docker installation
13
14 h2. Download the source tree
15
16 <notextile>
17 <pre><code>~$ <span class="userinput">cd $HOME</span> # (or wherever you want to install)
18 ~$ <span class="userinput">git clone https://github.com/curoverse/arvados.git</span>
19 </code></pre></notextile>
20
21 See also: "Downloading the source code":https://arvados.org/projects/arvados/wiki/Download on the Arvados wiki.
22
23 h2. Building the Arvados Docker containers
24
25 First of all, a suitable @config.yml@ file is needed.
26
27 <notextile>
28 <pre><code>~$ <span class="userinput">cd arvados/docker</span>
29 ~$ <span class="userinput">cp config.yml.example config.yml</span>
30 </code></pre></notextile>
31
32 Edit the @config.yml@ file and fill in values for at a minimum these
33 parameters:
34
35 <pre>
36 PUBLIC_KEY_PATH
37 API_HOSTNAME
38 API_AUTO_ADMIN_USER
39 </pre>
40
41 Then build the docker containers (this will take a while):
42
43 <notextile>
44 <pre><code>
45 ~$ <span class="userinput">./build.sh</span>
46 ...
47  ---> 05f0ae429530
48 Step 9 : ADD apache2_foreground.sh /etc/apache2/foreground.sh
49  ---> 7292b241305a
50 Step 10 : CMD ["/etc/apache2/foreground.sh"]
51  ---> Running in 82d59061ead8
52  ---> 72cee36a9281
53 Successfully built 72cee36a9281
54 Removing intermediate container 2bc8c98c83c7
55 Removing intermediate container 9457483a59cf
56 Removing intermediate container 7cc5723df67c
57 Removing intermediate container 5cb2cede73de
58 Removing intermediate container 0acc147a7f6d
59 Removing intermediate container 82d59061ead8
60 Removing intermediate container 9c022a467396
61 Removing intermediate container 16044441463f
62 Removing intermediate container cffbbddd82d1
63 date >sso-image
64 </code></pre></notextile>
65
66 If all goes well, you should now have a number of docker images built:
67
68 <notextile>
69 <pre><code>~$ <span class="userinput">docker.io images</span>
70 REPOSITORY          TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
71 arvados/sso         latest              72cee36a9281        11 seconds ago       1.727 GB
72 arvados/keep        latest              c3842f856bcb        56 seconds ago       210.6 MB
73 arvados/workbench   latest              b91aa980597c        About a minute ago   2.07 GB
74 arvados/doc         latest              050e9e6b8213        About a minute ago   1.442 GB
75 arvados/api         latest              79843d0a8997        About a minute ago   2.112 GB
76 arvados/passenger   latest              2342a550da7f        2 minutes ago        1.658 GB
77 arvados/base        latest              68caefd8ea5b        5 minutes ago        1.383 GB
78 arvados/debian      7.5                 6e32119ffcd0        8 minutes ago        116.8 MB
79 arvados/debian      latest              6e32119ffcd0        8 minutes ago        116.8 MB
80 arvados/debian      wheezy              6e32119ffcd0        8 minutes ago        116.8 MB
81 </code></pre></notextile>
82
83 h2. Running the Arvados Docker containers
84
85 The @arvdock@ command can be used to start and stop the docker containers. It has a number of options:
86
87 <notextile>
88 <pre><code>
89 ~$ <span class="userinput">./arvdock -h</span>
90
91 usage: ./arvdock (start|stop|restart|test) [options]
92
93 ./arvdock start/stop/restart options:
94   -d [port], --doc[=port]        Documentation server (default port 9898)
95   -w [port], --workbench[=port]  Workbench server (default port 9899)
96   -s [port], --sso[=port]        SSO server (default port 9901)
97   -a [port], --api[=port]        API server (default port 9900)
98   -k, --keep                     Keep servers
99   --ssh                          Enable SSH access to server containers
100   -h, --help                     Display this help and exit
101
102   If no options are given, the action is applied to all servers.
103
104 ./arvdock test [testname] [testname] ...
105   By default, all tests are run.
106 </code>
107 </pre>
108 </notextile>
109
110 The @--ssh@ option can be useful to debug issues with the Docker containers; it allows you to ssh into the running containers as the @root@ user, provided you have access to the private key that matches the public key specified in @config.yml@'s PUBLIC_KEY_PATH variable.
111
112 Start the docker containers:
113
114 <notextile>
115 <pre><code>
116 ~$ <span class="userinput">./arvdock start</span>
117 sso_server
118 Starting container:
119   /usr/bin/docker.io run -d -i -t -p 9901:443 --name sso_server arvados/sso
120 api_server
121 Starting container:
122   /usr/bin/docker.io run -d -i -t -p 9900:443 --name api_server --link sso_server:sso arvados/api
123 keep_server_0
124 Starting container:
125   /usr/bin/docker.io run -d -i -t -p 25107:25107 --name keep_server_0 -v /tmp/tmp.aCSx8Pq6Wb:/dev/keep-0 --link api_server:api arvados/keep
126 keep_server_1
127 Starting container:
128   /usr/bin/docker.io run -d -i -t -p 25108:25107 --name keep_server_1 -v /tmp/tmp.m4OQ9WB73G:/dev/keep-0 --link api_server:api arvados/keep
129 doc_server
130 Starting container:
131   /usr/bin/docker.io run -d -i -t -p 9898:80 --name doc_server arvados/doc
132
133 *****************************************************************
134 You can access the Arvados documentation at http://localhost:9898
135 *****************************************************************
136
137 workbench_server
138 Starting container:
139   /usr/bin/docker.io run -d -i -t -p 9899:80 --name workbench_server --link api_server:api arvados/workbench
140
141 *****************************************************************
142 You can access the Arvados workbench at http://localhost:9899
143 *****************************************************************
144 </code></pre></notextile>
145
146 h2. Accessing workbench
147
148 Point your browser to the Dockerized workbench:
149
150 <notextile>
151 <pre><code><span class="userinput">https://localhost:9899</span>
152 </code></pre>
153 </notextile>
154
155 Now use the google account you specified as @API_AUTO_ADMIN_USER@ in @config.yml@ to log in. You will be prompted *twice* by your browser that you are accessing a site with an untrusted SSL certificate. This is normal; by default the Arvados Docker installation uses self-signed SSL certificates for the SSO and API servers, respectively.
156
157