Deploying Spinnaker using Helm

Let's perform the following steps to deploy the Spinnaker tool using Helm charts:

  1. Verify that helm is installed and initialized on your GKE cluster. If not, follow the instructions in Chapter 2, Operating Applications on Kubernetes, in the Deploying workloads using Helm charts recipe to install Helm. The following command will return the client and server of Helm if it's installed on your cluster:
$ helm version --short
Client: v2.14.3+g0e7f3b6
Server: v2.14.3+g0e7f3b6
  1. Create clusterrolebinding for the ci-admin service account:
$ kubectl create clusterrolebinding 
--clusterrole=cluster-admin
--serviceaccount=default:default
ci-admin
  1. Create a pipeline configuration bucket using the following command. Make sure to replace the devopscookbook-ci-config bucket name with a unique name. This will create an object storage bucket on Google Cloud Storage:
$ gsutil mb -c regional -l us-central1 gs://devopscookbook-ci-config
  1. Create a variable with the content of the cicd-account key:
$ export CICDKEY_JSON=$(cat cicd-key.json)
  1. Edit the spinnaker-config.yaml file in the cd /src/chapter3/gcp directory and replace the following bucket name with the bucket name you used in step 3:
gcs:
enabled: true
bucket: devopscookbook-ci-config
project: devopscookbok
jsonKey: '$CICDKEY_JSON'
...
  1. Deploy Spinnaker on your Kubernetes cluster using the custom spinnaker-config.yaml file from step 5:
$ helm install -n cd stable/spinnaker -f 
spinnaker-config.yaml --timeout 600 --wait
  1. Create port forwarding tunnels to access the Spinnaker UI:
$ export DECK_POD=$(kubectl get pods --namespace default -l "cluster=spin-deck" -o jsonpath="{.items[0].metadata.name}")
$ kubectl port-forward --namespace default $DECK_POD 8080:9000 >> /dev/null &
$ export GATE_POD=$(kubectl get pods --namespace default -l "cluster=spin-gate" -o jsonpath="{.items[0].metadata.name}")
$ kubectl port-forward --namespace default $GATE_POD 8084

To be able to access the Spinnaker UI, we created port forwarding tunnels for our workstation. We could also create a cloud LoadBalancer to open ports to the internet, but port forwarding is safer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.164.75