google_cloud_ace_topics_20221211172730 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

3 types of Storage Systems

A

Cache, Persistent, Object

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

Example of cache in GC

A

Memory Store - managed Redis service

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

1 benefit of cache

A

low latency - sub-millisecond access

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

3 problems of cache

A
  1. volatile - lost when machine shuts down2. more expensive than SSD or HDD3. can get out of sync with the system of truth (persistent storage)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Cache - quick definition

A

in memory data store

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

Persistent Storage - quick definition

A

durable block storage

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

Where can you use persistent storage?

A

Can be attached to VMs in Compute Engine and Kubernetes Engine.

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

Where is persistent storage located?

A

On the network. They are not attached to the physical servers hosting your VM. They exist independently of VMs.

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

Can a VM have locally attached persistent storage?

A

Yes. VM can have local SSD, but it is volatile.

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

Types of persistent storage

A

SSD and HDD

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

Differences between SSD and HDD

A

HDD have higher latency, but lower cost.Network attached SSD are 40/20 times faster (R/W) than HDD. Locally attached SSD are 200/150 times faster.

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

Max size of SSD/HDD

A

64TB

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

4 facts of persistent storage

A
  1. can create file systems on them2. data is automatically encrypted3. size can be increased while mounted to VM4. can be mounted in read-only mode on multiple VMs at once
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Is persistent storage zonal or regional?

A

Both. Regional replicates data across different zones, but is more expensive than purely zonal storage.

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

What is Object Storage good for?

A

large volumes of data that is shared widely

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

3 storage data models

A
  1. object2. relational3. NoSQL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

GC app example of object model storage

A

Cloud Store

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

How are object model objects stored?

A

Atomically. Cannot read parts of an object. Must copy to server, make changes and then copy object back to object storage system. Used when you don’t need fine-grained access to data within the object while it is in the object store

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

3 GC app examples of Relational model storage

A
  1. Cloud SQL2. Cloud Spanner3. Big Query
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

3 facts of Relational model storage

A
  1. supports frequent queries and updates to data2. allows for consistent view of data3. supports database transactions (Cloud SQL and Cloud Spanner)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

3 GC app examples of NoSQL model storage

A
  1. Cloud Datastore2. Cloud Firestore3. Bigtable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Benefits/Limitations of 3 types of Storage systems.

A
  1. cache is fastest but most expensive and volatile.2. persistent is used for things that need block storage. SSD are faster but more expensive.3. object storage used for large volumes of data for long periods of time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

5 things to consider when planning object storage

A
  1. frequency of read/write2. consistency3. transaction support4. cost5. latency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Planning storage - frequency of read/writeBest for structured data that is frequently accessed

A

Cloud SQL

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

Planning storage - frequency of read/writeBest for global database that supports relational read/writes

A

Cloud Spanner

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

Planning storage - frequency of read/writeBest for writing data at high rates and in large volumes

A

Bigtable

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

Planning storage - frequency of read/writeBest for writing files and downloading them in their entirety

A

Cloud Store

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

Planning Storage - ConsistencyStrongest consistency (2)

A

Cloud SQLCloud Spanner

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

Planning Storage - ConsistencyGood for unstructured data

A

Datastore

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

Planning Storage - Transaction Support3 apps that support transactions

A

Cloud SQLCloud SpannerDatastore

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

Planning Storage - LatencyFastest

A

Bigtable

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

Planning Storage - LatencyGlobally consistent and scalable

A

Cloud Spanner

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

Cloud Functions - Definition

A

Serverless computing platform designed to run single-purpose pieces of code in response to events in GCP environments (PaaS)

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

How are Cloud Functions managed? (3 key points)

A
  1. functions execute in a secure isolated environment2. since they each run in a separate instance, they don’t share memory, so they need to be stateless3. multiple instances may be running at once.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

How long can a Cloud Function run?

A

default timeout is 1 min, but can be configured up to 9 min

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

What languages do Cloud Functions support?

A

Node.js 8Node.js 10Python 3.7Go 1.1

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

Cloud Functions - key points (3)

A
  1. managed independently from other services2. short running code3. fully managed - serverless
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

How do cloud functions work?

A

Events have triggers which executes a function in response to the event.

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

Examples of Cloud Function events (5)

A
  1. HTTP Request2. Cloud Storage event - adding, deleting, etc… a file3. Cloud Pub/Sub event - publishing a message4. Firebase - database trigger5. Stackdriver logging
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Cloud Function functions - key points (3)

A
  1. run in a separate instance every time they are invoked2. no way to share data without using external service3. the function is passed arguments about the event
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Cloud Functions use case examples (4)

A
  1. webhooks - respond to an http request2. image processing - validate or transform images3. mobile back end - react to storage, authentication or data event4. IOT - react to pub/sub from devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

What needs to be filled in when creating a cloud function via the cloud console?

A
  1. name2. memory allocation - 128MB to 2GB3. trigger4. event type - depends on trigger5. source of function code - editor , zip file , upload, etc…6. runtime - node, python or go
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

Create cloud function via shell - main command

A

gcloud functions deploy [NAME]

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

Cloud function shell parameters (3)

A

–trigger-resource or –trigger-topic–trigger-event

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

Command to delete a cloud function via shell?

A

gcloud functions delete [NAME]

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

BigQuery description

A

petabyte scale analytics database service for data warehousing

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

BigQuery key points (9)

A
  1. serverless2. uses standard sql queries3. near real-time interactive analysis of massive data sets4. can access info stored in Cloud Storage, Cloud SQL, Bigtable and Google Drive5. Storage and computing are handled and billed separately6. Automatic data replication7. Can modify data with DLL8. Can query public or commercial data sets.9. High availability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What are 3 BigQuery use cases?

A
  1. Real-time Inventory2. Predictive Marketing3. Analytical Events
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

What Google apps can BigQuery access?

A
  1. Cloud Storage2. Cloud SQL3. Cloud Bigtable4. Google Drive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

How do you estimate the cost of a BigQuery query via shell?

A

You run the query with a flag of –dry_run setbq –location=[LOCATION] query –use_legacy_sql=false –dry_run [SQL QUERY]

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

What are jobs in BigQuery?

A

Processes used to load, export copy and query data. Jobs are automatically started when you start one of these processes.

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

How do you view the status of a BigQuery job? (Shell and console)

A

Console - click job history from BQ consoleShell - bq –location=[LOCATION] show -j [JOB ID]

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

How do you export BQ data from the console?

A

go to BigQuery -> Resources, open the dataset containing the table to be exported and select the table. Export options are on upper right

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

Where can you export BQ data to?

A

Cloud Storage or Data Studio (a GCP analysis tool)

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

How do you import BQ data via console?

A

go to BiqQuery -> Resources and select a dataset to import into. Click create table tab. Select a source, file format (if source is not empty table)table type (external or native - if external, data is kept in source location and only metdata about the table is stored in BigQuerytable name

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

What file formats can you import data from in BigQuery?

A

CSVJSONAvroParquetPRCCloud Datastore Backup

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

How do you export BigQuery data from the command line?

A

bq extract –destination_format [FORMAT] –compression [COMPRESSION] –field_delimiter [DELIMITER] –print_header {BOOLEAN] [PROJECT ID]:[DATASET].[TABLE] gs://[BUCKET]/FILENAME

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

How do you import data into BigQuery from the command line?

A

bq load –autodetect –source_format=[FORMAT[ [DATASET].[TABLE] [PATH to SOURCE]

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

Cloud Dataflow description

A

Fully managed service for creating data (batch and stream) processing pipelines where data is collected, transformed and then output

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

What are the key features of Cloud Dataflow? (7)

A
  1. Based on Apache Beam2. Process data on multiple machines in parallel.3. Handles streaming data like Cloud Pub/Sub4. Handles batch or archived data like Cloud BigQuery5. Serverless6. Templates for ease of replication7. Best choice if not using Apache Hadoop or Spark
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

Where does Cloud Dataflow deliver its output?

A

BigQuery, Cloud Machine Learning, Cloud Bigtable

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

3 examples of Cloud Dataflow

A
  1. Analytical dashboards2. Forecasting Sales Trends3. ETL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

Cloud SQL definition

A

Managed database service that provides MySQL, PostgreSQL and SQL Server databases

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

Key points of CloudSQL (4)

A
  1. Allows users to set up database without all the database administration tasks2. High Availability - manages replication and allows for automatic failover3. Suited for applications with consistent data structure (for databases that don’t need to scale horizontally)4.Scales vertically (by running on servers with more memory and CPUs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

What databases and versions does CloudSQL support?

A
  1. MySQL 5.6/5.7 up to 416GB RAM and 30TB data storage2. PostgreSQL up to 416GB RAM and 64 CPUs and 30TB storage3. SQL Server 416 GB RAM 64 CPUs 30 TB storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

How do you connect to Cloud SQL via shell?

A

gcloud sql connect [INSTANCE NAME] -user=[USERNAME]

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

How do you backup (on demand) Cloud SQL via shell?

A

gcloud sql backups create –async –instance [INSTANCE NAME]

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

How do you schedule automatic backup on Cloud SQL via shell?

A

gcloud sql instances patch [INSTANCE NAME] -backup-start-top [HH:MM]

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

Where is backup data stored for Cloud SQL?

A

In a bucket in Cloud Store.

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

How do you export Cloud SQL data via shell?

A

gcloud sql export [TYPE] {INSTANCE NAME] gs://[BUCKET]/[FILE NAME] –database=[DATABASE NAME]You need to make sure that the service account can write to the bucket.

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

How do you import Cloud SQL data via shell?

A

gcloud sql import [TYPE] {INSTANCE NAME] gs://[BUCKET]/[FILE NAME] –database=[DATABASE NAME]

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

Cloud Bigtable description

A

a petabyte-scale fully managed NoSQL database service

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

Key points of Cloud Bigtable (6)

A
  1. can manage billions of rows and thousands of columns - not all rows need to use all columns2. low-millisecond latency - can support millions of operations per second3. based on NoSQL wide-column data model, not document database4. Supports Hbase API for Hadoop5. Integrates with open source tools for data processing, graph analysis and time-series analysis6. runs in clusters and scales horizontally
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

What are 3 usages for Cloud Bigtable?

A

applications with high data volume and high velocity ingest of data1. time series2. iot3. financial applications

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

How do you import or export data to/from Bigtable?

A

There are no options via console or shell. You need to use a java application or use HBase interface to execute HBase commands

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

Cloud Spanner description

A

Globally distributed relational database

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

Key points of Cloud Spanner (6)

A
  1. combines benefits of relational database with NoSQL database - strong consistency, transactions and horizontal scaling.2. High availability3. Enterprise-grade security with encryption at rest and in transit4. ANSI 2011 standard SQL5. Much more expensive than other databases6. Regional or multi-regional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

When is Cloud Spanner used?

A

when there are extremely large volumes of relational data or data that needs to be globally distributed while ensuring consistency and transaction integrity across all servers

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

2 examples of where to use Cloud Spanner

A
  1. Global supply chains.2. Financial services applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

What is important to know about importing or exporting data to/from Cloud Spanner? (2)

A
  1. The import/export will incur Cloud Dataflow charges.2. There may be additional charges if the region the job is run in does not overlap the region in which the instance resides. 3. You cannot import/export via shell
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

Cloud Datastore decsription

A

Highly-scalable NoSQL managed document database

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

Key points of Cloud Datastore (5)

A
  1. Managed service - serverless2. Document database3. Accessed via REST API in Compute Engine, Kubernetes Engine or App Engine4. Automatically partitions data and scales up or down as needed5. Supports transactions, indexes and SQL-like queries (using GQL)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

What is Cloud Datastore suited for?

A

Applications that demand high scalability, structured data and don’t need strong consistency

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

Key points of a document database (6)

A
  1. Does not use relational model and does not require fixed structure or schema2. Data organized into documents3. Documents are made up of key-value pairs called entities4. Entities do not need to have the same set of properties5. Allows for a flexible schema6. Does not support relational operations like joining tables or computing aggregates7. Kind is analogous to a table name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

How do you import/export Cloud Datastore data?

A

Done via shell only and data is stored in a bucket in Cloud Storage

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

How do you export Cloud Datastore data via shell, and what files does it create?

A

gcloud datastore export –namespaces=”(default)” gs://[BUCKET]1. it will create a folder using the date and time of the export2. the folder will contain a metadata file and a folder containing the exported data3. the metadata file is used when importing that data

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

What permission does someone doing a Cloud Datastore export need?

A

datastore.database.export

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

What is Cloud Memorystore?

A

in memory cache service (managed Redis Service)

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

What are some key points of Cloud Memorystore ? (5)

A
  1. Managed Redis service for caching frequently used data2. Sub-millisecond access3. Can be configured for high availability4. Can be used with Compute Engine, App Engine and Kubernetes Engine5. 1GB to 300 GB of memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q

What is Cloud Firestore?

A

Managed NoSQL database service designed for highly scalable web and mobile apps.

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

What are some key points of Cloud Firestore? (3)

A
  1. Uses the document data model2. Designed for storing, synchronizing and querying data across distributed applications like mobile apps.3. Supports transactions and provides multi-regional replication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
92
Q

What is Cloud Filestore?

A

Shared file system for use with Compute Engine and Kubernetes Engine

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

What are some key points of Cloud Filestore? (4)

A
  1. Based on NFS2. Suitable for applications that require operating system-like file access3. exists independently of the VMs or applications that access those files4. can support a high number of IO operations per second5. variable storage capacity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
94
Q

What is Cloud Armor?

A

It delivers defense at scale against infrastructure and application DDoS attacks.

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

What are the key points of Cloud Armor? (5)

A
  1. allow or restrict access based on IP2. predefined rules to counter cross-site scripting attacks3. counter SQL injection4. restrict access based on geolocation of incoming traffic5. define rules at level 3 (network) and level 7 (application)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

What is Cloud CDN?

A

a Content Delivery Network - allows low latency response by caching content on a number of servers around the world.

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

What is Cloud Interconnect?

A

a service for connecting existing networks to GCP

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

What are three key points of Cloud Interconnect?

A
  1. traffic between your on-premise network and your VPC doesn’t traverse the public internet2. two options dedicated and partnered3. standard Google VPN services can be used if you don’t mind using the public internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

What are the two options for Cloud Interconnect, and what are they different?

A
  1. Dedicated - direct accessa direct connection is maintained between an on-premise or hosted data center and a Google colocation facility2. Partnered - peereda third party network provider provides connectivity between company’s data center and google.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
100
Q

What is Cloud SDK?

A

a command line interface for managing GCP resources.

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

What client libraries exist for Cloud SDK?

A

Java, Python, Node.js, Ruby, Go, .NET and PHP

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

What is Cloud Trace?

A

a distributed tracing system for collecting latency data from an application

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

Key points of Cloud Trace?

A
  1. shows where applications are spending their time (bottlenecks)2. traces are generated when Cloud Trace is called from an application3. you can create reports that filter trace data according to report criteria
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
104
Q

What is Cloud Status?

A

provides status information on the services that are a part of GCP The dashboard lists services and uses icons to display their statuses

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

What is Cloud AutoML?

A

allows a developer with no experience to develop machine learning tools

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

What is Cloud Machine Learning Engine?

A

for building and deploying scalable machine learning systems

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

What is Cloud Natural Language Processing?

A

for analyzing human language and extracting information from text

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

What is Cloud Vision?

A

an image analysis platform

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

Billing account key points? (5)

A
  1. store info on how to pay for resources used.2. associated with one or more projects3. all projects must have a billing account associated with it.4. can have similar structure to resource hierarchy5. can be exported to BigQuery or Cloud Storage file (CSV or JSON)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
110
Q

What are the two types of billing accounts?

A
  1. self-service : paid by debit, credit or bank account automatically2. invoiced - invoices sent to customers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
111
Q

What are the 4 roles associated with billing accounts and what are their permissions?

A
  1. Billing Account Creator - can create new self-service billing accounts2. Billing Account Admin - manages billing accounts but cannot create them3. Billing Account User - allows user to link projects to a billing account4. Billing Account Viewer - view billing account cost and transactions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
112
Q

Billing budgets and alerts - key points (5)

A
  1. you can be sent a notice when a certain percentage of your budget has been spent in a month2. that amount can be a set amount or based on the previous month’s amount3. the three default percentages are 50%, 90% and 100%, but you can add more.4. alert will be sent via email, but can also be sent to Cloud Pub/Sub5. Since more than one project can be associated with a billing account, the alert amount needs to take into account the amount spent on all projects in the account
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
113
Q

Block Storage key points (6)

A
  1. uses fixed size blocks (4kb and up)2. available on disks attached to a VM3. persistent - exists independently of VM4. ephemeral - exists only while VM is running5. faster than object storage6. used by File system and databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
114
Q

What is Cloud Dataprep?

A

allows exploration and preparation of data for analysus

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

How are gcloud commands formatted?

A
  1. start with a group to indicate a resource (e.g compute)2. followed by a subgroup to indicate what type of group resource you are working with (e.g instances)3. after a subgroup, usually a verb and then parametersgcloud compute instances create [instance name] –zone us-central1a
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

What are the three components of the GCP resource hierarchy?

A
  1. Organization2. Folder3. Project
117
Q

Key points of an organization

A
  1. it’s the root of the hierarchy2. typically responds to a company or organization3. to create you need to use G Suite or Cloud Identity4. a single Cloud Identity is associated with at most one organization5. when G Suite or Cloud Identity creates a billing account, GCP creates an organization resource
118
Q

Key points of a folder resource

A
  1. an organization contains folders2. a folder can contain projects or other folders3. folders typically built around services provided by projects and/or the company’s internal structure (departments)
119
Q

Key points of a project

A
  1. projects are where we create resources and use GCP services2. anyone with the resourcemanager.projects.create IAM permission can create a project (this permission is given to everyone by default)3. organizations have a project quota which can be increased by contacting google
120
Q

What management tools does GCP have?

A
  1. Stackdriver - collects metrics, logs and event data2. Monitoring - extends Stackdriver by collecting performance data from GCP and external services3. Logging - store, analyze and alert on log data from GCP and AWS4. Error Reporting - aggregates crash information in a centralized interface5. Trace - captures latency data6. Debugger - inspect the state of running code, inject commands, view stack variables7. Profiler - collect CPU and memory utilization
121
Q

Networking in GCP key points (3)

A
  1. GCP can have internal and external addresses2. Your internal GCP network is defined as a VPC- internal addresses are only accessible from your VPC- external addresses are available from the internet3. External addresses can be assigned to a device for a long time (static) or only while the VM is running and released when the VM is stopped (ephemeral)
122
Q

Organization Policy Service key points

A
  1. controls access to an organization’s resources2. lets you specify limits on the ways resources can be used3. defined in terms of constraints on a resource (boolean)- allow or deny a set of values- deny a value and its child values- allow all allowed values- deny all values4. can define policies with constraints and attach it to an object in the resource hierarchy5. policies are inherited and cannot be overwritten by objects lower in the hierarchy6. policies are managed through Organization Policies in IAM & admin7. multiple policies can be in effect for a folder or project
123
Q

What is preemptible?

A

It means that the machine in question could be shut down at any time if the resources it is consuming are needed elsewhere. This is a much cheaper option.

124
Q

What is a service account?

A

A service account can be assigned to an application so that the application can run without giving users access to the underlying resources. (e.g giving the service account database access so that it can run queries for users without giving users access to the database)

125
Q

Key points of a service account

A
  1. Sometimes treated as a resource and sometimes treated as an identity.2. Two types, user manages and GCP managed3. Users can create up to 100 service accounts per project4. GCP automatically creates some service accounts when certain products are created5. service accounts can be managed as a group of accounts at the project level or at the individual account level
126
Q

Key points of a VM

A
  1. a Virtual Machine is an abstraction of a physical server which is essentially a program that emulates a physical server and provides CPU, memory storage and other services you would find on a typical physical server2. it is run within a security-hardened hypervisor-it runs on windows or linux- can run multiple OSes while keeping them isolated from each other.- each instance of a guest OS is a VM instance3. they are predefined or customizable
127
Q

What is Cloud Dataproc?

A

A fully managed cluster data processing service (Apache Spark and Apache Hadoop service)

128
Q

What are key points of Cloud Dataproc?

A
  1. Compatible with Apache Hadoop, Spark and Hive2. Runs in clusters3. Allows existing projects to be moved without redevelopment4. Fast cluster creation - can create workflow templates5. Can scale clusters without stopping Job6. Can switch to different versions7. Can handle streaming and batch data
129
Q

When do you choose Cloud Dataproc over Cloud Dataflow?

A

If you have dependencies on Hadoop or Spark, or if you want more hands on management and control.

130
Q

How do you create a Cloud Dataproc cluster from the command line?

A

gcloud dataproc clusters create [CLUSTER NAME] –zone [ZONE]

131
Q

How do you submit a job to Cloud Dataproc via the shell?

A

gcloud dataproc jobs submit [TYPE] –cluster [CLUSTER NAME] –jar [JAR FILE]

132
Q

What cluster modes can you choose when setting up Cloud Dataproc?

A
  1. Single - for development2. Standard - one master node3. High Availability - uses 3 master nodes
133
Q

What job types are available for Cloud Dataproc?

A
  1. Spark2. PySparck3. SparkR4. Hive5. Spark SQL6. Pig7. Hadoop
134
Q

How do you import or export data to Cloud Dataproc?

A

You don’t. It’s a data analysis platform, not a database.You can import and export to save/restore the cluster configuration data.gcloud beta dataproc clusters export [CLUSTER NAME] – destination=[PATH TO EXPORT FILE]gcloud beta dataproc clusters import [SOURCE FILE]

135
Q

What is Cloud PubSub?

A

A fully managed messaging middleware service

136
Q

Cloud PubSub key points (5)

A
  1. Allows messages between independent apps either within or outside of Google Cloud2. One to many, many to one, many to many3. Both push and pull messages.4. Messages are encrypted and HIPPA compliant5. Durable messaging - the messages will be kept as long as it is needed
137
Q

What are some use cases for Cloud PubSub? (3)

A
  1. Streaming data2. Event notifications3. Service to service communication to set up asynchronous workflows
138
Q

How does Cloud PubSub work?

A
  1. The publisher sends a message.2. The message belongs to a topic.3. The topic has subscriptions attached to it.4. Subscribers can be subscribed to a particular subscription so that they will get the message.5. The subscriber sends an acknowledgement back to the subscription. 6. Pub/Sub will wait the period of time set in the acknowledgement Deadline parameter (10-600 seconds) or specified by the retention period (the length of time to keep an un-deliverable message). After this time, the message will be deleted
139
Q

What delivery types are there for subscriptions in Cloud PubSub?

A

Push and Pull.Pull -an application reads messages for a given subscription topicPush - a subscription writes messages to an endpoint URL

140
Q

How do you create subscriptions or topics via the shell for Cloud PubSub?

A

gcloud pubsub topics create [TOPIC NAME]gcloud pubsub subscriptions create [SUBSCRIPTION NAME]

141
Q

How do you send data to a topic via the shell in Cloud PubSub?

A

gcloud pubsub topics publish [TOPIC NAME] –message [MESSAGE]

142
Q

How do you pull messages sent to a subscription in Cloud PubSub?

A

gcloud pubsub subscriptions pull –auto-ack [SUBSCRIPTION NAME]

143
Q

What is a Virtual Private Cloud?

A

A software version of a physical network that links resources in a project

144
Q

What are some key points of a VPC? (7)

A
  1. automatically created when a project is created.2. global - spans the globe without relying on the public internet3. secure - can be securely routed through Google global network3. backend services can access other Google services without creating a public IP4. can be linked to on-premise VPNs using IPSec5. can use firewalls 6. can use separate projects and billing accounts7. can contain subnets - subnets are regional, have range of private internal ips
145
Q

What are some key points about subnets in a VPC? (7)

A
  1. can specify region2. can specify IP range3. can turn off Private Google access, allowing VMs on subnet to access Google services without assigning external IP to the VM4. can turn off logging of network traffic5. can set up firewall rules6. dynamic routing option - global or regional7. can set up DNS policy server that enables DNS name resolution by GCP or can customize
146
Q

How do you create a VPC via shell?

A

glcoud compute networks create [VPC NAME] –subnet-mode=[auto|custom]

147
Q

How do you create custom subnets for a VPC via shell?

A

gcloud beta compute network subnets create [SUBNET NAME] –network=[VPC NAME] –region=[REGION] –range=[RANGE] –enable-private-ip-google-access –enable-flow-logs

148
Q

How do you create a shared VPC and assign projects via shell?

A
  1. need to make sure you have the Shared VPC Admin role (compute.xpnAdmin)2. gcloud compute shared-vpc enable [HOST PROJECT ID]3. gcloud compute shared-vpc associated-projects add [SERVICE PROJECT ID] –host-project [HOST PROJECT ID]
149
Q

At what levels can a shared VPC exist?

A

Folder or organization.

150
Q

What is VPC peering?

A

allows inter-project traffic when an organization does not exist

151
Q

How do you set up VPC peering via shell?

A

gcloud compute networks peerings create [PEER NAME] –network [VPC 1 NAME] –peer-project [PROJECT 2 NAME] –peer-network [VPC 2 NAME] –auto-create-routesthen do the same but reverse project 1, vpc1 and vpc 2

152
Q

At what level are firewalls for VPC defined?

A

They are defined at the network level and used to control flow of traffic to VMs. They allow or deny traffic on a port and are applied in one direction (incoming or outgoing)

153
Q

What are the components for VPC firewall rules (7)?

A
  1. direction - incoming or outgoing2. priority - highest rules are applied. lower priority rules that match are not applied. 0 to 65535. 0 is the highest3. action - allow or deny4. target - an instance to which the rules apply (all in a network, instances with particular network tag or instances using a specific service account)5. source/destination - source applies to IP ranges, network tags, service accounts or combination. destination only uses IP ranges6. Protocol and port (TCP, UDP, ICMP etc…)7. enforcement status - enabled or disabled
154
Q

What 2 implied rules do all VPCs start with?

A
  1. allows egress to all destinations2. denies all traffic from any sourceboth rules have priority 65535 so they can be overwritten
155
Q

Automatically created VPCs have what 4 network rules created?

A
  1. allows incoming traffic from any VM on same network2. allows incoming TCP on port 22 (for SSH)3. allows incoming TCP on port 3389 (allowing RDP)4. allow incoming ICMP from any source (Internet Control Message Protocol)all these have priority 65535
156
Q

How do you create a VPC firewall via shell?

A

gcloud compute firewall-rules create many options

157
Q

How do you increase the number of addresses available on a VPC subnet?

A

gcloud compute networks subnets expand-ip-range [SUBNET NAME] –prefix-length [NEW PREFIX LENGTH]You can only increase the number of addresses. The only was to decrease is to recreate the subnet.

158
Q

What two tiers are available for reserving an IP?

A
  1. Standard Tier uses internet for some transfer of data2. Premium Tier routes all traffic over Google’s global network (more expensive)
159
Q

What is Cloud Launcher?

A

a central repository of applications and data sets that can be deployed to your GCP environment

160
Q

What ways can you filter operating systems in Cloud Launcher?

A

Pricing (license type)1. free - linux and FreeBSD2. paid - windows and enterprise-supported linux - will be charged a fee based on usage3. byol - bring your own license - includes two supported linux systems, but you are responsible for acquiring the proper license

161
Q

What are some key points of deploying via shell?

A
  1. Can create your own deployment configuration file - written in YAML2. Configuration files have name, type and key value pairs to specify configuration parameters3. Can use deployment templates which are text files used to define resources, and you can import those resources into configuration files - templates written in Python or Jinja24. To deploy template from the command line : gcloud deployment-manager deployments create [DEPLOYMENT NAME] –config [CONFIG FILE NAME]5. To describe state of deployment : gcloud deployment-manager deployments describe [DEPLOYMENT NAME]
162
Q

What is cloud Load Balancing?

A

It is a means to distribute workloads across cloud infrastructure.

163
Q

What are 5 key points of Cloud Load Balancing?

A
  1. it distributes workloads across cloud infrastructure2. it adapts to failed or degraded servers3. autoscales resources to accommodate changes in workloads4. supports internal load balancing so IP addresses don’e need to be exposed5. can load balance HTTP, HTTPS, TCP/SSL and UDP
164
Q

What are three main features of GCP load balancers?

A
  1. Global vs Regional2. External vs Internal3. Traffic Type
165
Q

What are the differences between global and regional load balancers?

A

Global has 3 load balancers.1. HTTP(S) - balances HTTP and HTTPS2. SSL Proxy - terminates SSL/TLS connections3. TCP Proxy - terminates TCP sessions at the load balancer then forwards traffic to backend serversRegional1. Internal TCP/UDP - balances TCP/UDP traffic on private networks hosting internal VMs2. Network TCP/UDP - balances based on IP protocol, address and port, used for SSL and TCP traffic not supported by the SSL Proxy and TCP Proxy Load balancers

166
Q

What is the difference between internal and external load balancing?

A

External distributes traffic from the internet while internal distributes traffic that originates within GCP. The Internal TCP/UDP load balancer is the only internal load balancer

167
Q

How do you set up load balancing via command line?

A

gcloud compute forwarding-rules create [NAME] –port=[PORT] –target-pool [POOL]target pools are created via :gcloud compute target-pools add-instances [NAME] –instances [INSTANCE 1, INSTANCE 2…]

168
Q

What is Cloud DNS?

A

high availability, low latency service for mapping domain names to IP addresses

169
Q

What are key points of Cloud DNS?

A
  1. automatically scales2. provides private zones to use custom names for VMs3. NS and SOA records are added when a zone is created. NS -name server recordSOA -start of authority record4. You can add other records such as A and CNAME
170
Q

What zone types are available for Cloud DNS?

A
  1. public - accessible from internet, provide name servers that respond to queries from any source2. private - provide name services to your GCP resources, only respond to queries that originate from resources in the same project
171
Q

How do you create a DNS managed zone via shell?

A

gcloud beta dns manage-zones create [ZONE NAME] —dns-name=[DNS SUFFIX] –visibility=[private|public]

172
Q

How do you add a record to a DNS managed zone via shell?

A

You start a transaction, add the record then execute the transactiongcloud dns record-sets transaction start –zone=[ZONE]gcloud dns record-sets transaction add [IP or NAME] –name=[NAME] -ttl=[TTL] –type=[TYPE] –zone=[ZONE]gcloud dns record-sets transaction execute –zone=[ZONE}

173
Q

What is Cloud IAM?

A

Identity and access management - allows fine-grained access control to cloud resources with users, roles and privileges

174
Q

What types of roles are there?

A
  1. Primitive2. Predefined3. Custom
175
Q

Key points of Cloud IAM roles?

A
  1. a role is a collection of permissions2. permissions cannot be assigned to users, only roles3. roles are assigned to users
176
Q

What are primitive roles?

A

Three types:1. viewer - read only2. editor - viewer plus can modify an entity3. owner - editor plus can manage roles and permissions on an entity and can set up billing for a project

177
Q

What are predefined roles?

A
  1. they provide granular access to GCP resources2. they are specific to GCP products
178
Q

What are custom roles?

A

1.Allow cloud admin to create and administer their own roles2. Created using permissions defined in IAM3. Some permissions are not available in custom roles

179
Q

Best practices for IAM roles?

A
  1. Assign least privilege - grant smallest set of permissions to allow someone to do their job2. Separation of duties - user would not be able to perform multiple sensitive operations that together could present a risk
180
Q

How do you see a list of users assigned to a role via shell?

A

gcloud projects get-iam-policy [PROJECT NAME]

181
Q

How do you see the fine-grained permissions are associated with a role?

A

gcloud iam roles describe [ROLE ID]

182
Q

How do you assign a role via shell?

A

gcloud projects add-aim-policy-binding [RESOURCE NAME] –member user:[USER EMAIL] –role [ROLE ID]

183
Q

How to create a custom IAM role via shell?

A

gcloud iam roles create [ROLE ID] –project [PROJECT ID] –title [ROLE NAME] –description [ROLE DESCRIPTION] –permissions [PERMISSIONS LIST] –state [LAUNCH STATE]

184
Q

What is a Service Account?

A

An account used to provide identities independent of users. It can be granted roles and is assigned to a VM.

185
Q

What is a scope?

A

A permission granted to a VM to perform some operation.

186
Q

Key points of scopes?

A
  1. Scopes authorize the access to API methods2. To configure access controls for a VM you will need to configure both IAM roles and scopes3. A scope is specified by a URL that starts with https://www.googleapis.com/auth and is followed by permission on a resource. For example: https://www.googleapis.com/auth/bigquery.insertdata4. An instance can only perform operations allowed by both IAM roles assigned to the service and scopes defined on the instance
187
Q

How do you add scopes to a service account via shell?

A

gcloud compute instances set-service-account [INSTANCE NAME] [–service account [SERVICE_ACCOUNT_EMAIL] ] | [–noservice-account] [–no-scopes | –scopes [SCOPES,…]]

188
Q

How do you assign a service account to a VM?

A

gcloud compute instances create [INSTANCE NAME] –service-account [SERVICE ACCOUNT EMAIL]

189
Q

What is cloud storage?

A

a unified object storage system

190
Q

Key points of cloud storage? (7)

A
  1. manages objects in terms of blobs2. objects are atomic3. objects are grouped into buckets that are individually addressable by URL4. serverless5. not limited by size of disks attached to server6. access can be controlled at object level7. does not support concurrency
191
Q

What is Cloud Storage suited for?

A

storing large volumes of data that don’t require a consistent data structure

192
Q

Cloud Storage Bucket key points? (5)

A
  1. buckets share a global namespace, so they must be globally unique2. buckets are like directories - used to help organize objects into groups, but they do not have sub-directories3. when you create a bucket, you specify the location - objects may be stored in different regions for high availability4. 4 different storage classes5. buckets can be configured to retain versions- latest version is live version- when live version is deleted, it is archived instead6. provides lifecycle management policies
193
Q

What is Cloud Storage Fuse?

A

a way to mount a bucket as a file system on linux and mac - allows upload and download of files to/from buckets using system commands

194
Q

What are the 4 different storage classes for Cloud Storage?

A
  1. Multi-regional2. Regional3. Nearline4. Coldline
195
Q

What is multi-regional storage, and what are its key points?

A
  1. data is replicated across multiple regions for high availability2. redundancy in the case of zone failures3. may reduce latency if users are spread out4. higher cost (~1.25x regional)5. it’s for frequently used data
196
Q

What is regional storage, and what are its key points?

A
  1. for frequently used data2. storage is in one region
197
Q

What is nearline storage, and what are its key points?

A
  1. infrequently used data (< 1 per month)2. lower SLA 3. lower cost (~ half regional)4. retrieval charge per GB retrieved5. minimum 30 day storage duration
198
Q

What is coldline storage, and what are its key points?

A
  1. very infrequently used data (< 1 per year)2. lower SLA3. lowest cost (~ 1/3 regional)4. higher retrieval cost per GB (about 5x nearline)5. minimum 90 day storage duration
199
Q

What are the lifecycle managment policies?

A

You can configure objects to be moved based on different criteria, like time1. move objects to lower cost storage class2. delete objects based on age, creation date, live state or current storage class3. can set up lifecycle policy after bucket creation

200
Q

How to change the storage class via shell?

A

gsutil rewrite -s [STORAGE CLASS] gs://[PATH TO OBJECT}

201
Q

How to make a bucket via shell?

A

gsutil mb gs://[BUCKET NAME]

202
Q

How to copy Cloud Storage object via shell?

A

gsutil cp [LOCAL OBJECT} gs://[DESTINATION BUCKET]

203
Q

How to download Cloud Storage object?

A

gsutil cp gs://[SOURCE BUCKET]/[SOURCE OBJECT] [DESTINATION DIR}

204
Q

How to move Cloud Storage object?

A

gsutil mv gs://[SOURCE BUCKET]/[SOURCE OBJECT] gs://[DEST BUCKET]/[DEST OBJECT]

205
Q

What is a VPN?

A

It allows secure communication between Google network and your external network

206
Q

What are the three components that you set up when setting up a VPN?

A
  1. Gateway2. Tunnels3. Routing
207
Q

What do you set up in the Gateway section of VPN?

A

The GCP side of the VPN1. Network2. Region containing the network3. static IP

208
Q

What do you set up in the tunnels section of the VPN?

A

The other (non GCP) endpoint of the VPNSpecify shared secret

209
Q

What routing options do you have when setting up a VPN?

A
  1. Dynamic - uses BGP to learn routes in your network2. Route Based - requires IP range of remote network3. Policy Based - require remote IP ranges, local sub-networks and local IP ranges
210
Q

How do you create a VPN via the shell?

A

gcloud compute target-vpn-gateways creategcloud compute forwarding-rules creategcloud compute vpn-tunnels create

211
Q

What is Stackdriver?

A

A set of services for monitoring, logging, tracing and debugging applications and resources.

212
Q

What are some key points of Stackdriver?

A
  1. works in hybrid environments -GCP, AWS and on-premise resources2. metrics are defined measurements on a resource collected at regular intervals - aggregate values such as min, max or average3. you create a policy to monitor a metric4. needs a workspace to store the data5. can receive reports by email6. agents send data from monitored resources to Stackdriver in streams7. serverless
213
Q

Examples of metrics for Stackdriver ? (2)

A
  1. average CPU utilization over last minute2. number of bytes written to a storage device over last minute.
214
Q

What is a policy to monitor a metric?

A

A policy consists of conditions that determine when to issue an alert or notification. They include notification channels and optional documentation

215
Q

Give two examples of specifying when a condition is triggered.

A
  1. anytime a value exceeds a threshold2. anytime a value exceeds a threshold for an extended period of time
216
Q

What notification channels can a Stackdriver policy have?

A
  1. Email2. Slack3. GCP4. PagerDuty5. HipChat6. Campfire
217
Q

What are the two ways to create a custom metric in Stackdriver?

A
  1. OpenCensus - higher level open source monitoring-focused API2. Stackdriver’s Monitoring API - lower level
218
Q

Key points of logging with Stackdriver

A

1.

219
Q

How long are logs retained in Stackdriver logging?

A

30 days - need to export them to Cloud Storage, BigQuery, Cloud Pub/Sub or custom destination to keep them longer

220
Q

What are log sinks in Stackdriver?

A

Log sinks are the places that logs are moved to (exported to) in order to retain them for more than 30 days

221
Q

What is App Engine?

A

Platform as a Service that provides a managed platform for running applications

222
Q

What are the 4 components of App Engine?

A
  1. Application2. Service3. Version4. Instance
223
Q

What is an App Engine application?

A

A high level resource created in a project. Each project can have one App Engine Application.

224
Q

What is an App Engine service

A

The service is the code executed in the app. It is typically structured to perform a single function. Services are defined by their source code and their configuration.

225
Q

What is an App Engine version?

A

The source code and configuration of a service constitutes a version of the app. A service can have multiple versions.

226
Q

What is an App Engine instance?

A

When a version executes, it creates an instance of the app.

227
Q

What environments can you run in App Engine?

A
  1. Standard Environment2. Flexible Environment
228
Q

What are some key points of the Standard Environment?

A
  1. runs application in a pre-configured language specific sandbox2. fastest spin up time and less expensive3. suited for apps written in one of the supported languages and you don’t need OS packages or other compiled software external to the app4. Two types: 1st generation and 2nd generation
229
Q

What are key points about 1st generation Standard Environment implementations?

A
  1. Supports Python 2.7, PHP 5.5 or Go 1.92. only a select set of white-listed extensions and libraries are allowed3. restricted network access
230
Q

What are key points about 2nd generation Standard Environment implementations?

A
  1. java 8, Python 3.7, Php 7.2, Node.js 8 and Go 1.112. any language extenstion3. full network access4. can scale down to 0 instances if there is no load
231
Q

What are some key points about a Flexible Environment implementation?

A
  1. based on Docker Containers2. users can customize runtime environments by configuring container3. native support for Java 8, Eclipse Jetty 9, Python 2.7, Python 3.6, Node.js, Ruby, PHP, .Net and Go4. good option when you can package applications and services into a small set of containers5. works well when you have 3rd party software or libraries that need to run along side application6. slower spin up time and more expensive.7. will scale down but will always have at least one instance running8. the health is monitored by Google9. can work with OS background processes and write to local disk
232
Q

How can you delegate workload in App Engine?

A

Through push queues, pull queues or cron jobs

233
Q

How do you deploy an App Engine with a .yaml file?

A
  1. gcloud app deploy [.yaml CONFIG FILE NAME]2. app.yaml is default, so no need to specify if that is the config file name3. must be run in directory containing .yaml file4. once deployed, output will provide url to view result of deployed service ([project name].appspot.com)
234
Q

How do you stop an app engine instance via the shell?

A

gcloud app versions stop [v1 v2…] pass in list of versions to stop

235
Q

What type of instances can be running in App Engine?

A
  1. dynamic instances - based on load2. resident instances - running all the time
236
Q

What are some key points of dynamic instances of an App Engine app?

A
  1. it is optimized for cost savings by shutting down unused resources2. uses two types of scaling - automatic and basic
237
Q

What are the two types of scaling for dynamic instances of an App Engine app?

A
  1. Automatic Scaling2. Basic Scaling
238
Q

What parameters are used in a yaml file to manage automatic scaling?

A

Add automatic_scaling to .yaml file along with parameters:1. target_cpu_utilization - max cpu usage before additional instances are started2. target_throughput_utilization - (0.5 to 0.95)3. max_concurrent_requests default 10, max 804. max_instances5. min_instances6. max_pending_latency - max time a request waits in the queue to be processed.7. min_pending_latency

239
Q

What parameters are used in a yaml file to manage basic scaling?

A

add basic_scaling to .yaml file followed by parameters:1. ide_timeout2. max_instances

240
Q

What type of scaling do resident instances allow?

A

Manual scaling. can add manual_scaling to .yaml file along with the parameter instances

241
Q

What are the ways you can split traffic between App Engine versions?

A
  1. IP address - client is always routed to the same version as long as their IP doesn’t change2. HTTP Cookie - preferred way to split. will send user to same version even if their IP changes3. Random - default - distributes workload evenly
242
Q

How do you split traffic via shell?

A

gcloud app services set-traffic [SERVICE NAME] [SPLIT METHOD]–splits v1=.4, v2=.6 for a 40/60 split–migrate - indicates traffic should be migrated from previous version to new version–split-by - ip, random or cookie

243
Q

What is Compute Engine?

A

IaaS which allows users to create VMs, attach to persistent storage and make use of ther GCP services

244
Q

What is Compute Engine made of?

A

Scalable, high performance virtual machines that are completely customizable.- over 25 predefined machine types with various numbers of CPUs and memory- customize 1-64 CPUs with up to 6.5GB RAM per CPU

245
Q

What do compute engine instances run and 3 key points about those instances?

A

Images that contain an OS, libraries and other code.-Google provides Linux and Windows Server images-3rd party vendors provide other images-Can create custom image from boot disk or snapshot from an existing VM

246
Q

Where are Compute Engines contained?

A

Contained in a project and run in a zone and region- hardware costs and availability can differ between regions

247
Q

What storage options are available for Compute Engine VMs?

A
  1. remote standard persistent disks2. local solid state drives
248
Q

What are some key points about Compute Engine preemptibility?

A
  1. short lived instances that can persist up to 24 hours2. low cost3. may not be available and can terminate at any time with 30 sec notice4. cannot migrate to a regular VM5. cannot be set to automatically restart6. good for apps that are fault tolerant and can withstand interruptions
249
Q

What are some key points of Compute Engine?

A
  1. completely customizable2. can be made preemptible3. can create instance groups4. can set up health checks5. can attach GPU for math intensive applications
250
Q

What is an instance group and what are some key points?

A

It lets you manage multiple VMs as a single unit. 1. any gcloud command issued to the group is applied to all VMs in the group2. instance template is based of an instance and can be used to make identical instances3. all GCP load balancing requires use of an instance group

251
Q

What are the two types of instance groups.

A

Unmanaged-collections of instances with different configurations- no auto-scaling- can’t use instance templatesManaged- collection of instances that are identical- automatically scale and load balance- instance that crashes can be automatically recreated- can be set up with instance template- zonal or regional

252
Q

What is a health check?

A

A health check contacts the server and waits for a response. When setting up a health check, you set the frequency, how long to wait for a response and what a given number of successes or failures means in terms of health

253
Q

Key points of VM billing in Compute Engine?

A
  1. billed in 1 sec increments based on machine type2. discount for sustained usage3. charged for a minimum of 1 min4. preemptible can save up to 80%5. once the instance is stopped, you are not billed
254
Q

Key points of GPUs attached to a VM?

A
  1. not all zones/machine types have GPUs as an option2. can have 1, 2 or 4 GPUs attached to a machine3. cannot be attached to shared memory machines
255
Q

What is a snapshot and what are some key points?

A

A copy of a disk that is useful for backup.1. first snapshot contains full data - subsequent ones are incremental2. if application is buffered in memory, make sure to flush it before creating snapshot3. users must have Compute Storage Admin role to work with a snapshot

256
Q

What is a disk image and what are some key points?

A

A copy of a disk that is in a suitable format for creating a VM1. can be made from a disk, snapshot, cloud storage file or another image.2. can delete or deprecate an image3. a family is a group of related images which are usually different versions of the same underlying image

257
Q

How do you create a commute engine instance via command line?

A

gcloud compute instances create [instance name]Values from default project will be used if not specified

258
Q

How do you view project info via command line?

A

gcloud compute project-info describe

259
Q

How do you list the vms via command line?

A

gcloud compute instances list

260
Q

What are some commonly used parameters when creating a VM?

A

–boot-disk-size (10GB and 2TB)–boot-disk-type–labels–machine-type : type of machine to use, standard is n1-standard-1–preemptible–subnet [SUBNET NAME] : to create the vm in a particular VPC

261
Q

How do you view available machine types for creating a VM?

A

gcloud compute machine-types list

262
Q

VM Management: What is metadata?

A

Key values pairs that are stored in a metdata serer and can be queried by Compute Engine API. It’s useful if running startup or shutdown scripts and need to change behavior based on metadata values

263
Q

VM Management: What options exist for availability policy?

A
  1. preemptibility2. automatic restart - auto restart if machine shut down3. on host maintenance - allows instances to be migrated to other servers during maintenance
264
Q

VM Management: What security options are available?

A
  1. Shielded VM - configured to have additional security measures2. Secure Boot - only authenticated OS software can run on VM3. VTPM - Virtual Trusted Platform Module4. Integrity Monitoring - uses a known baseline of boot measurements to compare current boot measurement5. SSH keys - can block project wide SSH keys
265
Q

VM Management: What disk options are available? (Not disk types)

A
  1. Specify whether boot disk is deleted when instance is deleted.2. How encryption will be managed3. Add new disk setting name, type, r/w parameters, size, encryption
266
Q

VM Management: What networking options are available?

A
  1. add network tags2. add another network interface to another network3. choose a VPC and select a subnet4. specify static IP or custom ephemeral address
267
Q

VM Management: What is sole tenancy?

A

It ensures that your VMs run on a server only with your other VMs

268
Q

How do you create an instance group via command line?

A

gcloud compute instance-templates create [template name]1. you can specify existing VMs as a source of the instance template2. it can contain instances zonally or regionally

269
Q

What is Kubernetes Engine?

A

It is GCP’s managed Kubernetes service.

270
Q

What are some key points of Kubernetes Engine?

A
  1. can create and maintain clusters without having to manage the Kubernetes platform2. Kubernetes runs containers on a cluster of VMs3. Similar to instance groups except Kubernetes can run different images and it uses containers4. Allows the user to describe the compute, storage and memory resources needed to run their services5. In between App Engine and Compute Engine in terms of deployment speed and management requirements.6. Only supports Docker7. Automatic load balancing and scaling.8. Automatic software updates with no downtime9. Automatic health checks & logging (Stack Driver)10. All traffic orchestrated by the master Kubernetes controller
271
Q

What is a container?

A

Highly-portable, light weight way of distributing and scaling apps and workloads without replicating the quest OS. It starts and stops more quickly and uses less resources (than a VM?)

272
Q

What are some key points of Kubernetes Engine Cluster Architecture?

A
  1. A Kubernetes cluster consists of a cluster master and one or more nodes2. The cluster master can be replicated and distributed for high availability and fault tolerance3. The Cluster master manages services provided by Kubernetes.4. Nodes execute the workloads run on the cluster5. Specify machine type when creating a cluster. Some of the memory and CPU is reserved for Kubernetes, so not all is available for the node
273
Q

What does cluster master manage and how can users issue commands to it?

A
  1. Kubernetes API, controllers and schedulers2. All interaction with nodes goes through master3. Master issues commands that perform an action on a nodeUsers can issue commands via kubectl command
274
Q

What is a node and what are some key points?

A
  1. Nodes are VMs that run containers configured to run an application. 2. They are primarily controlled by cluster manager but some commands can be run manually.3. Nodes run an agent called kubelet which is a service that communicates with the cluster manager.4. The vm created runs specialized OS optimized to run containers
275
Q

List 6 Kubernetes objects

A
  1. Pods2. Services3. Replica Set4. Deployment5. Stateful Sets6. Jobs
276
Q

What is a pod and what are some key points?

A

A pod is a single instance of a running process in a cluster1. They contain at least one container. usually one, but can run multiple2. Use shared networking and shared storage across containers - Each pod gets a unique IP and set of ports - Containers connect to a port - multiple containers within a pod connect to different ports and can talk via localhost3. A pod allows its containers to behave as if they were running on an isolated VM, sharing common storage, one IP and a set of ports. This allows deploying multiple instances of the same application or different instances of the same application on the same node without having to change their configuration4. the pod treats multiple containers as a single entity for management purposes5. They are usually created in group. 6. Pods support auto-scaling7. Ephemeral - they are expected to terminate8. A controller manages health monitoring and scaling

277
Q

What are services (Kubernetes Engine)?

A

A service provides API end points with a stable IP address and allows applications to discover pods running a particular application. Services update when changes are made to a pod, in order to maintain an up to date list of pods running an application. Services that depend on pods should not be tightly coupled to particular pods.

278
Q

Why should services that depend on pods not be tightly coupled to particular pods?

A

Pods are ephemeral and their IP may change

279
Q

What is a Replica Set?

A

A controller used by deployment to ensure the correct number of identical pods is running. If a pod is unhealthy, it will be terminated. If not enough pods are running, one will be created.

280
Q

What is a Deployment (Kubernetes Engine)?

A

A deployment is set of identical pods that are created using a pod template. A pod template is a definition of how to run a pod. The description of how to define the pod is a pod specification. Kubernetes uses this definition to keep the pod in the state defined by the template (e.g add pods to ensure a minimum set in the template)

281
Q

What states can a Kubernetes Deployment be in?

A
  1. Progressing - in the process of performing a task2. Completed - roll out of containers is complete and all pods are running the latest version of containers3. Failed - deployment process encountered a problem it could not recover from
282
Q

What is a Stateful Set (Kubernetes Engine)?

A

Most deployments are stateless. Stateful sets are like deployments, but a unique id is assigned to the pods. This allows Kubernetes to track which pod is used by which client, It is used when an application needs a unique network identifier or stable persistent storage

283
Q

What is a Job (Kubernetes Engine)?

A

A job is an abstraction about a workload. Jobs create pods and run them until the application completes a workload. Job Specs are in a config file and include specs about the container to use and the command to run.

284
Q

What is Kubernetes engine good for?

A
  1. Good option for running applications that depend on multiple micro services2. Good choice for large scale applications that require high availability and high reliability
285
Q

What are key points of Container Orchestration?

A
  1. Provides load balancing across Compute Engine VMs that are deployed in a Kubernetes cluster2. Automatic scaling of nodes in the cluster3. Automatic upgrade of cluster software as needed4. Node monitoring and health repair5. Logging6. Support for node pools ( collections of nodes with the same configuration)7. Supports eviction policies which sets threshold for resources and shuts down pods when threshold is surpassed
286
Q

Compare Kubernetes Engine and Compute Engine.

A
  1. KE is similar to running VMs, but rather than using hypervisor to separate the computing resources, a container manager is used. 2. No additional guest OSes run on top of the container manager3. Containers make use of host OS functionality4. OS and container manager ensure isolation between running containers
287
Q

How do you deploy a Kubernetes Cluster? (console and shell)

A

Create a cluster under KE -> Clusters : select zone/region/ machine template/ number node pools. KE runs a number of workloads to manage the cluster. You can view them in the workloads pagegcloud container clusters create [NAME] Parameters include project, zone, machine type, image disk type, disk size, number of nodesCommand to create a cluster can be very long. It’s better to select a template from the console and it will give you the necessary command

288
Q

How do you deploy an Application Pod ? (console and shell)

A

From Cluster page of KE, select Create a Deployment. Specify container image, environment variables, initial command, application name, labels, namespace and cluster to deploy to. Once deployed you can display the corresponding YAML specification of the deployment which can be saved and used to create deployments from the command line.kubectl run [DEPLOMENT NAME] –image=[DOCKER IMAGE NAME] –port=[PORT]