GCP VMs

GCP VMs

12th Grade

11 Qs

quiz-placeholder

Similar activities

Search Engine

Search Engine

10th - 12th Grade

10 Qs

Understanding Motor Vehicle Engines

Understanding Motor Vehicle Engines

12th Grade - University

15 Qs

Understanding Two-Stroke and Four-Stroke Engines

Understanding Two-Stroke and Four-Stroke Engines

12th Grade

10 Qs

Engine Cooling System Quiz

Engine Cooling System Quiz

12th Grade

12 Qs

Rotary Engine

Rotary Engine

9th - 12th Grade

10 Qs

Exhaust System Technology and Repair

Exhaust System Technology and Repair

8th Grade - Professional Development

10 Qs

FUEL SYSTEM QUIZ

FUEL SYSTEM QUIZ

12th Grade

9 Qs

Eclipse IDE activity

Eclipse IDE activity

12th Grade

10 Qs

GCP VMs

GCP VMs

Assessment

Quiz

Instructional Technology

12th Grade

Hard

Created by

David Valladares

Used 9+ times

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

You need to create an autoscaling managed instance group for an HTTPS web application. You want to make sure that unhealthy VMs are recreated. What should you do?

Create a health check on port 443 and use that when creating the Managed Instance Group.

Select Multi-Zone instead of Single-Zone when creating the Managed Instance Group.

In the Instance Template, add the label 'health-check'.

In the Instance Template, add a startup script that sends a heartbeat to the metadata server.

Answer explanation

To ensure that unhealthy VMs are recreated, a health check should be created to monitor the instances in the managed instance group. This health check should be configured to check the appropriate endpoint for the web application, which in this case would be port 443 for HTTPS. If an instance is determined to be unhealthy, the instance group will automatically recreate it.

2.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

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?

Move both projects under the same folder.

Grant the VM Service Account the role Storage Object Creator on corp-aggregate-reports-storage.

Create a Shared VPC network between both projects. Grant the VM Service Account the role Storage Object Creator on corp-iot-insights.

Make corp-aggregate-reports-storage public and create a folder with a pseudo-randomized suffix name. Share the folder with the IoT team.

Answer explanation

Correct Answer is (B): 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

Basically, you are giving the permissions to the VM Service Account to create a copy of the daily report on the bucket that the other team has access.

3.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

You are monitoring an application and receive user feedback that a specific error is spiking. You notice that the error is caused by a Service Account having insufficient permissions. You are able to solve the problem but want to be notified if the problem recurs. What should you do?

In the Log Viewer, filter the logs on severity 'Error' and the name of the Service Account.

Create a sink to BigQuery to export all the logs. Create a Data Studio dashboard on the exported logs.

Create a custom log-based metric for the specific error to be used in an Alerting Policy.

Grant Project Owner access to the Service Account.

Answer explanation

C is the correct answer, Since the problem is resolved, We need to monitor if the error recurs, hence we create a custom log based metrics to monitor only the particular service account.

The keyword here is "want to be notified" that means an alert.

4.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

You have a virtual machine that is currently configured with 2 vCPUs and 4 GB of memory. It is running out of memory. You want to upgrade the virtual machine to have 8 GB of memory. What should you do?

Rely on live migration to move the workload to a machine with more memory.

 Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.

Stop the VM, change the machine type to n1-standard-8, and start the VM.

Stop the VM, increase the memory to 8 GB, and start the VM.

Answer explanation

ANSWER D is correct because it is the correct process to follow to increase the memory of a virtual machine in the Google Cloud Platform. To increase the memory of a virtual machine, you need to first stop the VM, since it is not possible to modify the memory of a running VM. Then, you can increase the memory of the VM by editing the machine type and selecting a machine type with more memory. Once you have made the change, you can start the VM again.

5.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

You want to run a single caching HTTP reverse proxy on GCP for a latency-sensitive website. This specific reverse proxy consumes almost no CPU. You want to have a 30-GB in-memory cache, and need an additional 2 GB of memory for the rest of the processes. You want to minimize cost. How should you run this reverse proxy?

Create a Cloud Memorystore for Redis instance with 32-GB capacity.

Run it on Compute Engine, and choose a custom instance type with 6 vCPUs and 32 GB of memory.

Package it in a container image, and run it on Kubernetes Engine, using n1-standard-32 instances as nodes.

Run it on Compute Engine, choose the instance type n1-standard-1, and add an SSD persistent disk of 32 GB.

Answer explanation

ANSWER A is the most cost-effective solution for running a caching HTTP reverse proxy on GCP. Cloud Memorystore for Redis is a managed service that provides an in-memory cache for your applications. It offers a high throughput and low latency access to the Redis protocol. Cloud Memorystore offers an SLA of 99.9% availability and automatic failover for Redis instances. In this case, a 32-GB Redis instance is sufficient to accommodate the 30-GB cache and the additional 2 GB of memory required for the rest of the processes. This solution is highly scalable and allows you to increase the size of the Redis instance as your needs grow.

6.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

You need to manage a third-party application that will run on a Compute Engine instance. Other Compute Engine instances are already running with default configuration. Application installation files are hosted on Cloud Storage. You need to access these files from the new instance without allowing other virtual machines (VMs) to access these files. What should you do?

Create the instance with the default Compute Engine service account. Grant the service account permissions on Cloud Storage.

Create the instance with the default Compute Engine service account. Add metadata to the objects on Cloud Storage that matches the metadata on the new instance.

Create a new service account and assign this service account to the new instance. Grant the service account permissions on Cloud Storage.

Create a new service account and assign this service account to the new instance. Add metadata to the objects on Cloud Storage that matches the metadata on the new instance.

Answer explanation

C https://cloud.google.com/iam/docs/best-practices-for-using-and-managing-service-accounts If an application uses third-party or custom identities and needs to access a resource, such as a BigQuery dataset or a Cloud Storage bucket, it must perform a transition between principals. Because Google Cloud APIs don't recognize third-party or custom identities, the application can't propagate the end-user's identity to BigQuery or Cloud Storage. Instead, the application has to perform the access by using a different Google identity.

7.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

You will have several applications running on different Compute Engine instances in the same project. You want to specify at a more granular level the service account each instance uses when calling Google Cloud APIs. What should you do?

When creating the instances, specify a Service Account for each instance.

When creating the instances, assign the name of each Service Account as instance metadata.

After starting the instances, use gcloud compute instances update to specify a Service Account for each instance.

After starting the instances, use gcloud compute instances update to assign the name of the relevant Service Account as instance metadata.

Answer explanation

A. When creating the instances, specify a Service Account for each instance. To specify a more granular level of service account for each Compute Engine instance, you should specify a Service Account for each instance when you create it. This can be done through the Compute Engine API or the Cloud Console. By doing so, the specified Service Account will be used when calling Google Cloud APIs from that instance.

Option B, assigning the name of each Service Account as instance metadata, is not the best solution as metadata can be accessed by anyone with access to the instance, which could potentially lead to security issues. Options C and D, using gcloud compute instances update to specify a Service Account or assign the name of a Service Account as instance metadata after starting the instances, can also be done, but it is a less efficient approach as it requires additional steps and can lead to human error if not properly documented.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?