项目作者: aawadall

项目描述 :
Experimenting with GCP SDK
高级语言: Shell
项目地址: git://github.com/aawadall/gcp_sdk_exp1.git
创建时间: 2019-07-20T13:50:08Z
项目社区:https://github.com/aawadall/gcp_sdk_exp1

开源协议:

下载


gcp_sdk_exp1

Experimenting with GCP SDK follow along https://app.pluralsight.com/library/courses/gcp-fundamentals/

Task

  1. Create a new Google Cloud Storage Bucket
  2. Copy a picture to bucket
  3. Create compute instance bloghost
  4. Configure a simple LAMP Server
  5. Create SQL instance
  6. Setup user blogdbuser
  7. Setup Firewall Rules

Google Cloud Storage

Create a new Google Cloud Storage Bucket

  1. add code here

Copy a picture to bucket

  1. add code here

Compute VM

Create Compute Instance

  1. add code here

Configure a simple LAMP Server

  1. add code here

Google Cloud SQL

Create SQL instance

  1. add code here

Setup user

  1. add code here

Setup Firewall Rules

  1. add code here

TO REMOVE

Create VM

Delete existing VM with same name

  1. gcloud compute instances delete bloghost --quiet

Create New Instance

  1. gcloud compute instances create bloghost \
  2. --metadata-from-file startup-script=./lamp_startup.sh \
  3. --zone us-central1-a \

Set HTTP(S) Tags

  1. gcloud compute instances add-tags bloghost \
  2. --tags http-server,https-server

Step 2 - Setup Firewall Rules

Delete Existing Rules

  1. gcloud compute firewall-rules delete allow-http --quiet
  1. gcloud compute firewall-rules delete allow-https --quiet

Cerate New Firewall Rules

  1. gcloud compute firewall-rules create allow-http \
  2. --action allow \
  3. --rules tcp:80 \
  4. --direction IN \
  5. --target-tags http-server
  1. gcloud compute firewall-rules create allow-https \
  2. --allow tcp:443 \
  3. --direction IN \
  4. --target-tags https-server