Exploring the Google Cloud Platform: Utilizing Cloud Shell
If you’re utilizing Google Cloud Platform, you have the option to use Google’s built-in interactive shell to manage projects and resources. Cloud Shell is a command-line utility that you’re able to access through your web browser, so you can log in from just about anywhere. It’s essentially a lightweight Debian-based virtual machine that has the Google Cloud SDK built in as well as some other known tools such as Docker. Given that the Google Cloud SDK is included, you don’t need to install it on every machine you work from. You’re able to utilize tools such as gcloud and gsutil straight from Cloud Shell itself. Or you can even install other applications to it in the same manner that you would on a normal Debian-based system. Because the Google Cloud SDK is included, you’re able to do things such as create Compute Engine instances, manage GKE clusters and run and deploy App Engine applications.
Cloud Shell offers 5 GB of free storage that persists in new sessions. This is helpful if you if you have customized configuration and settings files that you prefer to work with (.bashrc, .vimrc, etc.). To take advantage of this persistent storage, you simply need to save files to your $HOME directory. Any applications you wish to install can persist as long as the application is installed in the $HOME directory as well. If you don’t necessarily need an app to persist, you can install the app to the system outside of your home directory. Other apps and files that you create remain as long as the current session is active. The session will time out after an hour of inactivity and any data outside of your $HOME directory will be lost.
Another feature to take advantage of is the Cloud Shell code editor, which is currently in Beta. This code editor is based on Eclipse Orion and provides syntax highlighting for many programming languages. Similar to a traditional editor, you’re able to browse your files system and edit/add/remove files as needed. While you’re editing within the code editor, the Cloud Shell is still active and available for use.
These are some features that highlight GCP’s Cloud Shell capabilities, but these are not all of the features. For a full list of features (and language support) available, you can refer to Google Cloud’s Documentation on Cloud Shell.