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