Last active
April 21, 2020 17:30
-
-
Save yihyang/a0dc1f65c2d263217349590cbf7bcf15 to your computer and use it in GitHub Desktop.
DevOps Essentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Cloud Source Repositories: Qwik Start | |
| # Create a new repository | |
| gcloud source repos create REPO_DEMO | |
| # Clone the new repository into your Cloud Shell session | |
| gcloud source repos clone REPO_DEMO | |
| # Push to the Cloud Source Repository | |
| cd REPO_DEMO | |
| echo "Hello World!" > myfile.txt | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Your Name" | |
| git add myfile.txt | |
| git commit -m "First file using Cloud Source Repositories" myfile.txt | |
| git push origin master | |
| # Browse files in the Google Cloud Source repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Site Reliability Troubleshooting with Cloud Monitoring APM | |
| # Infrastructure setup | |
| gcloud config set compute/zone us-west1-b | |
| export PROJECT_ID=$(gcloud info --format='value(config.project)') | |
| gcloud container clusters list | |
| # Check your cluster | |
| gcloud container clusters get-credentials shop-cluster --zone us-west1-b | |
| kubectl get nodes | |
| # Deploy application | |
| git clone -b APM-Troubleshooting-Demo-2 https://github.com/blipzimmerman/microservices-demo-1 | |
| curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v0.36.0/skaffold-linux-amd64 && chmod +x skaffold && sudo mv skaffold /usr/local/bin | |
| cd microservices-demo-1 | |
| skaffold run | |
| kubectl get pods | |
| export EXTERNAL_IP=$(kubectl get service frontend-external | awk 'BEGIN { cnt=0; } { cnt+=1; if (cnt > 1) print $4; }') | |
| curl -o /dev/null -s -w "%{http_code}\n" http://$EXTERNAL_IP | |
| ./setup_csr.sh | |
| # Develop Sample SLOs and SLIs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment