Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[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. 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.
28
29 Run @build.sh@ without arguments to generate @config.yml@ and build all Docker containers (this will take a while!):
30
31 <notextile>
32 <pre><code>
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.
38
39 Enter your Google ID email address here:
40
41 ...
42
43 Step 7 : ADD generated/setup.sh /usr/local/bin/setup.sh
44  ---> d7c0e7fdf7ab
45 Removing intermediate container f3d81180795d
46 Step 8 : CMD ["/usr/bin/supervisord", "-n"]
47  ---> Running in 84c64cb9f0d5
48  ---> d6cbb5002604
49 Removing intermediate container 84c64cb9f0d5
50 Successfully built d6cbb5002604
51 date >shell-image
52 </code></pre></notextile>
53
54 If all goes well, you should now have a number of docker images built:
55
56 <notextile>
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/workbench       latest              b0e4fb6da385        12 minutes ago      2.218 GB
63 arvados/doc             latest              4b64daec9454        12 minutes ago      1.524 GB
64 arvados/compute         latest              7f1f5f7faf54        13 minutes ago      1.862 GB
65 arvados/slurm           latest              f5bfd1008e6b        17 minutes ago      1.573 GB
66 arvados/api             latest              6b93c5f5fc42        17 minutes ago      2.274 GB
67 arvados/passenger       latest              add2d11fdf24        18 minutes ago      1.738 GB
68 arvados/base            latest              81eaadd0c6f5        22 minutes ago      1.463 GB
69 arvados/debian          7.6                 f339ce275c01        6 days ago          116.8 MB
70 arvados/debian          latest              f339ce275c01        6 days ago          116.8 MB
71 arvados/debian          wheezy              f339ce275c01        6 days ago          116.8 MB
72 crosbymichael/skydock   latest              e985023521f6        3 months ago        510.7 MB
73 crosbymichael/skydns    next                79c99a4608ed        3 months ago        525 MB
74 crosbymichael/skydns    latest              1923ce648d4c        5 months ago        137.5 MB
75 </code></pre></notextile>
76
77 h2. Updating the Arvados Docker containers
78
79 @build.sh@ takes a few optional arguments:
80
81 <notextile>
82 <pre><code>
83 ~$ <span class="userinput"> ./build.sh --help</span>
84
85 usage: ./build.sh [options]
86
87 Calling ./build.sh without arguments will build all Arvados docker images
88
89 ./build.sh options:
90   -h, --help   Print this help text
91   clean        Clear all build information
92   realclean    clean and remove all Arvados Docker images except arvados/debian
93   deepclean    realclean and remove arvados/debian, crosbymichael/skydns and
94                crosbymichael/skydns Docker images
95 </code></pre></notextile>
96
97 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:
98
99 <notextile>
100 <pre><code>~$ <span class="userinput">./build.sh clean</span></code></pre>
101 </notextile>
102
103 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.
104
105 <notextile>
106 <pre><code>~$ <span class="userinput">./build.sh realclean</span></code></pre>
107 </notextile>
108
109 Finally, the 'deepclean' option does what 'realclean' does, and also removes the arvados/debian, crosbymichael/skydns and crosbymichael/skydock images.
110
111 <notextile>
112 <pre><code>~$ <span class="userinput">./build.sh deepclean</span></code></pre>
113 </notextile>
114
115 h2. Running the Arvados Docker containers
116
117 The @arvdock@ command can be used to start and stop the docker containers. It has a number of options:
118
119 <notextile>
120 <pre><code>
121 ~$ <span class="userinput">./arvdock -h</span>
122
123 usage: ./arvdock (start|stop|restart|test) [options]
124
125 ./arvdock start/stop/restart options:
126   -d[port], --doc[=port]        Documentation server (default port 9898)
127   -w[port], --workbench[=port]  Workbench server (default port 9899)
128   -s[port], --sso[=port]        SSO server (default port 9901)
129   -a[port], --api[=port]        API server (default port 9900)
130   -c, --compute                 Compute nodes (starts 2)
131   -v, --vm                      Shell server
132   -n, --nameserver              Nameserver
133   -k, --keep                    Keep servers
134   --ssh                         Enable SSH access to server containers
135   -h, --help                    Display this help and exit
136
137   If no options are given, the action is applied to all servers.
138
139 ./arvdock test [testname] [testname] ...
140   By default, all tests are run.
141 </code>
142 </pre>
143 </notextile>
144
145 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.
146
147 Start the docker containers:
148
149 <notextile>
150 <pre><code>
151 ~$ <span class="userinput">./arvdock start</span>
152 sso_server
153 Starting container:
154   /usr/bin/docker.io run -d -i -t -p 9901:443 --name sso_server arvados/sso
155 api_server
156 Starting container:
157   /usr/bin/docker.io run -d -i -t -p 9900:443 --name api_server --link sso_server:sso arvados/api
158 keep_server_0
159 Starting container:
160   /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
161 keep_server_1
162 Starting container:
163   /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
164 doc_server
165 Starting container:
166   /usr/bin/docker.io run -d -i -t -p 9898:80 --name doc_server arvados/doc
167
168 *****************************************************************
169 You can access the Arvados documentation at http://localhost:9898
170 *****************************************************************
171
172 workbench_server
173 Starting container:
174   /usr/bin/docker.io run -d -i -t -p 9899:80 --name workbench_server --link api_server:api arvados/workbench
175
176 *****************************************************************
177 You can access the Arvados workbench at http://localhost:9899
178 *****************************************************************
179 </code></pre></notextile>
180
181 h2. Accessing workbench
182
183 Point your browser to the Dockerized workbench:
184
185 <notextile>
186 <pre><code><span class="userinput">https://localhost:9899</span>
187 </code></pre>
188 </notextile>
189
190 Now use the google account you specified as @API_AUTO_ADMIN_USER@ in @config.yml@ to log in.
191
192 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.
193
194