19
19
../terraform-install.sh
20
20
```
21
21
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
+
22
46
## Set up the environment
23
47
24
48
1 . Set the project, replace ` YOUR_PROJECT ` with your project ID:
@@ -42,7 +66,7 @@ export GOOGLE_PROJECT=$(gcloud config get-value project)
42
66
43
67
```
44
68
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]* ')"
46
70
acme_email = "$(gcloud config get-value account)"
47
71
EOF
48
72
@@ -59,30 +83,6 @@ This example creates a Cloud Endpoints service and requires that the Service Man
59
83
gcloud services enable servicemanagement.googleapis.com
60
84
```
61
85
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
-
86
86
## Run Terraform
87
87
88
88
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
142
142
```
143
143
terraform destroy -input=false -auto-approve -target helm_release.nginx-ingress && sleep 60 && \
144
144
terraform destroy
145
- ```
145
+ ```
0 commit comments