Help us understand the problem. What is going on with this article?

Google Cloud Shell as a Development Environment

Thanks to this article on Medium I recently found out that Google Cloud Shell can also be a pretty decent development environment depending on your use case.

What is the Cloud Shell?

Cloud Shell is a Linux terminal available on the Google Cloud Platform (GCP). As its main goal, Cloud Shell allows you to manage your projects and resources on GCP in your web browser, without having to install the Google Cloud SDK or other tools on your machine.

When Cloud Shell is started, a pre-configured virtual machine running a Debian-based Linux operating system is provisioned and you are given access to a Docker container running on top of that. So, we can use Cloud Shell for many of the things we would use such a machine for, but with some limitations, as explained later.

Using the Cloud Shell

You can open the Cloud Shell with an icon in the top bar:

image.png

After a couple of seconds, it will be available to you:

image.png

Editor

You can press the icon shown in the previous image to open the Editor. It is very basic, but it should be enough for many use cases.

image.png

Web Preview

In the example below, I'm running a sample application from the Cloud Shell documentation that starts a web application on port 8080.

image.png

You can preview the application by accessing the "Web Preview" icon above. It will open the application in a new browser tab:

image.png

Features and Pros

As shown in the previous section, we have a pretty capable development environment running in a web browser that we can use for free.

With Cloud Shell, we are provided with 5 GB of persistent disk storage tied to our $HOME directory. So, keep in mind that only files in your home directory persist between sessions (see Limitations).

What also makes Cloud Shell very convenient is the fact that it comes with many tools pre-installed, such as gcloud, kubectl, mysql, git, vim. And also, with development and deployment tools for Java, Go, Python, Node.js, PHP, and Ruby.

Boost Mode

Cloud Shell also has a feature called "Boost Mode". I don't see myself using it much as I tend to run simpler applications on this environment, but it basically increases the specs of the underlying virtual machine for the next 24 hours. It changes the VM's machine type from the default g1-small (0.5 vCPU / 1.70 RAM) to a n1-standard-1 (1 vCPU / 3.75 RAM).

To activate boost mode, find the 'Enable Boost Mode' option under the 'More' menu (the three dotted icon on the top right of Cloud Shell).

Limitations

Now, let's talk about limitations as these are what will ultimately determine whether or not this tool is suited for your use cases or not.

  • Weekly Quota - Cloud Shell's usage is limited to 50 hours a week and you can check your remaining time through an option in the menu.

image.png

  • Ephemeral Storage - As said before, you have only 5GB of storage available and it is tied to your home directory. Because you are allocated an ephemeral virtual machine, any modifications made to it outside the home folder are lost after the instance is terminated (if the sessions is inactive for an hour, for example).

These are what I consider the main limitations, but you can read more about the topic in the documentation.

Alternatives

Although Cloud Shell is not marketed as a Cloud IDE, it can be used as such, so I'd like to briefly mention other tools we can use instead.

  • AWS Cloud9 - probably the first tool that comes to mind of most people when we talk about Cloud IDEs. I really have nothing bad to say about it as a tool; it's feature complete and I had no problems using it. Its pricing model is tied to the usage of the EC2 instance used to run it, so the price is variable according to your usage. It is highly recommended, especially if you are free-tier eligible.
  • Codeanyhwere - this is another tool I used quite a bit. I had no problems with it in terms of features and it has a very reasonable pricing model if you want more resources. But, I don't recommend it much due to reliability issues I had. The last time I used it, I had to start a container from scratch because it got stuck in a state that I couldn't access it anymore. Also, it continued to consider deleted containers in my quota.
  • Codenvy - I didn't use this one so much, but it looked good to me in terms of features. I can't say much about it in terms of reliability, but you may try it yourself as the free plan is more than enough for many use cases.

Conclusion

Although Cloud IDEs didn't reach the domination suggested by some predictions, I feel they still have their use cases. One scenario where they are very well suited are coding workshops when you want to standardize everyone's environments and get up and running fast and without issues due to the differences in each person's platform. Nowadays, you also find them frequently associated with the use of Chromebooks for development.

In my case, I feel Cloud IDEs are convenient for simpler projects that I want to be able to use in different machines. And Cloud Shell suits this simple need for free with the additional convenience that I'm always logged in to Google services no matter the device I'm using.

References

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした