DO NOT START WITHOUT LAB RESOURCES!
DO NOT MAKE HASTE. COPY PASTE STEP BY STEP OTHERWISE IT WILL NOT WORK.
TASK 1:
GO TO COMPUTE ENGINE > VM INSTANCES > OPEN SSH OF kraken-jumphost
TYPE THE COMMANDS IN SSH:
cd /work/dm
sed -i s/SET_REGION/us-east1/g prod-network.yaml
gcloud deployment-manager deployments create prod-network --config=prod-network.yaml
gcloud config set compute/zone us-east1-b
gcloud container clusters create kraken-prod --num-nodes 2 --network kraken-prod-vpc --subnetwork kraken-prod-subnet --zone us-east1-b
gcloud container clusters get-credentials kraken-prod
cd /work/k8s
for F in $(ls *.yaml); do kubectl create -f $F; done
TASK 2
STAY IN SSH AND TYPE THESE COMMANDS BELOW:
gcloud config set compute/zone us-east1-b
gcloud compute instances create kraken-admin --network-interface="subnet=kraken-mgmt-subnet" --network-interface="subnet=kraken-prod-subnet"
OPEN MONITORING > ALERTING > CREATE POLICY
ADD CONDITION
RESOURCE TYPE: VM Instance
METRIC: CPU Utilization
FILTER: Instance Name
Instance Value: kraken-admin
Click Apply
THRESHOLD: 50
FOR: 1 minute
PRESS NEXT
MANAGE NOTIFICATION
ADD EMAIL
PRESS NEXT
ALERT NAME: kraken-admin
PRESS CREATE
TASK 3
OPEN CLOUD SHELL
gcloud config set compute/zone us-east1-b
gcloud container clusters get-credentials spinnaker-tutorial
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 &
CLOUD SHELL > WEB PREVIEW
SPINNAKER WILL OPEN
CLICK ON APPLICATIONS
CLICK ON "sample"
CLICK ON "PIPELINES"
HOVER OVER THE ORANGE BLOCK AND PRESS "continue"
ONCE EVERYTHING IS DEPLOYED COME BACK TO CLOUD SHELL
gcloud config set compute/zone us-east1-b
gcloud source repos clone sample-app
cd sample-app
touch aB #CHANGE THE NAME HERE IF THIS IS NOT WORKING
git config --global user.email "$(gcloud config get-value account)"
git config --global user.name "Student1" #can change student1 name
git commit -aB -m "change1" #IF YOU HAVE CHANGED ABOVE ALSO MAKE CHANGES HERE. ALSO CHANGE “change1” if Required during 2nd or 3rd deployment
git tag v1.0.2 #also change tags in 2nd or 3rd deployment attempt
git push --tags
TRY CHANGING TAG NAMES, commit etc... IT WILL WORK.
GO TO SPINNAKER
DEPLOY AGAIN
Congratulations you have completed the Lab!
Comments
Post a Comment