01999f0c2995bc6dd0cc38df719f7d9dbf0bf576
[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 created 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(#overview). Overview
19
20 This Helm Chart provides a basic, small Arvados cluster.
21
22 Current limitations, to be addressed in the future:
23
24 * An Arvados cluster created with this Helm Chart is entirely ephemeral, and all data stored on the cluster will be deleted when it is shut down.
25 * No dynamic scaling of compute nodes (but you can adjust @values.yaml@ and "reload the Helm Chart":#reload
26 * All compute nodes are the same size
27 * Compute nodes have no cpu/memory/disk constraints yet
28 * No git server
29
30 h2. Requirements
31
32 * Kubernetes 1.10+ cluster with at least 3 nodes, 2 or more cores per node
33 * @kubectl@ and @helm@ installed locally, and able to connect to your Kubernetes cluster
34
35 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 or "another Kubernetes solution":https://kubernetes.io/docs/setup/pick-right-solution/. Minikube is not supported yet.
36
37 h2(#helm). Initialize helm on the Kubernetes cluster
38
39 If you already have helm running on the Kubernetes cluster, proceed directly to "Start the Arvados cluster":#Start below.
40
41 <pre>
42 $ helm init
43 $ kubectl create serviceaccount --namespace kube-system tiller
44 $ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
45 $ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
46 </pre>
47
48 Test @helm@ by running
49
50 <pre>
51 $ helm ls
52 </pre>
53
54 There should be no errors. The command will return nothing.
55
56 h2(#git). Clone the repository
57
58 Clone the repository and nagivate to the @arvados-kubernetes/charts/arvados@ directory:
59
60 <pre>
61 $ git clone https://github.com/curoverse/arvados-kubernetes.git
62 $ cd arvados-kubernetes/charts/arvados
63 </pre>
64
65 h2(#Start). Start the Arvados cluster
66
67 Next, 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.
68
69 <pre>
70 $ ./cert-gen.sh <IP ADDRESS>
71 </pre>
72
73 The @values.yaml@ file contains a number of variables that can be modified. At a minimum, review and/or modify the values for
74
75 <pre>
76   adminUserEmail
77   adminUserPassword
78   superUserSecret
79   anonymousUserSecret
80 </pre>
81
82 Now start the Arvados cluster:
83
84 <pre>
85 $ helm install --name arvados . --set externalIP=<IP ADDRESS>
86 </pre>
87
88 At this point, you can use kubectl to see the Arvados cluster boot:
89
90 <pre>
91 $ kubectl get pods
92 $ kubectl get svc
93 </pre>
94
95 After a few minutes, you can access Arvados Workbench at the IP address specified
96
97 * https://&lt;IP ADDRESS&gt;
98
99 with the username and password specified in the @values.yaml@ file.
100
101 Alternatively, use the Arvados cli tools or SDKs:
102
103 Set the environment variables:
104
105 <pre>
106 $ export ARVADOS_API_TOKEN=<superUserSecret from values.yaml>
107 $ export ARVADOS_API_HOST=<STATIC IP>:444
108 $ export ARVADOS_API_HOST_INSECURE=true
109 </pre>
110
111 Test access with:
112
113 <pre>
114 $ arv user current
115 </pre>
116
117 h2(#reload). Reload
118
119 If you make changes to the Helm Chart (e.g. to @values.yaml@), you can reload Arvados with
120
121 <pre>
122 $ helm upgrade arvados .
123 </pre>
124
125 h2. Shut down
126
127 {% include 'notebox_begin_warning' %}
128 This Helm Chart does not retain any state after it is deleted. An Arvados cluster created 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.
129 {% include 'notebox_end' %}
130
131 <pre>
132 $ helm del arvados --purge
133 </pre>