Codespaces

Developing in the Clouds

Cloud hosted development environments accessible from anywhere

GitHub Codespaces

GitHub Codespaces allows you to develop entirely in a cloud environment with up to 32 cores. Using Codespaces an integrated development environment (IDE) built around Visual Studio Code on GitHub that can be accessed from a web browser, Visual Studio Code, or using SSH.

You set the machine type of the Virtual Machine (VM) when you define your Codespaces with options from 2 core / 4 8GB RAM, 4 cores / 8 16GB RAM, 8 cores / 16 32GB RAM, 16 cores / 32 64GB RAM and 32 cores / 128GB RAM each option having from 32 GB to 128 GB of storage. You may need to contact support to ask for access to the larger machine types.

Codespaces gives you a free upgrade with Twice the memory and 30% more CPU performance by upgrading the underlying infrastructure of Codespaces, migrating from Intel to AMD based CPUs, which boast improved specs. For the full details take a read of the Changelog -

GitHub Codespaces is a Chargeable product, but with a free of charge GitHub account you still get 120 core hours of usage and 15 GB-monthly storage included each month. Which means if you use 2 core option to setup your Codespace you will get 60 Hours free each month, but if you want more you can setup billing details to allow this. Pro accounts get 180 core hours and 20 GB storage per month.

All GitHub accounts by default have a GitHub Codespaces spending limit of $0 USD you will only be charged if you set the spending limit above zero. For more billing details please see the GitHub docs page About billing for GitHub Codespaces

GitHub Codespaces allows you to have a full working environment within the browser, you get access to a much larger set of Addins than you do in GitHub.dev Web Editor plus you also get the terminal so you can use CLI's (Command Line Interface) to interact with other services.

GitHub Codespaces By JasmineDesign

You can also develop from your Codespace directly in Visual Studio Code desktop. By connecting the Visual Studio Codespaces extension with your account on GitHub.

One of the great features is you can sync you profiles, addins and setup across the Cloud versions of VS Code and the desktop by turning on Settings Sync.

But you can take this further by adding a dev container (devcontainer.json) to your repository in which you can define the environment in more details. We will cover this in more details soon.

Depending on what task you are working on you could start in github.dev/vscode.dev then you can move to GitHub Codespaces should you need more features/Addins.

We have included an intro into setting up, using and deleting a GitHub Codespaces as part of our JasmineWS website starter. This covers our use case of wanting a more featured preview Addin to allow for better testing of the site you have built using the GitHub.dev web editor before going on to configure GitHub Pages.

Codespaces can be started and stopped, but a stopped Codespaces still uses storage space until it is deleted. You will get emailed by GitHub after so much of your free storage space is used. But remember that codespaces storage is chargeable.

By default a codespace will timeout after 30 minutes of inactivity and inactive codespaces will be deleted after 30 days but you can customize the duration of the timeout period and retention period.

GitHub Codespaces also offers prebuild to help speed up the creation of new codespaces for large or complex repositories.

Using GitHub Codespaces within an GitHub Organisation

We have written an overview of defining and using GitHub Codespaces within an GitHub Organisation.

Other Cloud Development Environments

JasmineDesign Development Workspace

Please see our Writing Code at JasmineDesign for a full list of available environments.

Visual Studio Codespaces

Visual Studio Codespaces used to be called Visual Studio Online.

Visual Studio Codespaces allows you to create a hosted development environment within a container that can be hosted on Azure or in a self managed virtual machine.

This allows your development environment to use the full resources available within Azure and not limited by the type of workstation or tablet you happen to be using.

You only pay for the time you are using these resources for and can set your container environment to shut down after so long of you not using it. Which then means you only pay a small fee for the storage that environment is using. But this environment can easily be restarted when you want to go back to work.

On top of that you can use all of the addin available within Visual Studio Code which are saved to your cloud environment.

You can also make use of Visual Studio Liveshare from within these environments to work and share with others.

Visual Studio Codespaces allows you to work with these environments from Visual Studio Code and Visual Studio 2019 or a browser-based editor that's accessible anywhere.

Visual Studio Codespaces (preview) is transitioning to GitHub Codespaces. The current Azure service retired on 17 February 2021.