How to use Google cloud shell?

How to use Google cloud shell?

tudip-logo

Tudip

24 June 2019

Google Cloud Shell provides you with command-line access to computing resources hosted on the Google Cloud Platform. Cloud Shell makes it easy for you to manage all the Cloud Platform Console projects and resources without having to install the Google Cloud SDK and other tools on your system. With the Google Cloud Shell, Cloud SDK gcloud command and other utilities, your needs are always fulfilled.

Step 1: Click the Activate Cloud Shell button at the top of the google cloud console window to start a cloud shell.

Activate-cloud-shell-1024x483

Step 2: Your Google Cloud Shell session is now ready to use.
Step 3: When the Google Cloud Shell is started, the active project in Console is propagated to your gcloud configuration inside Cloud Shell.
Step 4: When you start the Google Cloud Shell, a small Google Compute Engine virtual machine running a Debian-based Linux operating system is already provisioned for you. Instance persists while the Cloud Shell session is active and terminates after an hour of inactivity.
Step 5: You can use “gcloud version” command to display a list of installed Cloud SDK components and their versions:

gcloud-version-command-1024x374

Features of Google Cloud Shell

  1. Full Power Access From Anywhere:
    Manages the GCP resources with flexibility of a Linux shell. Google Google Cloud Shell provides a command-line access to a virtual machine instance in a terminal window.
  2. Secure and Fully Authenticated by default:
    Google Cloud Shell provides built-in authorization for access to projects and resources hosted on the Google Cloud Platform.
  3. Your Favorite Tools Pre-installed and Up-to-Date:
    In command-line tools from bash and sh to emacs and vim are already pre-installed and updated. Admin tools such as MySql client and kubernetes, Docker are configured and ready for use. Your search on how to install the latest version and all its dependencies ends here. Just connect to the Google Cloud Shell and go!
  4. Developer Ready:
    Developers can enjoy access to all the pre-configured development tools. You will find Java, Go, Python, Node.js, PHP and Ruby development and deployment tools. Run your web applications inside the Cloud Shell instance and preview them from the browser.
  5. 5GB of Persistent Disk Storage:
    Cloud Shell provisions 5GB of the persistent disk storage mounted as your $HOME directory on the Cloud Shell instance. Scripts and user configuration files like .bashrc and .vimrc, persisting between the sessions can be stored in the home directory.
    All the files can be stored in the home directory, which include
  6. Opening multiple sessions:
    You can click the Add Cloud Shell Session button at the top of the Cloud Shell window to open additional sessions. Every session connects to the same virtual machine instance. When a new session is open, it will appear in a new tab at the bottom of the console.

Starting Google Cloud Shell from the gcloud CLI

If the Google Cloud SDK has been installed, you can interact with the Google Cloud Shell directly from an existing terminal. Using the ‘gcloud alpha cloud-shell ssh’ command, you can establish an interactive SSH session with the Google Cloud Shell. With the command ‘gcloud alpha cloud-shell’, you can also copy the files between your local and Cloud Shell machine via scp, and mount your Cloud Shell directory to your local file system via sshfs.

You can use the Google Cloud Shell to perform some common tasks

  • To create and manage Google Compute Engine instances
  • To create and access Google Cloud SQL databases
  • To manage Google Cloud Storage data
  • For Interacting with hosted or remote Git repositories, including Google Cloud Source Repositories
  • To Build and deploy Google App Engine applications

Usage limits of Cloud Shell

Cloud Shell is intended for interactive use. The non-interactive sessions will be ended automatically after a warning. A prolonged usage or computational or network intensive processes are not supported and may result in session termination without any warning.

Cloud Shell has weekly usage limits. If you reach your usage limit, you will need to wait until the specified time before you can use the Cloud Shell again.

If your session is terminated because you exceeded a service limit, Cloud Shell will display an error with a link to a form that allows you to appeal the limit violation.

search
Blog Categories
Request a quote