Skip to content

Commit a951777

Browse files
authored
Update GKE deployment instructions (canada-ca#2215)
1 parent db3d4c4 commit a951777

1 file changed

Lines changed: 10 additions & 39 deletions

File tree

app/gke/README.md

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,20 @@ The files in this folder are patches and additions to the base configuration
44
stored in the bases folder. These patches and additions provide all the needed
55
tweaks and configuration needed to run the app on GKE.
66

7-
The `istio.yaml` file in this folder is generated with the following command:
7+
## Deploying on GKE
88

9-
```sh
10-
istioctl manifest generate --set meshConfig.accessLogFile=/dev/stdout --set meshConfig.accessLogEncoding=JSON > platform/base/istio.yaml
11-
```
9+
Deploying to GKE looks pretty much like our other deployments.
1210

13-
## Creating the cluster
11+
You will need proper credentials for this, including referencing all the right templates on [Notify](https://notification.canada.ca/) and `make credentials mode=prod` can give you a head start.
1412

15-
Currently we are just creating the cluster with the following command.
13+
The rest is pretty much the same:
1614

1715
```sh
18-
gcloud beta container --project "track-compliance" clusters create "tracker" \
19-
--region "northamerica-northeast1" --no-enable-basic-auth --release-channel "regular" \
20-
--machine-type "e2-highcpu-4" --image-type "COS_CONTAINERD" --disk-type "pd-standard" \
21-
--disk-size "50" --metadata disable-legacy-endpoints=true \
22-
--service-account "gke-node-service-account@track-compliance.iam.gserviceaccount.com" \
23-
--num-nodes "2" --enable-stackdriver-kubernetes --enable-ip-alias \
24-
--network "projects/track-compliance/global/networks/default" \
25-
--subnetwork "projects/track-compliance/regions/northamerica-northeast1/subnetworks/default" \
26-
--no-enable-master-authorized-networks \
27-
--addons HorizontalPodAutoscaling,HttpLoadBalancing,CloudRun \
28-
--enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0 \
29-
--workload-pool "track-compliance.svc.id.goog" --enable-shielded-nodes --shielded-secure-boot
16+
make cluster name=tracker
17+
make secrets env=gke
18+
make platform env=gke
19+
make app env=gke
20+
make deploy env=gke
3021
```
3122

32-
The number of options here testify to our increasingly opinionated take on
33-
cluster creation, as well as our attention to the [hardening guidelines for
34-
GKE](https://cloud.google.com/kubernetes-engine/docs/how-to/hardening-your-cluster).
35-
This will soon be captured in real code in a proper Infrastructure as Code type
36-
of way.
37-
38-
With the cluster up and running, you will need to provide the env files as
39-
described in the minikube setup:
40-
41-
```sh
42-
api.env
43-
kiali.env
44-
kiali.yaml
45-
postgres.env
46-
scanners.env
47-
```
48-
With those in place, the config can now be generated.
49-
50-
```sh
51-
kustomize build platform/overlays/gke | kubectl apply -f -
52-
```
23+
The last command `make deploy` sets up [Flux](https://fluxcd.io/) inside the cluster, so it can automate deployments.

0 commit comments

Comments
 (0)