Hello GCP World
Google Cloud Platform
Compute: A variety of machine types that support any type of workload. The different computing options let you decide how much control you want over operational details and infrastructure.
Storage: Data storage and database options for structured or unstructured, relational or non relational data.
Networking: Services that balance application traffic and provision security rules.
Cloud Operations: A suite of cross-cloud logging, monitoring, trace, and other service reliability tools.
Tools: Services that help developers manage deployments and application build pipelines.
Big Data: Services that allow you to process and analyze large datasets.
Artificial Intelligence: A suite of APIs that run specific artificial intelligence and machine learning tasks on Google Cloud.
Google Cloud 제품
VM insatnace 생성
gcloud compute instances create gcelab2 --machine-type n1-standard-2 --zone us-central1-f
gcloud compute ssh gcelab2 --zone us-central1-f
zone, region 가져오기
gcloud config get-value compute/zone gcloud config get-value compute/region
제대로 되지 않은 경우
Click Navigation menu (Navigation menu), and then click Home > Dashboard.
gcloud compute project-info describe --project <your_project_ID>
환경 변수 지정
export PROJECT_ID=<your_project_ID>export ZONE=<your_zone>
gcloud auth listgcloud config list project
gcloud compute instances create test2 --machine-type n1-standard-2 --zone $ZONE
Created [https://www.googleapis.com/compute/v1/projects/id/zones/us-central1-a/instances/gcelab2].NAME: test2ZONE: us-central1-aMACHINE_TYPE: n1-standard-2PREEMPTIBLE:INTERNAL_IP: 10.128.0.2EXTERNAL_IP:STATUS: RUNNING
gcloud computeallows you to manage your Compute Engine resources in a format that's simpler than the Compute Engine API.
instances createcreates a new instance.
test2is the name of the VM.
--machine-typeflag specifies the machine type as n1-standard-2.
--zoneflag specifies where the VM is created.
If you omit the
gcloudtool can infer your desired zone based on your default properties.
Other required instance settings, such as machine type and image, are set to default values if not specified in the create command.
gcloud compute instances create --help
Explore gcloud commands
gcloud config --help gcloud help config gcloud config list gcloud config list --all gcloud components list
2: Install a new component
자동 완성 모드
Auto-complete mode $sudo apt-get install google-cloud-sdk $gcloud beta interactive
gcloud beta interactiveWelcome to the gcloud interactive shell environment.Tips:o start by typing commands to get auto-suggestions and inline helpo use tab, up-arrow, or down-arrow to navigate completion dropdownso use space or / to accept the highlighted dropdown itemo run gcloud <alpha|beta> interactive --help for more infoRun $ gcloud feedback to report bugs or request new features.
gcloud compute instances describe <your_vm>
gcloud compute ssh [instance 이름] --zone $ZONE
Google Cloud services
- Cloud Console
- Command-line interface
- Client libraries
gcloud: for working with Compute Engine, Google Kubernetes Engine (GKE) and many Google Cloud services
gsutil: for working with Cloud Storage
kubectl: for working with GKE and Kubernetes
bq: for working with BigQuery
a lift 'only yourself' restriction -> list all processes with a terminal.u 'user format' -> provides additional information columns.w wide output -> for when you have a screen wide enough to show all info.x lift 'must have terminal' restriction -> a+x == list everything.