3. Account Setup Flashcards

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

Resources: two categories

A
  1. Service-level resources
    - Compute Instance VMs
    - Cloud Storage buckets
    - Cloud SQL databases
  2. Account-level resources
    - Organisation itself
    - Folders
    - Project
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Resource Hierarchy

A

Comprises Service Level + Account Level resources.
Allows to Configure and grant access to the various resources

  1. Domain (cloud level)
  2. Organisation level (root node) - associated with ONE domain only.
  3. Folders layer (grouping mechanism and isolation boundary between each project - you can set separate folder for each of your work departments (HR, Finance, Legal etc))
  4. Projects layer (core organisational component)
  5. Resource layer (compute engine instances, APIs etc)

Note: labels help categorise resources using a key-value relationship between the project and the resource layers.

Note: points 2-4 are Account-level resources and policies can be applied to them; point 5 is a Service-level resource; altogether 1-5 are hierarchical resources

Note: if two projects need the same set of permissions/policies, it’s best to apply them to the folder level and but the two projects into that folder

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

Project identifying attributes

A
  1. Project ID - globally unique, assigned by google, immutable (cannot be changed)
  2. Project name - user created, mutable
  3. Project number - globally unique, immutable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Resource Manager Tool

A

It’s an API that helps to:
- Gather a list of projects
- Create new projects
- Update existing projects
- Delete projects
- Recover previously deleted projects
- Can be accessed through RPC API and REST API

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

Organisation node creation

A

Depends on whether the company is:
- A Google workplace customer
- OR Non-Google workplace customer

If workplace customer, then all projects will automatically belong to your org node.

If not, use Cloud Identity to create org node

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

IAM (Identity and Access Management)

A

Controls the hierarchical policies

  • each child object is controlled by only ONE parent
  • access control policies and configuration settings on a parent resource are inherited by the child
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Cloud Billing Account

A
  • can be linked to one or more projects
  • Note that 1 project belongs to 1 billing account

There are
- Self-service (online) payment
- Invoiced (offline) payment

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

GCP Pricing Calculator

A

What the architecture will cost you

Note: Budget Alerts help to control costs.

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

Pub/Sub

A

Used for programmatic notifications or to automate cost management tasks.
So when certain events occur they are able to send custom notifications (send notification to Slack, or disable billing to stop usage).
Events from Cloud Storage and Pub/Sub can also trigger Cloud Functions for asynchronous execution OR HTTP invocation for synchronous execution.

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

Committed use discount (+ Reservations)

A
  • resource based
  • duration: 1 or 3 years (greater discount for 3 years)

Reservations - reserve the VM instances you need (ensures that these resources are always available for you); but your VM properties must exactly match those of the reserved machine!

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

Spend Base Commitment

(There are also resource based commitments)

A
  • can be used either for Cloud SQL or for VMware Engine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Operations Suite (detailed) + Resource Monitoring and Quota increase requests

A

IAM - quotas:
- this is where I can increase the quota by clicking on ‘edit quotas’

Monitoring
- allows to add a monitoring space such that I can add people to this space and they can receive billing alerts too
- Basis of SRE (Site Reliability Engineering)
- can generate insights from these outputs
- Each metric scope contains monitoring and config info
- Each metric scope can contain several projects to monitor
- The first google monitoring object = Scoping Project
- All users that have access to the metric will have the access to view performance of ALL projects associated with the metric therefore consider using separate metric scopes
- Alerting policies can be created (notified through email) - use multiple notification channels just to be sure about alerting
- Uptime checks test the availability of your public services across the regions
- Ops Agent is used to collect system and application metrics specifically from VM instances and sends them to Monitoring (can be enabled for a VM when it’s being created)
- can look at standard metrics but also create custom ones

Operations Suite
1. Resource Monitoring
2. Logging
- read/write log entries
- monitor alerts
- export logs to Cloud Storage buckets (for 30+ days retention) BigQuery (to analyse logs and visualise them using Looker Studio) / Pub/Sub (stream logs to applications and end-points)
3. Error Reporting
- available for App Engine, Cloud Functions, Cloud Run, Kubernetes, Compute Engine, GKE
4. Tracing
- collects latency data
- performance insights
- App Engine, HTTP(s) Load Balancers
5. Profiling
- continuous analysis of the CPU
- it has low impact on the app performance without slowing them down, unlike some profiling tools

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

Export billing data
(to analyse in detail if I want)

A
  • exported automatically to BigQuery
  • but an API should be enabled

2 types of billing data I can obtain
1. Daily Cost detail data
2. Pricing data

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

API (definition)

A

Application Programming Interface. Important to have no matter what service you are using on Google Cloud.

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

Super Admin Account (most imp);
Billing Account Administrator (has permissions to view billing costs) Vs Billing Account User Role (Admin User)

A

Admin User doesn’t have all the privileges. They have power to create, edit and delete resources but not the permissions related to billing.

They can for instance associate the projects they are on with a specific billing account.

To add the role, go to Billing - Account Management - Add Members

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

Cloud SDK and CLI (command line interface):
Overview

A

Cloud SDK - set of command line tools that allow you to manage resources through the terminal:
- gcloud
- gsutil
- bq
- kubectl

Note: to access Google Cloud Platform, you should authorise Google Cloud SDK tools.
To grant authorisation to Google Cloud SDK tools, you can either use a user account (for SDK use on a single machine) or a service account (for SDK use on multiple machines).

Service account is normally associated with the GCP project and not specific account.

17
Q

Cloud SDK and CLI (command line interface):
Commands

A

gcloud init - initialise, authorise and setup (sets up account, chooses the current project, prompts to authorise the use and also allows to choose a zone/region)

gcloud auth login - authorise access for gcloud (it’s used to prove that you are who you say you are and that you are allowed to use the services such as Compute Engine, Google Cloud Storage etc)

gcloud config - configure accounts and projects
gcloud config list - list current accounts and projects, project name, zone, region

gcloud config get-value - obtain info about zone/region/project

gcloud config set compute/region us-west1 - setting a project region

gcloud components - install, update, delete SDK components

export REGION=us-west1 - create a variable REGION that holds the ‘region’ value

18
Q

Display (print) information in the console

A

echo -e “PROJECT ID: $PROJECT_ID\nZONE: $ZONE”

Output
PROJECT ID: qwiklabs-gcp-04-005ec4f89981
ZONE: us-west1-b

19
Q

General format of the gcloud commands

A

gcloud + (component) + (entity) + (operation) + (positional arguments) + flags

E.g.:
gcloud + compute + instances + create + example-instance-1 –zone=us-central1-a

20
Q

Cloud SDK: Command to identify what the active account is atm

A

gcloud auth list

21
Q

Cloud SDK: Command for the path to the user config directory

A

gcloud info

This will show directory that holds your encrypted credentials and access tokens

22
Q

Cloud SDK: Command for Information about active configuration

A

gcloud config list

  • region
  • zone
  • account (who is currently “on”)
  • project
  • configuration name (nickname)
23
Q

Cloud Shell: check disk storage (command)

A

df -h

Cloud shell provides 5gb storage on the VM for free

24
Q

Cloud Shell: region choice

A

It is global, so you are automatically assigned to the closes region.

Unlike Cloud SDK, you cannot choose your own region/zone.

25
Q

Cloud Shell: create a file and open using Code Editor (like VS code)

A

Create a file:
touch file_name

Code/Change a file:
edit file_name

26
Q

Some VM memory properties

A

e2-small (memory 2GB)
e2-medium (memory 4GB)

27
Q

Quotas: Rate Quota

A

Amount of API usage per day, resets after specified time

28
Q

Quotas: Allocation Quota

A

E.g. no. of VMs or Load Balancers used by a project.

This quota must be explicitly released when you no longer want to use the resource, so it won’t reset after specified time on its own. (e.g. if a GKE cluster is deleted, this is the release of resource)

29
Q

Quotas: finding in the console

A

IAM & Admin –> quotas –> edit quota (to send an increase request)

OR through API dashboard
APIs & Services –> select one of the APIs

30
Q

Allow HTTP traffic

A

Selecting this option allows to access a web server that you install later.
Note: This automatically creates a firewall rule to allow HTTP traffic on port 80.

31
Q

Updating the OS on the VM

A

sudo apt-get update

32
Q

HTTPS

A
  • Hypertext Transfer Protocol Secure
  • default port number is 443
  • to set up https one needs to obtain and configure SSL / TLS certificates