Supercharge your remote development environment with DevPod
Hrittik Roy
Posted on December 19, 2023
DevPod 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:
- Install DevPod
- 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.
- Choose your IDE among the ones like VScode, Jupyter Notebook, Fleet, or others from JetBrains.
- 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.
If you prefer just a CLI, here’s where you’ll find additional instructions.
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:
Install and Configure
gcloud
CLI locally using the documentationClick on
Add Provider
in the Providers sidebar.
- Select your desired Provider (Here Google Cloud):
- Select the Project ID and your desired region on the UI and click on
Add Provider
:
- Congrats 🎉 Your Provider is now available 👏
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
:
- Add your Repository URL and choose your preferred IDE among the many options:
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.
- Wait for the daemon to be installed; in a few minutes, your workspace will be running on your browser.
- 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:
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:
Confirm, and it will remove the cloud resources as well:
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 for a small-scale representation of on-premise Kubernetes and how you can use DevPod with VS Code Browser.
Join the DevPod Slack if you face any issues while trying it out.
Posted on December 19, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.