Goolge Cloud Skills Boost

GSP314

컨텐츠 정보

본문

## Task 1 : Create Production Environment ### SSH to kraken-jumphost and run **cd /work/dm** 1. ``` sed -i s/SET_REGION/us-east1/g prod-network.yaml ``` 2. ``` gcloud deployment-manager deployments create prod-network --config=prod-network.yaml ``` 3. ``` gcloud config set compute/zone us-east1-b ``` 4. ``` gcloud container clusters create kraken-prod \ --num-nodes 2 \ --network kraken-prod-vpc \ --subnetwork kraken-prod-subnet\ --zone us-east1-b ``` 5. ``` gcloud container clusters get-credentials kraken-prod ``` 6. ``` cd /work/k8s ``` 7. ``` for F in $(ls *.yaml); do kubectl create -f $F; done ``` ## Task 2 : Setup the Admin instance > Still in kraken-jumphost's SSH, run 8. ``` gcloud config set compute/zone us-east1-b ``` 9. ``` gcloud compute instances create kraken-admin --network-interface="subnet=kraken-mgmt-subnet" --network-interface="subnet=kraken-prod-subnet" ``` * Open monitoring * Create an alert * Configure the policy to email your email and set > Resource Type : VM Instance Metric : CPU utilization Filter : instance_name Value : kraken-admin Condition : is above Threshold : 50% For : 1 minute ## Task 3 : Verify the Spinnaker deployment Switch to cloudshell, run ``` // 1 gcloud config set compute/zone us-east1-b // 2 gcloud container clusters get-credentials spinnaker-tutorial // 3 DECK_POD=$(kubectl get pods --namespace default -l "cluster=spin-deck" -o jsonpath="{.items[0].metadata.name}") // 4 kubectl port-forward --namespace default $DECK_POD 8080:9000 >> /dev/null & ``` * Go to cloudshell webpreview * Go to applications -> sample * Open pipelines and manually run the pipeline if it has not already running. * Approve the deployment to production. * Check the production frontend endpoint (use http, not the default https) * Back to cloudshell, run to push a change ``` // 1 gcloud config set compute/zone us-east1-b // 2 gcloud source repos clone sample-app // 3 cd sample-app touch a // 4 git config --global user.email "$(gcloud config get-value account)" git config --global user.name "Student" git commit -a -m "change" git tag v1.0.1 git push --tags ```

관련자료

댓글 2
전체 18 / 1 페이지
RSS

최근글


새댓글