Google Cloud Shell
Google Cloud Shell is a command line interface to integrate you with the google cloud experience. It is available in a number of versions for Windows, Linux and in browser.
Cloud Shell is a temporary Compute Engine VM which comes with 5GB of persistent disk storage ($home dir). It comes installed with a number of applications such as Cloud SDK, Java, phython etc.
Gcloud commands are broken up into the following :
gCloud | Service | Resource | Verb
There are some important concepts to remember:
- Cloud shell is tied to the account, not the project
- Server is not persistent
- Resources in $home are available after reboot, but all other resoruces or preemptive
- Cloud Shell can response to JSON API requests
- APIs can be queried with the API Explorer (Swagger)
- You can use google cloud client libraries – https://cloud.google.com/apis/docs/cloud-client-libraries
- Temporary Compute Engine VM
- Command-line access to the instance via a browser
- 5 GB of persistent disk storage ($HOME dir)
- Pre-installed Cloud SDK and other tools
- gcloud: for working with Google Compute Engine and many GCP services
- gsutil: for working with Cloud Storage
- kubectl: for working with Google Container Engine and Kubernetes
- bq: for working with BigQuery
- Language support for Java, Go, Python, Node.js, PHP, and Ruby
- Web preview functionality
- Built-in authorization for access to resources and instances
After 1 hour of inactivity, the Cloud Shell instance is recycled. Only the /home directory persists. Any changes made to the system configuration, including environment variables, are lost between sessions.