3235: Merge branch 'master' into 3235-top-nav-site-search
[arvados.git] / doc / install / install-docker.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Installing with Docker
5 ...
6
7 h2. Purpose
8
9 This installation method is appropriate for local testing, evaluation, and development. For production use, this method is not recommended.
10
11 h2. Prerequisites
12
13 # A GNU/Linux (virtual) machine
14 # A working Docker installation (see "Installing Docker":https://docs.docker.com/installation/)
15
16 h2. Download the source tree
17
18 <notextile>
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>
22
23 See also: "Downloading the source code":https://arvados.org/projects/arvados/wiki/Download on the Arvados wiki.
24
25 h2. Building the Arvados Docker containers
26
27 First of all, a suitable @config.yml@ file is needed.
28
29 <notextile>
30 <pre><code>~$ <span class="userinput">cd arvados/docker</span>
31 ~$ <span class="userinput">cp config.yml.example config.yml</span>
32 </code></pre></notextile>
33
34 Edit the @config.yml@ file and fill in values for at a minimum these
35 parameters:
36
37 <pre>
38 PUBLIC_KEY_PATH
39 ARVADOS_USER_NAME
40 API_HOSTNAME
41 API_AUTO_ADMIN_USER
42 </pre>
43
44 Then build the docker containers (this will take a while):
45
46 <notextile>
47 <pre><code>
48 ~$ <span class="userinput">./build.sh</span>
49 ...
50 Step 7 : ADD generated/setup.sh /usr/local/bin/setup.sh
51  ---> d7c0e7fdf7ab
52 Removing intermediate container f3d81180795d
53 Step 8 : CMD ["/usr/bin/supervisord", "-n"]
54  ---> Running in 84c64cb9f0d5
55  ---> d6cbb5002604
56 Removing intermediate container 84c64cb9f0d5
57 Successfully built d6cbb5002604
58 date >shell-image
59 </code></pre></notextile>
60
61 If all goes well, you should now have a number of docker images built:
62
63 <notextile>
64 <pre><code>~$ <span class="userinput">docker.io images</span>
65 REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
66 arvados/shell           latest              d6cbb5002604        10 minutes ago      1.613 GB
67 arvados/sso             latest              377f1fa0108e        11 minutes ago      1.807 GB
68 arvados/keep            latest              ade0e0d2dd00        12 minutes ago      210.8 MB
69 arvados/workbench       latest              b0e4fb6da385        12 minutes ago      2.218 GB
70 arvados/doc             latest              4b64daec9454        12 minutes ago      1.524 GB
71 arvados/compute         latest              7f1f5f7faf54        13 minutes ago      1.862 GB
72 arvados/slurm           latest              f5bfd1008e6b        17 minutes ago      1.573 GB
73 arvados/api             latest              6b93c5f5fc42        17 minutes ago      2.274 GB
74 arvados/passenger       latest              add2d11fdf24        18 minutes ago      1.738 GB
75 arvados/base            latest              81eaadd0c6f5        22 minutes ago      1.463 GB
76 arvados/debian          7.6                 f339ce275c01        6 days ago          116.8 MB
77 arvados/debian          latest              f339ce275c01        6 days ago          116.8 MB
78 arvados/debian          wheezy              f339ce275c01        6 days ago          116.8 MB
79 crosbymichael/skydock   latest              e985023521f6        3 months ago        510.7 MB
80 crosbymichael/skydns    next                79c99a4608ed        3 months ago        525 MB
81 crosbymichael/skydns    latest              1923ce648d4c        5 months ago        137.5 MB
82 </code></pre></notextile>
83
84 h2. Updating the Arvados Docker containers
85
86 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:
87
88 <notextile>
89 <pre><code>~$ <span class="userinput">./build.sh clean</span></code></pre>
90 </notextile>
91
92 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.
93
94 <notextile>
95 <pre><code>~$ <span class="userinput">./build.sh realclean</span></code></pre>
96 </notextile>
97
98 Finally, the 'deepclean' option does what 'realclean' does, and also removes the arvados/debian, crosbymichael/skydns and crosbymichael/skydock images.
99
100 <notextile>
101 <pre><code>~$ <span class="userinput">./build.sh deepclean</span></code></pre>
102 </notextile>
103
104 h2. Running the Arvados Docker containers
105
106 The @arvdock@ command can be used to start and stop the docker containers. It has a number of options:
107
108 <notextile>
109 <pre><code>
110 ~$ <span class="userinput">./arvdock -h</span>
111
112 usage: ./arvdock (start|stop|restart|test) [options]
113
114 ./arvdock start/stop/restart options:
115   -d[port], --doc[=port]        Documentation server (default port 9898)
116   -w[port], --workbench[=port]  Workbench server (default port 9899)
117   -s[port], --sso[=port]        SSO server (default port 9901)
118   -a[port], --api[=port]        API server (default port 9900)
119   -c, --compute                 Compute nodes (starts 2)
120   -v, --vm                      Shell server
121   -n, --nameserver              Nameserver
122   -k, --keep                    Keep servers
123   --ssh                         Enable SSH access to server containers
124   -h, --help                    Display this help and exit
125
126   If no options are given, the action is applied to all servers.
127
128 ./arvdock test [testname] [testname] ...
129   By default, all tests are run.
130 </code>
131 </pre>
132 </notextile>
133
134 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.
135
136 Start the docker containers:
137
138 <notextile>
139 <pre><code>
140 ~$ <span class="userinput">./arvdock start</span>
141 sso_server
142 Starting container:
143   /usr/bin/docker.io run -d -i -t -p 9901:443 --name sso_server arvados/sso
144 api_server
145 Starting container:
146   /usr/bin/docker.io run -d -i -t -p 9900:443 --name api_server --link sso_server:sso arvados/api
147 keep_server_0
148 Starting container:
149   /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
150 keep_server_1
151 Starting container:
152   /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
153 doc_server
154 Starting container:
155   /usr/bin/docker.io run -d -i -t -p 9898:80 --name doc_server arvados/doc
156
157 *****************************************************************
158 You can access the Arvados documentation at http://localhost:9898
159 *****************************************************************
160
161 workbench_server
162 Starting container:
163   /usr/bin/docker.io run -d -i -t -p 9899:80 --name workbench_server --link api_server:api arvados/workbench
164
165 *****************************************************************
166 You can access the Arvados workbench at http://localhost:9899
167 *****************************************************************
168 </code></pre></notextile>
169
170 h2. Accessing workbench
171
172 Point your browser to the Dockerized workbench:
173
174 <notextile>
175 <pre><code><span class="userinput">https://localhost:9899</span>
176 </code></pre>
177 </notextile>
178
179 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.
180
181