Managing GCP
- Anand Nerurkar
- Jun 24, 2022
- 2 min read
GCP Interfaces & Tools
You can access/manage GCP platform with below interfaces/tools.
· Cloud Console (UI/ mobile app)
· Cloud SDK
· Cloud Shell
· Cloud API
Once you login to google cloud console, get access to home page of console. You can explore various google services like Compute, Networking, Storage etc..
Google Cloud Console UI
By default, a project is created for you in GCP and create GCP resources for that project. We can create/manage project within GCP.
Cloud Shell
You can click on Cloud shell icon in console, will launch cloud shell.
Cloud SDK
You can install Cloud SDK. With Cloud SDK, you get various utilities like gsutil, bq & gcloud installed.
gcloud
· Helps to govern and manage GCP components, services & products
· Command line interface
gcloud init ->
· Set up task- default configuration like active account, project, region, zone
· Authorize cloud SDK to use your GCP credential to access GCP services
To view current configuration list –
gcloud configuration list
To view all configuration
gcloud config configurations list
To view all set values for configurations
gcloud config configurations describe configuration-name
To set the account for current configuration
gcloud config set core/account ‘abc@gmail.com’
To set the project
gcloud config set project project-name
To create new configuration
gcloud config configurations create dev
To activate configuration
gcloud config configurations activate dev
To set Region
gcloud config set compute/region region-name
To set Zone
gcloud config set compute/zone zone-name
gsutil
· Command to interact with cloud storage
· Cloud storage bucket is petabyte scale object storage in the GCP
· Manage/create/delete a bucket
· Upload/download a file to/from bucket
· Manage user access/control object and bucket
Create a bucket – gsutil mb gs://bucket-name
List all buckets – gsutil ls
List all object inside a bucket gsutil ls gs://bucket-name
Delete a bucket gsutil rm gs://bucket-name
Upload a file gsutil cp local-file gs://bucket-name
Download a file gsutil cp gs://bucket-name/remote-file
Transfer a file between bucket gsutil cp gs://bucket-name/filea gs://bucket-name2
Comments