13650: Merge branch 'master' into 13650-document-arvados-kubernetes
[arvados.git] / doc / install / arvados-on-kubernetes.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Arvados on Kubernetes
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 Arvados on Kubernetes is implemented as a Helm chart.
13
14 {% include 'notebox_begin_warning' %}
15 This Helm chart does not retain any state after it is deleted. An Arvados cluster spun up with this Helm Chart is entirely ephemeral, and all data stored on the cluster will be deleted when it is shut down. This will be fixed in a future version.
16 {% include 'notebox_end' %}
17
18 h2. Requirements
19
20 * Kubernetes 1.10+ cluster with at least 3 nodes, 2 or more cores per node
21 * @kubectl@ and @helm@ installed locally, and able to connect to your Kubernetes cluster
22
23 If you do not have a Kubernetes cluster already set up, you can use "Google Kubernetes Engine":/install/arvados-on-kubernetes-GKE.html for multi-node development and testing, "Minikube":/install/arvados-on-kubernetes-minikube.html for single node development and testing or "another Kubernetes solution":https://kubernetes.io/docs/setup/pick-right-solution/.
24
25 h2(#helm). Initialize helm on the Kubernetes cluster
26
27 If you already have helm running on the Kubernetes cluster, proceed directly to "Start the Arvados cluster":#Start below.
28
29 <pre>
30 $ helm init
31 $ kubectl create serviceaccount --namespace kube-system tiller
32 $ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
33 $ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
34 </pre>
35
36 Test @helm@ by running
37
38 <pre>
39 $ helm ls
40 </pre>
41
42 There should be no errors. The command will return nothing.
43
44 h2(#Start). Start the Arvados cluster
45
46 First, determine the IP address that the Arvados cluster will use to expose its API, Workbench, etc. If you want this Arvados cluster to be reachable from places other than the local machine, the IP address will need to be routable as appropriate.
47
48 <pre>
49 $ git clone https://github.com/curoverse/arvados-kubernetes.git
50 $ cd arvados-kubernetes/charts/arvados
51 $ ./cert-gen.sh <IP ADDRESS>
52 </pre>
53
54 The @values.yaml@ file contains a number of variables that can be modified. At a minimum, review and/or modify the values for
55
56 <pre>
57   adminUserEmail
58   adminUserPassword
59   superUserSecret
60   anonymousUserSecret
61 </pre>
62
63 Now start the Arvados cluster:
64
65 <pre>
66 $ helm install --name arvados . --set externalIP=<IP ADDRESS>
67 </pre>
68
69 At this point, you can use kubectl to see the Arvados cluster boot:
70
71 <pre>
72 $ kubectl get pods
73 $ kubectl get svc
74 </pre>
75
76 After a few minutes, you can access Arvados Workbench at the IP address specified
77
78 * https://&lt;IP ADDRESS&gt;
79
80 with the username and password specified in the @values.yaml@ file.
81
82 Alternatively, use the Arvados cli tools or SDKs:
83
84 Set the environment variables:
85
86 <pre>
87 $ export ARVADOS_API_TOKEN=<superUserSecret from values.yaml>
88 $ export ARVADOS_API_HOST=<STATIC IP>:444
89 $ export ARVADOS_API_HOST_INSECURE=true
90 </pre>
91
92 Test access with:
93
94 <pre>
95 $ arv user current
96 </pre>
97
98 h2. Reload
99
100 If you make changes to the Helm chart (e.g. to @values.yaml@), you can reload Arvados with
101
102 <pre>
103 $ helm upgrade arvados .
104 </pre>
105
106 h2. Shut down
107
108 {% include 'notebox_begin_warning' %}
109 This Helm chart does not retain any state after it is deleted. An Arvados cluster spun up with this Helm Chart is entirely ephemeral, and <strong>all data stored on the Arvados cluster will be deleted</strong> when it is shut down. This will be fixed in a future version.
110 {% include 'notebox_end' %}
111
112 <pre>
113 $ helm del arvados --purge
114 </pre>