ExamGecko
Home Home / Google / Associate Cloud Engineer

Google Associate Cloud Engineer Practice Test - Questions Answers, Page 14

Question list
Search
Search

List of questions

Search

Related questions











You need to create a copy of a custom Compute Engine virtual machine (VM) to facilitate an expected increase in application traffic due to a business acquisition. What should you do?

A.
Create a Compute Engine snapshot of your base VM. Create your images from that snapshot.
A.
Create a Compute Engine snapshot of your base VM. Create your images from that snapshot.
Answers
B.
Create a Compute Engine snapshot of your base VM. Create your instances from that snapshot.
B.
Create a Compute Engine snapshot of your base VM. Create your instances from that snapshot.
Answers
C.
Create a custom Compute Engine image from a snapshot. Create your images from that image.
C.
Create a custom Compute Engine image from a snapshot. Create your images from that image.
Answers
D.
Create a custom Compute Engine image from a snapshot. Create your instances from that image.
D.
Create a custom Compute Engine image from a snapshot. Create your instances from that image.
Answers
Suggested answer: D

Explanation:

A custom image belongs only to your project. To create an instance with a custom image, you must first have a custom image.

Preparing your instance for an image

You can create an image from a disk even while it is attached to a running VM instance. However, your image will be more reliable if you put the instance in a state that is easier for the image to capture. Use one of the following processes to prepare your boot disk for the image:

Stop the instance so that it can shut down and stop writing any data to the persistent disk.

If you can't stop your instance before you create the image, minimize the amount of writes to the disk and sync your file system.

Pause apps or operating system processes that write data to that persistent disk.

Run an app flush to disk if necessary. For example, MySQL has a FLUSH statement. Other apps might have similar processes.

Stop your apps from writing to your persistent disk.

Run sudo sync.

After you prepare the instance, create the image.

https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#prepare_instance_for_image

You have deployed an application on a single Compute Engine instance. The application writes logs to disk. Users start reporting errors with the application. You want to diagnose the problem. What should you do?

A.
Navigate to Cloud Logging and view the application logs.
A.
Navigate to Cloud Logging and view the application logs.
Answers
B.
Connect to the instance's serial console and read the application logs.
B.
Connect to the instance's serial console and read the application logs.
Answers
C.
Configure a Health Check on the instance and set a Low Healthy Threshold value.
C.
Configure a Health Check on the instance and set a Low Healthy Threshold value.
Answers
D.
Install and configure the Cloud Logging Agent and view the logs from Cloud Logging.
D.
Install and configure the Cloud Logging Agent and view the logs from Cloud Logging.
Answers
Suggested answer: D

Explanation:

Cloud Loging knows nothing about applications installed on the system without an agent collecting logs. Using the serial console is not a best-practice and is impractical on a large scale.

The VM images for Compute Engine and Amazon Elastic Compute Cloud (EC2) don't include the Logging agent, so you must complete these steps to install it on those instances. The agent runs under both Linux and Windows. Source: https://cloud.google.com/logging/docs/agent/logging/installation

An application generates daily reports in a Compute Engine virtual machine (VM). The VM is in the project corp-iot-insights. Your team operates only in the project corp-aggregate-reports and needs a copy of the daily exports in the bucket corp-aggregate-reports-storage. You want to configure access so that the daily reports from the VM are available in the bucket corp-aggregate-reports-storage and use as few steps as possible while following Google-recommended practices. What should you do?

A.
Move both projects under the same folder.
A.
Move both projects under the same folder.
Answers
B.
Grant the VM Service Account the role Storage Object Creator on corp-aggregate-reports-storage.
B.
Grant the VM Service Account the role Storage Object Creator on corp-aggregate-reports-storage.
Answers
C.
Create a Shared VPC network between both projects. Grant the VM Service Account the role Storage Object Creator on corp-iot-insights.
C.
Create a Shared VPC network between both projects. Grant the VM Service Account the role Storage Object Creator on corp-iot-insights.
Answers
D.
Make corp-aggregate-reports-storage public and create a folder with a pseudo-randomized suffix name. Share the folder with the IoT team.
D.
Make corp-aggregate-reports-storage public and create a folder with a pseudo-randomized suffix name. Share the folder with the IoT team.
Answers
Suggested answer: B

Explanation:

Predefined roles

The following table describes Identity and Access Management (IAM) roles that are associated with Cloud Storage and lists the permissions that are contained in each role. Unless otherwise noted, these roles can be applied either to entire projects or specific buckets.

Storage Object Creator (roles/storage.objectCreator) Allows users to create objects. Does not give permission to view, delete, or overwrite objects.

https://cloud.google.com/storage/docs/access-control/iam-roles#standard-roles

You built an application on your development laptop that uses Google Cloud services. Your application uses Application Default Credentials for authentication and works fine on your development laptop. You want to migrate this application to a Compute Engine virtual machine (VM) and set up authentication using Google- recommended practices and minimal changes. What should you do?

A.
Assign appropriate access for Google services to the service account used by the Compute Engine VM.
A.
Assign appropriate access for Google services to the service account used by the Compute Engine VM.
Answers
B.
Create a service account with appropriate access for Google services, and configure the application to use this account.
B.
Create a service account with appropriate access for Google services, and configure the application to use this account.
Answers
C.
Store credentials for service accounts with appropriate access for Google services in a config file, and deploy this config file with your application.
C.
Store credentials for service accounts with appropriate access for Google services in a config file, and deploy this config file with your application.
Answers
D.
Store credentials for your user account with appropriate access for Google services in a config file, and deploy this config file with your application.
D.
Store credentials for your user account with appropriate access for Google services in a config file, and deploy this config file with your application.
Answers
Suggested answer: B

Explanation:

In general, Google recommends that each instance that needs to call a Google API should run as a service account with the minimum permissions necessary for that instance to do its job. In practice, this means you should configure service accounts for your instances with the following process: Create a new service account rather than using the Compute Engine default service account. Grant IAM roles to that service account for only the resources that it needs. Configure the instance to run as that service account. Grant the instance the https://www.googleapis.com/auth/cloud-platform scope to allow full access to all Google Cloud APIs, so that the IAM permissions of the instance are completely determined by the IAM roles of the service account. Avoid granting more access than necessary and regularly check your service account permissions to make sure they are up-to-date. https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices

You need to create a Compute Engine instance in a new project that doesn't exist yet. What should you do?

A.
Using the Cloud SDK, create a new project, enable the Compute Engine API in that project, and then create the instance specifying your new project.
A.
Using the Cloud SDK, create a new project, enable the Compute Engine API in that project, and then create the instance specifying your new project.
Answers
B.
Enable the Compute Engine API in the Cloud Console, use the Cloud SDK to create the instance, and then use the ----project flag to specify a new project.
B.
Enable the Compute Engine API in the Cloud Console, use the Cloud SDK to create the instance, and then use the ----project flag to specify a new project.
Answers
C.
Using the Cloud SDK, create the new instance, and use the ----project flag to specify the new project. Answer yes when prompted by Cloud SDK to enable the Compute Engine API.
C.
Using the Cloud SDK, create the new instance, and use the ----project flag to specify the new project. Answer yes when prompted by Cloud SDK to enable the Compute Engine API.
Answers
D.
Enable the Compute Engine API in the Cloud Console. Go to the Compute Engine section of the Console to create a new instance, and look for the Create In A New Project option in the creation form.
D.
Enable the Compute Engine API in the Cloud Console. Go to the Compute Engine section of the Console to create a new instance, and look for the Create In A New Project option in the creation form.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/sdk/gcloud/reference/projects/create

Quickstart: Creating a New Instance Using the Command Line

Before you begin

1. In the Cloud Console, on the project selector page, select or create a Cloud project.

2. Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.

To use the gcloud command-line tool for this quickstart, you must first install and initialize the Cloud SDK:

1. Download and install the Cloud SDK using the instructions given on Installing Google Cloud SDK.

2. Initialize the SDK using the instructions given on Initializing Cloud SDK.

To use gcloud in Cloud Shell for this quickstart, first activate Cloud Shell using the instructions given on Starting Cloud Shell.

https://cloud.google.com/ai-platform/deep-learning-vm/docs/quickstart-cli#before-you-begin

Your company runs one batch process in an on-premises server that takes around 30 hours to complete. The task runs monthly, can be performed offline, and must be restarted if interrupted. You want to migrate this workload to the cloud while minimizing cost. What should you do?

A.
Migrate the workload to a Compute Engine Preemptible VM.
A.
Migrate the workload to a Compute Engine Preemptible VM.
Answers
B.
Migrate the workload to a Google Kubernetes Engine cluster with Preemptible nodes.
B.
Migrate the workload to a Google Kubernetes Engine cluster with Preemptible nodes.
Answers
C.
Migrate the workload to a Compute Engine VM. Start and stop the instance as needed.
C.
Migrate the workload to a Compute Engine VM. Start and stop the instance as needed.
Answers
D.
Create an Instance Template with Preemptible VMs On. Create a Managed Instance Group from the template and adjust Target CPU Utilization. Migrate the workload.
D.
Create an Instance Template with Preemptible VMs On. Create a Managed Instance Group from the template and adjust Target CPU Utilization. Migrate the workload.
Answers
Suggested answer: D

Explanation:

Install the workload in a compute engine VM, start and stop the instance as needed, because as per the question the VM runs for 30 hours, process can be performed offline and should not be interrupted, if interrupted we need to restart the batch process again. Preemptible VMs are cheaper, but they will not be available beyond 24hrs, and if the process gets interrupted the preemptible VM will restart.

You are developing a new application and are looking for a Jenkins installation to build and deploy your source code. You want to automate the installation as quickly and easily as possible. What should you do?

A.
Deploy Jenkins through the Google Cloud Marketplace.
A.
Deploy Jenkins through the Google Cloud Marketplace.
Answers
B.
Create a new Compute Engine instance. Run the Jenkins executable.
B.
Create a new Compute Engine instance. Run the Jenkins executable.
Answers
C.
Create a new Kubernetes Engine cluster. Create a deployment for the Jenkins image.
C.
Create a new Kubernetes Engine cluster. Create a deployment for the Jenkins image.
Answers
D.
Create an instance template with the Jenkins executable. Create a managed instance group with this template.
D.
Create an instance template with the Jenkins executable. Create a managed instance group with this template.
Answers
Suggested answer: A

Explanation:

Installing Jenkins

In this section, you use Cloud Marketplace to provision a Jenkins instance. You customize this instance to use the agent image you created in the previous section.

Go to the Cloud Marketplace solution for Jenkins.

Click Launch on Compute Engine.

Change the Machine Type field to 4 vCPUs 15 GB Memory, n1-standard-4.

Machine type selection for Jenkins deployment.

Click Deploy and wait for your Jenkins instance to finish being provisioned. When it is finished, you will see:

Jenkins has been deployed.

https://cloud.google.com/solutions/using-jenkins-for-distributed-builds-on-compute-engine#installing_jenkins

You have downloaded and installed the gcloud command line interface (CLI) and have authenticated with your Google Account. Most of your Compute Engine instances in your project run in the europe-west1-d zone. You want to avoid having to specify this zone with each CLI command when managing these instances. What should you do?

A.
Set the europe-west1-d zone as the default zone using the gcloud config subcommand.
A.
Set the europe-west1-d zone as the default zone using the gcloud config subcommand.
Answers
B.
In the Settings page for Compute Engine under Default location, set the zone to europe--west1-d.
B.
In the Settings page for Compute Engine under Default location, set the zone to europe--west1-d.
Answers
C.
In the CLI installation directory, create a file called default.conf containing zone=europe--west1--d.
C.
In the CLI installation directory, create a file called default.conf containing zone=europe--west1--d.
Answers
D.
Create a Metadata entry on the Compute Engine page with key compute/zone and value europe--west1--d.
D.
Create a Metadata entry on the Compute Engine page with key compute/zone and value europe--west1--d.
Answers
Suggested answer: A

Explanation:

Change your default zone and region in the metadata server Note: This only applies to the default configuration. You can change the default zone and region in your metadata server by making a request to the metadata server. For example: gcloud compute project-info add-metadata \ --metadata google-compute-default-region=europe-west1,google-compute-default-zone=europe-west1-b The gcloud command-line tool only picks up on new default zone and region changes after you rerun the gcloud init command. After updating your default metadata, run gcloud init to reinitialize your default configuration. https://cloud.google.com/compute/docs/gcloud-compute#change_your_default_zone_and_region_in_the_metadata_server

The core business of your company is to rent out construction equipment at a large scale. All the equipment that is being rented out has been equipped with multiple sensors that send event information every few seconds. These signals can vary from engine status, distance traveled, fuel level, and more. Customers are billed based on the consumption monitored by these sensors. You expect high throughput -- up to thousands of events per hour per device -- and need to retrieve consistent data based on the time of the event. Storing and retrieving individual signals should be atomic. What should you do?

A.
Create a file in Cloud Storage per device and append new data to that file.
A.
Create a file in Cloud Storage per device and append new data to that file.
Answers
B.
Create a file in Cloud Filestore per device and append new data to that file.
B.
Create a file in Cloud Filestore per device and append new data to that file.
Answers
C.
Ingest the data into Datastore. Store data in an entity group based on the device.
C.
Ingest the data into Datastore. Store data in an entity group based on the device.
Answers
D.
Ingest the data into Cloud Bigtable. Create a row key based on the event timestamp.
D.
Ingest the data into Cloud Bigtable. Create a row key based on the event timestamp.
Answers
Suggested answer: D

Explanation:

Keyword need to look for

- 'High Throughput',

- 'Consistent',

- 'Property based data insert/fetch like ngine status, distance traveled, fuel level, and more.' which can be designed in column,

- 'Large Scale Customer Base + Each Customer has multiple sensor which send event in seconds' This will go for pera bytes situation,

- Export data based on the time of the event.

- Atomic

o BigTable will fit all requirement.

o DataStore is not fully Atomic

o CloudStorage is not a option where we can export data based on time of event. We need another solution to do that

o FireStore can be used with MobileSDK.

You are asked to set up application performance monitoring on Google Cloud projects A, B, and C as a single pane of glass. You want to monitor CPU, memory, and disk. What should you do?

A.
Enable API and then share charts from project A, B, and C.
A.
Enable API and then share charts from project A, B, and C.
Answers
B.
Enable API and then give the metrics.reader role to projects A, B, and C.
B.
Enable API and then give the metrics.reader role to projects A, B, and C.
Answers
C.
Enable API and then use default dashboards to view all projects in sequence.
C.
Enable API and then use default dashboards to view all projects in sequence.
Answers
D.
Enable API, create a workspace under project A, and then add project B and C.
D.
Enable API, create a workspace under project A, and then add project B and C.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/monitoring/settings/multiple-projects

https://cloud.google.com/monitoring/workspaces

Total 289 questions
Go to page: of 29