Google Cloud Platform SDK

GCP offers several standalone command-line interfaces (CLIs) to manage and interact with your GCP resources, gcloud being the main one. All secondary command-line tools are installed via gcloud. At time of writing this, the command-line tools are:

  • gcloud: The main CLI to manage your GCP resources and projects: authentication, local configuration, developer workflow, and interactions with the GCP APIs. The following services can be handled via the gcloud CLI: app engine, auth, compute engine, container, DataFlow, Dataproc, machine learning, SQL databases as well as deployment of Cloud resources, Iam setup, and logging with Stackdriver and web resources such as DNS, Domains, or Firebase.

Gcloud also takes care of other command-line tools:

  • gsutil: This is the CLI for Google Storage. You use gsutil to create and delete buckets, upload, download and move files around, set permissions, and so forth.
  • bq: This is the CLI for interacting with BigQuery.
  • datalab: The Datalab CLI.

All these CLI tools are Python scripts and require Python 2.7 installed on your system.

To install gcloud, the best way is to follow the instructions on the Cloud DSK page at https://cloud.google.com/sdk/downloads. Download the right package and run the appropriate commands for your machine. The install will guide you through the creation of ssh keys. It will install three files in your ~/.ssh folder. Your public and private ssh keys (that is, google_compute_engine.pub and google_compute_engine) and the list of know hosts (google_compute_known_hosts).

You can verify that gcloud is properly installed by running gcloud version in the terminal. Your output will be similar to:

Google Cloud SDK 173.0.0
core 2017.09.25
gsutil 4.27

As we can see, gcloud is not a one-size-fits-all tool. gcloud comes loaded with components. They can either be other standalone CLIs such as gsutils, bq, datalab or gcloud extensions (app-engine-python), as well as Alpha and Beta release levels. To see which components are installed in your gcloud, run:

$ gcloud components list

You will obtain the following result:

To install or remove components in your current SDK version (173.0.0), use this:

$ gcloud components install COMPONENT_ID 
$ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version (175.0.0), run:

$ gcloud components update
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.77.117