Google Cloud Certified – Professional Cloud DevOps Engineer – Practice Exam (Question 20)
Question 1
You use a multiple step Google Cloud Build pipeline to build and deploy your application to Google Kubernetes Engine (GKE).
You want to integrate with a third-party monitoring platform by performing a HTTP POST of the build information to a webhook. You want to minimize the development effort.
What should you do?
- A. Add logic to each Google Cloud Build step to HTTP POST the build information to a webhook.
- B. Add a new step at the end of the pipeline in Google Cloud Build to HTTP POST the build information to a webhook.
- C. Use Stackdriver Logging to create a logs-based metric from the Google Cloud Build logs. Create an Alert with a Webhook notification type.
- D. Create a Google Cloud Pub/Sub push subscription to the Google Cloud Build cloud-builds PubSub topic to HTTP POST the build information to a webhook.
Correct Answer: D
Reference:
– Configuring HTTP notifications | Cloud Build Documentation
Question 2
You deploy a new release of an internal application during a weekend maintenance window when there is minimal user traffic.
After the window ends, you learn that one of the new features isn’t working as expected in the production environment. After an extended outage, you roll back the new release and deploy a fix. You want to modify your release process to reduce the mean time to recovery so you can avoid extended outages in the future.
What should you do? (Choose two.)
- A. Before merging new code, require 2 different peers to review the code changes.
- B. Adopt the blue/green deployment strategy when releasing new code via a CD server.
- C. Integrate a code linting tool to validate coding standards before any code is accepted into the repository.
- D. Require developers to run automated integration tests on their local development environments before release.
- E. Configure a CI server. Add a suite of unit tests to your code and have your CI server run them on commit and verify any changes.
Correct Answer: A, C
Question 3
You have a pool of application servers running on Google Compute Engine.
You need to provide a secure solution that requires the least amount of configuration and allows developers to easily access application logs for troubleshooting.
How would you implement the solution on GCP?
- A.
- Deploy the Stackdriver logging agent to the application servers.
- Give the developers the IAM Logs Viewer role to access Stackdriver and view logs.
- B.
- Deploy the Stackdriver logging agent to the application servers.
- Give the developers the IAM Logs Private Logs Viewer role to access Stackdriver and view logs.
- C.
- Deploy the Stackdriver monitoring agent to the application servers.
- Give the developers the IAM Monitoring Viewer role to access Stackdriver and view metrics.
- D.
- Install the gsutil command line tool on your application servers.
- Write a script using gsutil to upload your application log to a Google Cloud Storage bucket, and then schedule it to run via cron every 5 minutes.
- Give the developers the IAM Object Viewer access to view the logs in the specified bucket.