ACE-T5 Flashcards

1
Q

You are developing a mobile game that uses Cloud Datastore for gaming leaderboards and player profiles. You want to test an aspect of this solution locally on your Ubuntu workstation which already has Cloud SDK installed. What should you do?

A

Install Datastore emulator to provide local emulation of the production datastore environment in your local workstation by running gcloud components install.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You’ve deployed a microservice that uses sha1 algorithm with a salt value to has usernames. You deployed this to GKE cluster using deployment file:

A

Save the salt value in a Kubernetes secret object. Modify the YAML configuration file to reference the secret object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You have one GCP project with default region and zone set to us-east1 and us-east1-b respectively. You have another GCP project with default region and zone set to us-west1 and us-west1-a respectively. You want to provision a VM in each of these projects efficiently using gcloud CLI. What should you do?

A

Execute gcloud config configuration create [config name] to create two configurations, one for each project. Execute gcloud config configurations activate [config name] to activate the first configuration, and gcloud compute instances create to create the VM. Repeat the steps for other configuration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You have been asked to create a new Kubernetes Cluster on Google Kubernetes Engine that can autoscale the number of worker nodes as well as pods. What should you do? (Select 2)

A

Create a GKE cluster and enable autoscaling on Kubernetes Engine. Just specify a minimum and maximum size for the node pool, and the rest is automatic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You are designing a mobile game which you hope will be used by numerous users around the world. The game backend requires a Relational DataBase Management System (RDBMS) for persisting game state and player profiles. You want to select a database that can scale to a global audience with minimal configuration updates. Which database should you choose?

A

Cloud Spanner
is a highly scalable, enterprise-grade, globally-distributed, and strongly consistent database service built for the cloud specifically to combine the benefits of relational database structure with a non-relational horizontal scale.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You ran the following commands to create two compute instances.
$gcloud compute instances create instance1
$gcloud compute instances create instance2

Both compute instances were created in europe-west2-a zone but you want to create them in other zones.
You want to modify the gcloud configuration such that you are prompted for a zone when you execute the create instance commands above. What should you do?

A

gcloud config unset compute/zone.
This command uses the correct syntax and correctly unsets the zone in gcloud configuration. The next time gcloud compute instances create command runs, it knows there is no default zone defined in gcloud configuration and therefore prompts for a zone before the instance can be created.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Your company owns a mobile game that is popular with users all over the world. The mobile game backend uses Cloud Spanner to store user state. An overnight job exports user state to a Cloud Storage bucket. The app pushes all time-series events during the game to a streaming Dataflow service that saves them to Cloud Bigtable. You are debugging an in-game issue raised by a gamer, and you want to join the user state information with data stored in Bigtable to debug. How can you do this one-off join efficiently?

A

Create two external tables in BigQuery and link them to the Cloud BigTable and Cloud Storage data sources, respectively. Execute a query in BigQuery console to join up data between the two external tables for the specific gamer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You want to create two compute instances - one in europe-west2-a and another in europe-west2-b. What should you do? (Select 2)

A

$gcloud compute instances create instance1

$gcloud compute instances create instance2 –zone=europe-west2-b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You deployed a number of services to Google App Engine Standard. The services are designed as microservices with several interdependencies between them. Most services have few version upgrades but some key services have over 20 version upgrades. You identified an issue with the service pt-createOrder and deployed a new version v3 for this service. You are confident this works and want this new version to receive all traffic for the service. You want to minimize effort and ensure the availability of service. What should you do?

A

Execute gcloud app versions migrate v3 –service=”pt-createOrder”.
This command correctly migrates the service pt-createOrder to use version 3 and produces the intended outcome while minimizing effort and ensuring the availability of service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The application development team at your company wants to use the biggest CIDR range possible for a VPC and has asked for your suggestion. Your operations team is averse to using any beta features. What should you suggest?

A

Use 10.0.0.0/8 CIDR range.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Your operations team have deployed an update to a production application running in Google Cloud App Engine Standard service. The deployment was successful, but your operations are unable to find this deployment in the production GCP project. What should you do?

A

Review the properties of the active gcloud configurations by executing gcloud config list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

You want to deploy a python application to an autoscaled managed instance group on Compute Engine. You want to use GCP deployment manager to do this. What is the fastest way to get the application onto the instances without introducing undue complexity?

A

Include a startup script to bootstrap the python application when creating instance template by running

gcloud compute instance-templates create app-template –metadata-from-file startup-script=/scripts/install_app.sh.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Your company hosts a number of applications in Google Cloud and requires that log messages from all applications be archived for 10 years to comply with local regulatory requirements. Which approach should you use?

A
  1. Enable Stackdriver Logging API
  2. Configure web applications to send logs to Stackdriver
  3. Export logs to Google Cloud Storage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You want to find a list of regions and the prebuilt images offered by Google Compute Engine. Which commands should you execute to retrieve this information?

A

gcloud compute regions list

gcloud compute images list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Your company recently migrated all infrastructure to Google Cloud Platform (GCP) and you want to use Google Cloud Build to build all container images. You want to store the build logs in Google Cloud Storage. You also have a requirement to push the images to Google Container Registry.
You wrote a cloud build YAML configuration file with the following contents.
steps:
- name: ‘gcr.io/cloud-builders/docker’
args: [‘build’, ‘-t’, ‘gcr.io/[PROJECT_ID]/[IMAGE_NAME]’, ‘.’]
images: [‘gcr.io/[PROJECT_ID]/[IMAGE_NAME]’]

How should you execute Cloud build to satisfy these requirements?

A

Execute gcloud builds submit –config=[CONFIG_FILE_PATH] –gcs-log-dir=[GCS_LOG_DIR] [SOURCE].
This command correctly builds the container image, pushes the image to GCR (Google Container Registry) and uploads the build logs to Google Cloud Storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Your company has multiple GCP projects in several regions, and your operations team have created numerous gcloud configurations for most common operational needs. They have asked your help to retrieve an inactive gcloud configuration and the GKE clusters that use it, using the least number of steps. What command should you execute to retrieve this information?

A

Execute kubectl config get-contexts.

kubectl config get-contexts displays a list of contexts as well as the clusters that use them.