Supercharge your remote development environment with DevPod
Tags: devpod, cloud, googlecloud, devops
Published: 2023-12-19 04:53:23

[DevPod](https://devpod.sh/) is that new kid in town that works on the same standard of `devcontainers.json` that Codespaces uses but is on the infrastructure of your choice and is open source. The project was just launched this May and has gathered more than 5.3K stars in this period. The advantage is the lower costs (around 5-10 times cheaper than cloud VMs) with auto-shutdown.

This blog talks about the tool, how you can get started with DevPod quickly on GCP, and the benefits of Cloud Development Environment in general. 

# About DevPod

DevPod is a client-side tool, which means you can install either the Desktop application or the CLI locally and easily get started. The steps are simple:

1. Install DevPod
2. Configure your Provider or your infrastructure connection, which can be your local Kubernetes Cluster, Docker Instance, or a Cloud Provider. Here in this tutorial, we’ll use GCP. 
3. Choose your IDE among the ones like VScode, Jupyter Notebook, Fleet, or others from JetBrains.
4. Click on Start and get your development environment ready.

But again, there’s a simple question: Why go through this hassle when you can do things locally on your local machine?

Well, let me ask you a few questions:

What’s the most complicated thing while onboarding a new project or team? Is it setting it up and ensuring everything, including the dependencies, works smoothly? 

Is managing a lot of dependencies and fixing broken dev environments a waste of time?

Do you feel you need a powerful machine or more bandwidth for your day-to-day operations?


Suppose the answer to these questions is Yes. In that case, you understand there’s a very big requirement for a system that can use the flexibility of bigger machines and easier dev environment creation. Here, the combination of devcontainer and DevPod comes up. 

# Features that you want

The central problem that DevPod addresses is creating a smooth and consistent developer experience (DevEx) that is smooth and helps developers get to work without configuring broken environments. Let’s see some other features: 

Local development: You get the same developer experience locally, so you only need to rely on a cloud provider if you need the extra boost. 

Rich feature set: DevPod already supports prebuilds, auto inactivity shutdown, git & docker credentials sync, and many more features.

# Time for a Tutorial?

Now, with all the features set and praise about Dev Containers, you might want to know how you can get started with it as soon as possible. Remember the four steps from above where we discuss the simplicity that’s exactly how you get started. Before diving deeper, ensure you have a Google Cloud account, an unrestricted local machine, and an active internet connection.


## Step 1: Install DevPod

DevPod supports any OS of your choice, so go to the following links according to your choice and install the Desktop Application on your system. The CLI can be installed independently or via the App.

* [MacOS Silicon/ARM](https://github.com/loft-sh/devpod/releases/latest/download/DevPod_macos_aarch64.dmg)
* [MacOS Intel/AMD](https://github.com/loft-sh/devpod/releases/latest/download/DevPod_macos_x64.dmg)
* [Windows](https://github.com/loft-sh/devpod/releases/latest/download/DevPod_windows_x64_en-US.msi)
* [Linux AppImage](https://github.com/loft-sh/devpod/releases/latest/download/DevPod_linux_amd64.AppImage)
* [Linux Targz](https://github.com/loft-sh/devpod/releases/latest/download/DevPod_linux_x86_64.tar.gz)

If you prefer just a CLI, here’s where you’ll find [additional instructions.](https://devpod.sh/docs/getting-started/install#optional-install-devpod-cli)


## Step 2: Get your backend sorted

Now, assuming if you have Docker installed, you can use your local machine. But if you require to use some extra resources for extra compute power then you can use the remote backends via SSH or cloud. 

The steps are simple: Have a Cloud Account (Here it’s GCP) and then two steps:
1. Install and Configure `gcloud` CLI locally using the [documentation](https://cloud.google.com/sdk/docs/install)

2. Click on `Add Provider` in the Providers sidebar. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a51eklakt27hbcrrgcwe.png)

3. Select your desired Provider (Here Google Cloud):

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/za53vgytvzmijx3p28ka.png)

4. Select the Project ID and your desired region on the UI and click on `Add Provider`:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cra4yff2x0ofb3prqjxo.png)

5. Congrats 🎉 Your Provider is now available 👏

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d4bsslj26qn952acf06d.png)

# Step 3: Get Started with Your Workspaces

Now, workspaces are where you will code and develop your application, i.e., your development environment. Let’s move to the Workspace tab on your side panel and then click on `Create Workspace`:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l846lc7hjan81px0scbh.png)

2. Add your Repository URL and choose your preferred IDE among the many options:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hb8wl74hli1osgn7vpc3.png)

Once done, click `Create Workspace` and the process starts. If you scroll down, you can choose the name of workspace prebuilds, but we’ll keep this for a more advanced tutorial.


3. Wait for the daemon to be installed; in a few minutes, your workspace will be running on your browser.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lm4ayjyshilsh3379yk9.png)

4. Get Started coding

Now, you can install your required extensions and start your development quickly. Also, if you want to switch your default IDE in between development, you can easily do that from the workspace tab:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4pq34gtq0bgugpk35ll.png)

# Step 4: Clean UP your workspace

Navigate back to your workspace Tab to see all your workspaces running. Here you have an option to Rebuild, Stop, and Delete.

Choosing Delete will destroy your workspace:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuhq1d5lbumn9oh8q2m5.png)

Confirm, and it will remove the cloud resources as well:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogtfvffgglk7ihqp1mzl.png)

# Final Thoughts


Having a reliable method to create and reproduce setups can greatly benefit teams. In this tutorial, you learned how effortless it is to generate a workspace and utilize it for isolated workspaces. For more complex scenarios, you can implement pre-built configurations to reduce boot times and also utilize templates for more consistent workflows.


Also, remember there are data protection laws that prevent data from leaving the site so solutions like DevPod are very helpful. Like here’s a [tutorial](https://devpod.sh/docs/other-topics/advanced-guides/minikube-vscode-browser) for a small-scale representation of on-premise Kubernetes and how you can use DevPod with VS Code Browser.


Join the [DevPod Slack](https://slack.loft.sh/) if you face any issues while trying it out.