Download - Google Cloud Platform Special Training
![Page 1: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/1.jpg)
Google Cloud PlatformSimon Su @ GCPUG.TW
http://goo.gl/3dNWgb
![Page 2: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/2.jpg)
2GCPUG.TW
![Page 3: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/3.jpg)
3
Compute Engine
![Page 4: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/4.jpg)
4
GCE basics
● Region and zones● Persistence disk & IOPS● Default permissions● Image and snapshot● Auto migration & auto restart● Preemptable VM
![Page 5: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/5.jpg)
5
Network, Routing & Firewall
Network
● Default network vs. new network
Routing
● Control internal routing
Firewall
● Only allow rules
![Page 6: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/6.jpg)
6
Load Balancer
● TCP, UDP Load Balancer● HTTP(S) Load Balancer● Auto Scale
○ Instance group○ Instance template○ Health check
![Page 7: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/7.jpg)
7
Cloud Launcher
https://console.cloud.google.com/launcher
![Page 8: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/8.jpg)
8
Others
Resources control & Audit
● GCE Quota & Apply● Operation log● GCE usage export
Metadata
● Start / Shutdown script● SSH key● Project environment use
![Page 9: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/9.jpg)
99
LAB1 - Scheduled backup your instance disk using snapshot
![Page 10: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/10.jpg)
10
Answer
Hint:
● gcloud compute disks snapshot $name --snapshot-name snap-$name-v$DT --zone $zone
● gcloud compute snapshots delete snap-$name-v$DT2 -q
![Page 11: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/11.jpg)
11
Cloud Storage
![Page 12: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/12.jpg)
12
Basic operation
● Bucket create and delete● Object create, update and delete● Object with path
![Page 13: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/13.jpg)
13
Object ACL
● Bucket permission● Object permission● Object default permission
![Page 14: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/14.jpg)
14
Website bucket
gsutil web set -m index.html -e 404.html gs://gsweb.micloud.tw
index page file
error page file
![Page 15: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/15.jpg)
1515
LAB2: Backup mysql dump data every day
![Page 16: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/16.jpg)
16
Answer
Hint
● gsutil cp $BK_DIR/$name-$(date +"%Y-%m-%d").sql.gz gs://ewant-db-backup/
![Page 17: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/17.jpg)
17
Cloud SQL
![Page 18: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/18.jpg)
18
Cloud SQL basic
● Create instances○ 1st vs 2nd generation○ Instance types
● Daily backup● Dump and import● Security control● Horizontal scale - Read only replication● Vertical scale - Instance scale up
![Page 19: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/19.jpg)
1919
LAB3: Backup CloudSQL db file to GCS
![Page 20: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/20.jpg)
20
Answer
Hint
● gcloud sql instances export --help
![Page 21: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/21.jpg)
21
Cloud Monitoring
![Page 22: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/22.jpg)
22
Basic Monitoring
● Free tier○ 5GB for free per project per month○ Project audit logs○ 7 days retention
● Premium tier○ Logging and monitoring for Amazon Web Services†.○ All the features of Stackdriver Monitoring, Logging, Error Reporting,
Trace, and Debugger.○ A larger allotment of logs, custom metrics, and logs-based metrics.○ A longer log retention period.
![Page 23: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/23.jpg)
23@kubernetesio @bretmcg @_askcarter
● Fluentd implemented agent● Default configured for all kinds of log type● Outside datacenter data collection
○ fluentd forward, secure_forward, http(s)...
Enabling Cloud Logging Agent
Step 1:
curl -sSO
https://dl.google.com/cloudage
nts/install-logging-agent.sh
Step 2:
sudo bash
install-logging-agent.sh
![Page 24: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/24.jpg)
24
Persistence logs
● Log export to Google services○ Cloud Storage○ Cloud PubSub○ BigQuery
![Page 25: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/25.jpg)
2525
LAB4: Enable your cloud logging and customize your monitor dashboard
![Page 26: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/26.jpg)
26
Answer
Hint
● https://cloud.google.com/logging/docs/agent/installation
![Page 27: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/27.jpg)
27
Cloud DNS
![Page 28: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/28.jpg)
28
Basic Cloud DNS concept
● Managing DNS records in Cloud DNS zones● 100% Availability and Low Latency● Automatic Scaling● Record update transaction
![Page 29: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/29.jpg)
2929
LAB5: Create a subdomain using Cloud DNS and try to use traction for add records
![Page 30: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/30.jpg)
30
Answer
Hint
● https://cloud.google.com/dns/records/json-record
● Using nslookup for test
![Page 31: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/31.jpg)
31
Deployment Manager
![Page 32: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/32.jpg)
32
Basic Concept
● Immutable deployment scope● Repeatable deployment process● Best practice - Cloud Launcher
![Page 33: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/33.jpg)
3333
LAB6: Create and deploy a vm instance using deployment manager
![Page 34: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/34.jpg)
34
Answer
Hint
● gcloud deployment-manager deployments create [your-deployment-name] --config [deploy-yaml-file]
![Page 35: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/35.jpg)
35
Learning Resources
![Page 36: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/36.jpg)
36
Official Document & Resources
● GCP Official documents: http://cloud.google.com/docs
● GCP Blog: http://googlecloudplatform.blogspot.com/http://googlecloudplatform.blogspot.com/
● GCP Podcast: https://www.gcppodcast.com/
●
![Page 37: Google Cloud Platform Special Training](https://reader033.vdocuments.mx/reader033/viewer/2022051301/5a64ee597f8b9aa6218b460f/html5/thumbnails/37.jpg)
3737
Q&A