Jump to Content
DevOps & SRE

Work from anywhere: Boost developer productivity with Cloud Workstations

April 11, 2023
https://storage.googleapis.com/gweb-cloudblog-publish/images/aiml2022_PO1vxqJ.max-2500x2500.jpg
Stephanie Wong

Developer Relations Engineer

“It works on my machine.” When I think of this, I can imagine a collective groan fall over the room. But building software isn’t easy. The amount of variability that exists in software environments is growing. The need to onboard geographically diverse teams and maintain secure workstations has led to some of the largest companies adopting cloud-based development environments. And for good reason: they give central governance across global fleets of dev environments while increasing dev productivity. 

To jump directly into a tutorial of Cloud Workstations, click here!

Local workstations slow you down…

There are two sides to every coin, and the same goes for development environments: administrators and developers.

It’s never been a breeze to set up development environments across fleets of machines. Administrators face a number of setbacks:

  1. Set up takes a long time - sometimes days or weeks. When a new developer starts or switches projects, administrators have to bootstrap machines, including installing runtimes, IDEs, applications, etc. And it becomes even more challenging when doing this across thousands of machines globally.

  2. Maintenance is hard. If you need to change workstations’ configuration, like providing more processing power, updating base images, or changing installs, it can be laborious to do this across machines and keep it consistent. 

  3. It’s a security risk. When developers maintain their own workstations over time with source code stored on local machines, you introduce attack surfaces and potential for data exfiltration.

Developers, on the other hand, face their own challenges:

  1. They usually don’t have root access. Admins like to keep it locked down for obvious reasons, but it prevents devs from easily installing/uninstalling software, drivers, and debugging programs on a regular basis.

  2. Configuration drift eventually occurs. Gradually libraries will become slightly different, which makes it harder for a developer to reproduce a result another developer experienced or what happened in staging/dev/test. 

  3. Running configuration scripts creates barriers to collaboration. Developer velocity is slowed down when they are responsible for configuring or updating their own workstations. 

  4. Getting access to beefier machines isn’t easy. Often developers ask for more processing power to properly run software tests. This can take more time when admins need to update the size of a physical machine.  

Developers should ideally be able to do their first commit to main on the first day of the job or soon after to facilitate a feeling of accomplishment. And they shouldn’t feel a huge burden stemming from enforced practices that can slow down their productivity. 

Seriously - workstations in the cloud?!

Cloud Workstations is like the Yin and Yang of development environments because it addresses both administrator and developer challenges. Listen to my conversation with the PMs to learn more, or read on!

As the name suggests, Cloud Workstations are well… workstations in the cloud. They are managed development environments with built-in security, developer flexibility, and support for many popular developer tools. And they address those pesky administrator and developer challenges in 3 main ways:

Simplify onboarding for new and remote developers

Administrators can set up consistent workstation configurations providing templates so developers can onboard faster than it takes to get a rental car. Plus, admins can use the Google Cloud console or APIs to update and synchronize all workstations in a single action. Developers can create and start a workstation in minutes, where the workstation configuration will be automatically applied - goodbye config drift and the classic, “works on my machine.” 

Consistent environments across teams

With Cloud Workstations you use predefined or custom containers to specify your environment configuration, like pre-installed tools, libraries, IDE extensions, preloaded files, and startup scripts. You can make sure developers get the latest versions and patches when they start working by setting a session limit and simply updating your container images. Cloud Workstations will then handle ensuring that they are all updated according to the container image you specified. Updating or patching the environments of hundreds or thousands of developers is as simple as updating their workstation configuration and letting Cloud Workstations handle the updates.

https://storage.googleapis.com/gweb-cloudblog-publish/images/image3_N70DdLQ.max-2000x2000.png

Increase developer productivity with custom tools

Work from home? Work from a plane? Work from the cabin at Base Camp? Developers get secure and fast development environments accessible via browser or local IDE anytime and anywhere with multi-IDE support. Cloud Workstations supports any code editors and applications that can be run in a Linux container. IDEs can also be personalized and support extensions. Plus you can use external, self-hosted, on-premises, or other cloud developer tools like GitLab and TeamCity.

Enhance security of your development environments

Since Cloud Workstations are centrally managed, yet configurable, you can mitigate exfiltrations. Developers can create workstations by selecting among the configurations they’re granted access to. Admins can prevent source code from being saved locally, and when developers write code, they can be certain they’re using the right version of their tools. 

Since Cloud Workstations run inside your VPC, code is run inside your private network and in your staging environment without the need to emulate your services. Plus you can apply security mechanisms at the network level, like VPC Service controls, private ingress/egress, Cloud Audit Logs, and granular IAM controls. 

How it works

Behind the scenes, Cloud Workstations are contained in and managed by workstation clusters (not to be confused with Google Kubernetes Engine clusters). 

Admins can create workstation clusters which live in a particular region and attach to a VPC network. Then Cloud Workstations manages resources used by workstations, like Compute Engine VMs, and persistent disks (PDs) inside your projects. You can control these resources like setting up scheduled disk snapshot policies that enforce backup policies. Meanwhile you can also set up network ingress/egress, VPC Service Controls or a fully private gateway so that only endpoints inside your VPC have access to Cloud Workstations.

https://storage.googleapis.com/gweb-cloudblog-publish/images/image4_qpHyVqE.max-1100x1100.png

Developers can create workstations that define development environments with a Cloud IDE, language tooling, libraries, and more. They can start/stop them on demand with data stored between sessions if attaching a PD. 

Try it out with an interactive tutorial!

Curious what set up looks like and what a cloud workstation feels like? I can tell you it looks and feels just like any other local development environment, while set up is a breeze. But don’t take my word for it: check out this in-console interactive tutorial, which will walk you through the set up.

https://storage.googleapis.com/gweb-cloudblog-publish/original_images/image1_rwK69QD.gif

Pro tip: Also check out Software Delivery Shield. Cloud Workstations is part of the Software Delivery Shield solution, which is a fully-managed, end-to-end software supply chain security solution that helps you to improve the security posture of developer workflows and tools, software dependencies, and CI/CD systems used to build and deploy your software. But, one step at a time ;)

Posted in