|Introduction to Google Cloud Shell|
|Features of Google Cloud Shell|
|Launching Cloud Shell|
|Google Cloud Shell Editor|
Cloud computing is all about delivery of computing services over cloud (Internet) such as servers, storage, databases, networking, software, data processing, analytics and many more. All infrastructure and resources are managed by cloud providers. Cloud environments provide an interface using which you can manage your infrastructure and online code editor for cloud development.
Today we look more in detail about Google Cloud shell, its features, how it works, use cases and so on.
Introduction to Google Cloud Shell
Google Cloud shell provides an interactive shell environment for Google cloud platform. It is an online development and operations environment which enables anywhere access over a web browser.
Management of resources, with its online terminal having preloaded with utilities help to develop, build, debug and deploy your own cloud-based applications using its online editor. It makes it easier to manage projects and resources without the need to install the Google cloud SDK and other tools on the system.
With Cloud shell, the command line utility and other utilities of Cloud SDK are always available as and when required. When cloud shell is launched, Google cloud platform inaugurates a lightweight container along with the shell. Post that Google cloud platform will destroy this container after our session. There will be no charge to use Cloud Shell or Cloud Console.
Features of Google Cloud Shell
- It is a temporary compute engine virtual machine instance
- You can have access to command line instance from web browser
- It has built in code editor with 5GB persistent disk storage
- Pre Installed Google cloud SDK and other tools
- Language support for Java, Go, Python, Node.js, PHP, Ruby and .NET framework
- It is web preview functionality
- It has built in authorization for access to Google cloud platform console projects and resources
- You can customize environments according to your project needs
Launching Cloud Shell
A cloud shell can be launched in different ways depending on its use case.
- Launching cloud shell from cloud console – to launch cloud shell from cloud console click -> Activate shell in cloud console
Cloud Shell session will open inside a new frame at the bottom of the Cloud Console and will display a command-line prompt. It can take a couple of seconds for a session to be initialized.
- Launching a standalone session – to launch a standalone session you can use shell.cloud.google.com . The cloud shell editor and terminal will start automatically. To open cloud shell editor use ide.cloud.google.com
- Launching within documentation – you will find ‘Activate shell’ in the header of the documentation page . This will launch a cloud shell as a panel in the current page at the bottom. The cloud shell terminal comes with Cloud SDK, Docker, Terraform, and command line utilities as pre-installed and authentication is based on your google credentials.
- Launching with an open in cloud shell link – if you want users to play around with your project and code samples then use the Open in cloud shell link option. This allows the user to construct and publish a URL which will automatically perform actions on launch of cloud shell such as Git repository cloning or opening a tutorial.
- Launching and connecting locally to cloud shell using gcloud tool – to connect cloud shell environment from command line interface Google cloud SDK installation is required. With gcloud cloud-shell command interactive SSH sessions can be established with cloud shell and you can copy files between local machine and cloud shell environment.
Google Cloud Shell Editor
It has a built-in editor which can be used to browse file directories, edit files. The built-in editor is in beta stage and runs Theia, a cloud and Desktop IDE platform. It has additional features compared to regular editors. To modify files in editor, you can use activate cloud shell and execute command
Cloudshell edit FILEPATH
Modifying sources on cloud source repositories (CSR) – it allows you to modify files on CSR, navigate to cloud source repository and select repository and click on Edit code at the top right corner of page.
You can perform git operations and run regular terminal commands on shell.
Customization of editor can be performed and you switch to different theme such as Dark theme on the menu, navigate to File->settings-> change colour theme and select the Dark theme