Outline● Overview of Google Developers Console● Google Compute Engine● Google Cloud SDK - gcutil● Startup Script● Backup Google Compute Engine● VPN service on Google
Google Developers Console
● Projects Overview
Production list
Your Project ID and number
Monitor of your usage amount
Google Compute Engine
● Resource Quotas ○ Resource quotas describe the default quota for each
resource on a per-project basis. Each Google Developers Console project is subject to default quotas on the number of resources that a project can have.
Google Compute Engine
Each project is subject to the following Google Compute Engine global resource limits:
● Networks: 5● Firewalls: 100● Images: 100● Snapshots: 5000● Routes: 100● Forwarding Rules: 50● Target Pools: 50● Health Checks: 50● SSD Persistent Disk: 1TB
Google Compute Engine
Each region within a project is subject to the following regional quotas:
● CPUs: 24● Maximum total aggregate disk space: 5TB● In-use IP addresses (both ephemeral and reserved): 23● Reserved IP addresses: 7
Google Compute Engine
● Create New Instance○ Zone : Determine what computing resources are available and
where your data is stored and used.
image source: https://developers.google.com/compute/docs/zones
Google Compute Engine
● Create New Instance○ Networking :
■ Network - tracffic rule (Firewall and Routes)■ External IP (Ephemeral / Staic IP)■ IP Forwarding (Disabled / Enabled)
○ Machine Type○ Boot Source
■ image■ disk■ snapshot
Google Cloud SDK - gcutil
2. 安裝Google Cloud SDK,可參考安裝指南:
https://developers.google.com/cloud/sdk/#Quick_Start
3. 認證您的Cloud SDK :
$ gcloud auth login
Google Cloud SDK - gcutil
安裝參考網址:
https://sites.google.com/a/mitac.com.tw/google-cloud-platform/google-compute-engine/gce---sdk-install-and-auth
Google Cloud SDK - gcutil
● Create a Instance (using gcutil):
$gcutil addinstance instance-name--zone=asia-east1-a --machine_type=f1-micro--image=centos-6-v20140619--wait_until_running
Startup Script
● You can choose to specify a startup script that will run when your instance boots up or restarts.
Startup Script
Step 2. Create an instance and put your script to instance’s metadata(use gcutil) : $gcutil addinstance apache-server--zone=asia-east1-a--machine_type=f1-micro--image=centos-6-v20140619 --wait_until_running--tags=http-server--metadata_from_file=startup-script:apache.sh
Backup
● Disk - Use ‘dd’ command(http://linux.vbird.org/linux_basic/0240tarcompress.php)
● Snapshot● Image - Use gcimagebundle
Backup
● Image - backup○ Step 1. 在客製好的主機上做打包的動作$ sudo gcimagebundle -d /dev/sda -o /tmp/ --log_file=/tmp/abc.log
○ Step 2. 傳送到google cloud storage$ gsutil cp /tmp/XXX.image.tar.gz gs://arecord-customise-images
Backup
● Image - restore○ 將image加到Google的image collection中,之後就可
以在web console中看到自己的image了$ gcutil addimage test-image gs://arecord-customise-images/XXX.image.tar.gz
OpenVPN on Google● Install OpenVPN: http://openvpn.net/index.
php/open-source/documentation/install.html?start=1● The location of VPN image: gs://mitac-image-
bucket/demo/openvpn-standalone-v20140701.tar.gz
Top Related