Remote Software Development Methods
Benefits
Utilizing a remote development environment or offers software developers numerous advantages, including the ability to access their work from any location, ensuring a consistent development environment across different devices, and reducing hardware dependencies. Developers benefit from enhanced resource efficiency, centralized security measures, reduced setup time. Remote development protects intellectual property by ensuring the source code and data are centrally stored within a controlled environment and not spread across developer laptops and devices.
There are various approaches to remote development, all based on VS Code and using Linux on the remote machine.
| Method | VS Code | Source Code | Tool Chain | Tenancy |
|---|---|---|---|---|
| Code-Server | Remote | Remote | Remote | Single |
| Remote-SSH | Local | Remote | Remote (native) | Multiuser |
| Dev Containers | Local | Local | Local (docker) | Single |
| Remote-SSH + Dev Containers | Local | Remote | Remote (docker) | Multiuser |
| Remote-SSH + LXC Per Developer | Local | Remote | Remote (native) | Single per LXC |
Remote Development Methods
Method 1: Code-Server
Code-Server Runs the entire VS Code IDE, source code and tool chain in the remote server. The environment can be accessed over HTTPS using any standard web server. See code-server for easily deploying the remote environment in docker.
Method 2: Using the Remote - SSH Extension
Using the Visual Studio Code Remote - SSH extension, only VS Code needs to be installed on the local machine and the source code and the entire tool chain (go, dotnet, node, etc) can reside on the remote server. Note that the toolchain needs to installed natively on the remote server and cannot reside inside docker.
Ideally every developer will need individual LXC container on the remote machine and will ssh into it from VS Code for development activities. This is the most preferred way for remote development as it provides a simple environment, isolation from other devs and full root access for each developer in their own environment. LXC container on proxmox are light weight and make efficient user of CPU, RAM and disk resources. Proxmox supports running docker containers inside LXC which provides a highly flexible and customizable dev environment.
Method 3: Using the Dev Containers Extension
Using the Visual Studio Code Dev Containers extension, similar to Remote - SSH but the development can be done inside a local docker container using Docker Desktop or docker inside WSL2. This is method can be combined with Remote - SSH for complete remote development.
References:
- Code Server: https://coder.com/docs/code-server/latest
- LinuxServer docker code-server: https://docs.linuxserver.io/images/docker-code-server/
- Visual Studio Code Remote - SSH: https://code.visualstudio.com/docs/remote/ssh
- Visual Studio Code Dev Containers: https://code.visualstudio.com/docs/devcontainers/containers