Merge branch 'patch-1' of https://github.com/mr-c/arvados into mr-c-patch-1
[arvados.git] / doc / install / arvados-on-kubernetes-GKE.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Arvados on GKE
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 This page documents setting up and running the "Arvados on Kubernetes":/install/arvados-on-kubernetes.html @Helm@ chart on @Google Kubernetes Engine@ (GKE).
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. Prerequisites
19
20 h3. Install tooling
21
22 Install @gcloud@:
23
24 * Follow the instructions at "https://cloud.google.com/sdk/downloads":https://cloud.google.com/sdk/downloads
25
26 Install @kubectl@:
27
28 <pre>
29 $ gcloud components install kubectl
30 </pre>
31
32 Install @helm@:
33
34 * Follow the instructions at "https://docs.helm.sh/using_helm/#installing-helm":https://docs.helm.sh/using_helm/#installing-helm
35
36 h3. Create the GKE cluster
37
38 This can be done via the "cloud console":https://console.cloud.google.com/kubernetes/ or via the command line:
39
40 <pre>
41 $ gcloud container clusters create <CLUSTERNAME> --zone us-central1-a --machine-type n1-standard-2 --cluster-version 1.15
42 </pre>
43
44 It takes a few minutes for the cluster to be initialized.
45
46 h3. Reserve a static IP
47
48 Reserve a "static IP":https://console.cloud.google.com/networking/addresses in GCE. Make sure the IP is in the same region as your GKE cluster, and is of the "Regional" type.
49
50 h3. Connect to the GKE cluster.
51
52 Via the web:
53 * Click the "Connect" button next to your "GKE cluster"https://console.cloud.google.com/kubernetes/.
54 * Execute the "Command-line access" command on your development machine.
55
56 Alternatively, use this command:
57
58 <pre>
59 $ gcloud container clusters get-credentials <CLUSTERNAME> --zone us-central1-a --project <YOUR-PROJECT>
60 </pre>
61
62 Test the connection:
63
64 <pre>
65 $ kubectl get nodes
66 </pre>
67
68 Test @helm@ by running
69
70 <pre>
71 $ helm ls
72 </pre>
73
74 There should be no errors. The command will return nothing.
75
76 h2(#git). Clone the repository
77
78 Clone the repository and nagivate to the @arvados-k8s/charts/arvados@ directory:
79
80 <pre>
81 $ git clone https://github.com/arvados/arvados-k8s.git
82 $ cd arvados-k8s/charts/arvados
83 </pre>
84
85 h2(#Start). Start the Arvados cluster
86
87 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.
88
89 <pre>
90 $ ./cert-gen.sh <IP ADDRESS>
91 </pre>
92
93 The @values.yaml@ file contains a number of variables that can be modified. At a minimum, review and/or modify the values for
94
95 <pre>
96   adminUserEmail
97   adminUserPassword
98   superUserSecret
99   anonymousUserSecret
100 </pre>
101
102 Now start the Arvados cluster:
103
104 <pre>
105 $ helm install arvados . --set externalIP=<IP ADDRESS>
106 </pre>
107
108 At this point, you can use kubectl to see the Arvados cluster boot:
109
110 <pre>
111 $ kubectl get pods
112 $ kubectl get svc
113 </pre>
114
115 After a few minutes, there shouldn't be any services listed with a 'Pending' external IP address. At that point you can access Arvados Workbench at the IP address specified
116
117 * https://&lt;IP ADDRESS&gt;
118
119 with the username and password specified in the @values.yaml@ file.
120
121 Alternatively, use the Arvados cli tools or SDKs. First set the environment variables:
122
123 <pre>
124 $ export ARVADOS_API_TOKEN=<superUserSecret from values.yaml>
125 $ export ARVADOS_API_HOST=<STATIC IP>:444
126 $ export ARVADOS_API_HOST_INSECURE=true
127 </pre>
128
129 Test access with:
130
131 <pre>
132 $ arv user current
133 </pre>
134
135 h2(#reload). Reload
136
137 If you make changes to the Helm chart (e.g. to @values.yaml@), you can reload Arvados with
138
139 <pre>
140 $ helm upgrade arvados .
141 </pre>
142
143 h2. Shut down
144
145 {% include 'notebox_begin_warning' %}
146 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.
147 {% include 'notebox_end' %}
148
149 <pre>
150 $ helm del arvados
151 </pre>
152
153 <pre>
154 $ gcloud container clusters delete <CLUSTERNAME> --zone us-central1-a
155 </pre>