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