3 navsection: installguide
4 title: Build and install Docker images
7 This method is intended for evaluation and development on a local workstation. It is not suitable for production use in a cluster deployment.
11 # A GNU/Linux (virtual) machine
12 # A working Docker installation (see "Installing Docker":https://docs.docker.com/installation/)
13 # A working Go installation (see "Install the Go tools":https://golang.org/doc/install)
14 # A working Ruby installation (see "Install Ruby and bundler":install-manual-prerequisites-ruby.html)
16 h2. Download the source tree
19 <pre><code>~$ <span class="userinput">cd $HOME</span> # (or wherever you want to install)
20 ~$ <span class="userinput">git clone https://github.com/curoverse/arvados.git</span>
21 </code></pre></notextile>
23 See also: "Downloading the source code":https://arvados.org/projects/arvados/wiki/Download on the Arvados wiki.
25 h2. Building the Arvados Docker containers
27 First of all, a suitable @config.yml@ file is needed. The easiest way to generate one based on the provided @config.yml.example@ file is to run the @build.sh@ script. If no @config.yml@ file exists, it will will prompt for a few inputs, write the @config.yml@ file, and then proceed to build all the Docker containers. If @config.yml@ exists, invoking @build.sh@ will simply build all Docker containers or update those that need to be updated.
29 Run @build.sh@ without arguments to generate @config.yml@ and build all Docker containers (this will take a while!):
33 ~$ <span class="userinput">./build.sh</span>
34 Generating config.yml.
35 Arvados needs to know the email address of the administrative user,
36 so that when that user logs in they are automatically made an admin.
37 This should be an email address associated with a Google account.
39 Enter your Google ID email address here:
43 Step 7 : ADD generated/setup.sh /usr/local/bin/setup.sh
45 Removing intermediate container f3d81180795d
46 Step 8 : CMD ["/usr/bin/supervisord", "-n"]
47 ---> Running in 84c64cb9f0d5
49 Removing intermediate container 84c64cb9f0d5
50 Successfully built d6cbb5002604
52 </code></pre></notextile>
54 If all goes well, you should now have a number of Docker images built (the image id will be different):
57 <pre><code>~$ <span class="userinput">docker.io images</span>
58 REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
59 arvados/shell latest d6cbb5002604 10 minutes ago 1.613 GB
60 arvados/sso latest 377f1fa0108e 11 minutes ago 1.807 GB
61 arvados/keep latest ade0e0d2dd00 12 minutes ago 210.8 MB
62 arvados/keepproxy latest b39ef0baba02 12 minutes ago 241.6 MB
63 arvados/workbench latest b0e4fb6da385 12 minutes ago 2.218 GB
64 arvados/doc latest 4b64daec9454 12 minutes ago 1.524 GB
65 arvados/compute latest 7f1f5f7faf54 13 minutes ago 1.862 GB
66 arvados/slurm latest f5bfd1008e6b 17 minutes ago 1.573 GB
67 arvados/api latest 6b93c5f5fc42 17 minutes ago 2.274 GB
68 arvados/passenger latest add2d11fdf24 18 minutes ago 1.738 GB
69 arvados/base latest 81eaadd0c6f5 22 minutes ago 1.463 GB
70 arvados/debian 7.6 f339ce275c01 6 days ago 116.8 MB
71 arvados/debian latest f339ce275c01 6 days ago 116.8 MB
72 arvados/debian wheezy f339ce275c01 6 days ago 116.8 MB
73 crosbymichael/skydock latest e985023521f6 3 months ago 510.7 MB
74 crosbymichael/skydns next 79c99a4608ed 3 months ago 525 MB
75 crosbymichael/skydns latest 1923ce648d4c 5 months ago 137.5 MB
76 </code></pre></notextile>
78 h2. Updating the Arvados Docker containers
80 @build.sh@ takes a few optional arguments:
84 ~$ <span class="userinput"> ./build.sh --help</span>
86 usage: ./build.sh [options]
88 Calling ./build.sh without arguments will build all Arvados docker images
91 -h, --help Print this help text
92 clean Clear all build information
93 realclean clean and remove all Arvados Docker images except arvados/debian
94 deepclean realclean and remove arvados/debian, crosbymichael/skydns and
95 crosbymichael/skydns Docker images
96 </code></pre></notextile>
98 If there has been an update to the Arvados Docker building code, it is safest to rebuild the Arvados Docker images from scratch. All build information can be cleared with the 'clean' option to build.sh:
101 <pre><code>~$ <span class="userinput">./build.sh clean</span></code></pre>
104 You can also use 'realclean', which does what 'clean' does and in addition removes all Arvados Docker containers and images from your system, with the exception of the arvados/debian image.
107 <pre><code>~$ <span class="userinput">./build.sh realclean</span></code></pre>
110 Finally, the 'deepclean' option does what 'realclean' does, and also removes the arvados/debian, crosbymichael/skydns and crosbymichael/skydock images.
113 <pre><code>~$ <span class="userinput">./build.sh deepclean</span></code></pre>
116 h2. Running the Arvados Docker containers
118 The @arvdock@ command can be used to start and stop the docker containers. It has a number of options:
122 ~$ <span class="userinput">./arvdock -h</span>
124 usage: ./arvdock (start|stop|restart|reset|test) [options]
126 start run new or restart stopped arvados containers
127 stop stop arvados containers
128 restart stop and then start arvados containers
129 reset stop and delete containers WARNING: this will delete the data inside Arvados!
132 ./arvdock start/stop/restart options:
133 -d[port], --doc[=port] Documentation server (default port 9898)
134 -w[port], --workbench[=port] Workbench server (default port 9899)
135 -s[port], --sso[=port] SSO server (default port 9901)
136 -a[port], --api[=port] API server (default port 9900)
137 -c, --compute Compute nodes (starts 2)
138 -v, --vm Shell server
139 -n, --nameserver Nameserver
140 -k, --keep Keep servers
141 -p, --keepproxy Keepproxy server
142 -h, --help Display this help and exit
144 If no options are given, the action is applied to all servers.
146 ./arvdock test [testname] [testname] ...
147 By default, all tests are run.
152 To debug issues with the Docker containers use @docker exec@, for example:
156 ~$ <span class="userinput">docker exec -t -i api_server /bin/bash</span>
157 </code></pre></notextile>
159 To start the docker containers:
163 ~$ <span class="userinput">./arvdock start</span>
168 start_keepproxy=false
169 start_nameserver=false
172 start_workbench=false
173 Starting crosbymichael/skydns container...
175 /usr/bin/docker.io run -d -p 172.17.42.1:53:53/udp --name skydns crosbymichael/skydns -nameserver 8.8.8.8:53 -domain arvados
176 89922ec786cbd2098ed6bae205468a675657cdb2db0e0bfdfe76d1e43cb2fe35
177 Starting crosbymichael/skydock container...
179 /usr/bin/docker.io run -d -v /var/run/docker.sock:/docker.sock --name skydock crosbymichael/skydock -ttl 30 -environment dev -s /docker.sock -domain arvados -name skydns
180 de6a35bb20fb9063fb97218ba2554974546eed969d43b1f5aa31a1ac9576e802
181 Starting container: api_server
182 /usr/bin/docker.io start api_server
183 Started container: api_server
184 Starting container: compute0
185 /usr/bin/docker.io start compute0
186 Started container: compute0
187 Starting container: compute1
188 /usr/bin/docker.io start compute1
189 Started container: compute1
190 Starting container: keep_server_0
191 /usr/bin/docker.io start keep_server_0
192 Started container: keep_server_0
193 Starting container: keep_server_1
194 /usr/bin/docker.io start keep_server_1
195 Started container: keep_server_1
196 Starting container: keepproxy_server
197 /usr/bin/docker.io start keepproxy_server
198 Started container: keepproxy_server
199 Starting container: doc_server
200 /usr/bin/docker.io start doc_server
201 Started container: doc_server
203 ******************************************************************
204 You can access the Arvados documentation at http://doc.dev.arvados
205 ******************************************************************
207 Starting container: shell
208 /usr/bin/docker.io start shell
209 Started container: shell
210 Starting container: workbench_server
211 /usr/bin/docker.io start workbench_server
212 Started container: workbench_server
214 ********************************************************************
215 You can access the Arvados workbench at http://workbench.dev.arvados
216 ********************************************************************
218 *****************************************************************
219 To access Arvados you must add the Arvados nameserver to the top
220 of your DNS configuration in /etc/resolv.conf:
221 nameserver 172.17.42.1
222 ******************************************************************
224 </code></pre></notextile>
226 h2. Accessing workbench
228 Point your browser to the Dockerized workbench:
231 <pre><code><span class="userinput">http://workbench.dev.arvados</span>
235 Now use the google account you specified as @API_AUTO_ADMIN_USER@ in @config.yml@ to log in.
237 You will be prompted 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. If you use a local SSO server in a Docker container, you will be prompted *twice*. The default is to use the Curoverse SSO server.