Skip to content

Commit 57b220b

Browse files
committed
Small updates to example-gke-k8s-helm
Install helm earlier, as helm version is used in tfvars accomodate multi-digit helm versions
1 parent 1626073 commit 57b220b

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

example-gke-k8s-helm/README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@
1919
../terraform-install.sh
2020
```
2121

22+
## Install Helm
23+
24+
1. Install the latest version of Helm:
25+
26+
```
27+
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
28+
chmod 700 get_helm.sh
29+
./get_helm.sh
30+
31+
helm init --client-only
32+
```
33+
34+
2. Install the Terraform Helm provider:
35+
36+
```
37+
(
38+
set -x; cd "$(mktemp -d)" &&
39+
curl -fsSLO "https://github.com/mcuadros/terraform-provider-helm/releases/download/v0.5.1/terraform-provider-helm_v0.5.1_$(uname | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" &&
40+
tar -xvf terraform-provider-helm*.tar.gz &&
41+
mkdir -p ~/.terraform.d/plugins/ &&
42+
mv terraform-provider-helm*/terraform-provider-helm ~/.terraform.d/plugins/
43+
)
44+
```
45+
2246
## Set up the environment
2347

2448
1. Set the project, replace `YOUR_PROJECT` with your project ID:
@@ -42,7 +66,7 @@ export GOOGLE_PROJECT=$(gcloud config get-value project)
4266

4367
```
4468
cat > terraform.tfvars <<EOF
45-
helm_version = "$(helm version -c --short | egrep -o 'v[0-9].[0-9].[0-9]')"
69+
helm_version = "$(helm version -c --short | egrep -o 'v[0-9]*.[0-9]*.[0-9]*')"
4670
acme_email = "$(gcloud config get-value account)"
4771
EOF
4872
@@ -59,30 +83,6 @@ This example creates a Cloud Endpoints service and requires that the Service Man
5983
gcloud services enable servicemanagement.googleapis.com
6084
```
6185

62-
## Install Helm
63-
64-
1. Install the latest version of Helm:
65-
66-
```
67-
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
68-
chmod 700 get_helm.sh
69-
./get_helm.sh
70-
71-
helm init --client-only
72-
```
73-
74-
2. Install the Terraform Helm provider:
75-
76-
```
77-
(
78-
set -x; cd "$(mktemp -d)" &&
79-
curl -fsSLO "https://github.com/mcuadros/terraform-provider-helm/releases/download/v0.5.1/terraform-provider-helm_v0.5.1_$(uname | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" &&
80-
tar -xvf terraform-provider-helm*.tar.gz &&
81-
mkdir -p ~/.terraform.d/plugins/ &&
82-
mv terraform-provider-helm*/terraform-provider-helm ~/.terraform.d/plugins/
83-
)
84-
```
85-
8686
## Run Terraform
8787

8888
1. If you have run this example before within the last 30 days, undelete the Cloud Endpoints service named `drupal`:
@@ -142,4 +142,4 @@ helm list
142142
```
143143
terraform destroy -input=false -auto-approve -target helm_release.nginx-ingress && sleep 60 && \
144144
terraform destroy
145-
```
145+
```

0 commit comments

Comments
 (0)