Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 9 min read Case study mediumAdept

GitHub’s Engineering Team has moved to Codespaces

GitHub moved development of its 14-year-old, 13 GB github/github monolith from bespoke macOS laptops to cloud-hosted Codespaces, replacing fragile local environments with disposable, task-per-branch dev environments. Creation time went from 45 minutes to 5 by shallow cloning with background unshallowing and a nightly GitHub Action that builds a mostly-bootstrapped Docker base image for the devcontainer. It then dropped to 10 seconds with prebuilds, pools of fully cloned and bootstrapped codespaces. Centralized config also let them upgrade every engineer from 8-core to 32-core VMs with one line, share live previews via forwarded ports, and support Vim/Emacs users over SSH.

Assumes: Git cloningDocker imagesdev containers

Related posts

  • How GitHub’s Developer Experience team improved innerloop development

    GitHub Engineering mediumAdept

    GitHub's Developer Experience team built Hubber Codespace (HCS), a Docker-Compose project that lets engineers stand up the full distributed GitHub ecosystem locally or in a codespace to integration-test changes before deploying. Docker-Compose won out over Minikube, rejected for networking complexity and long cycle times, and over the internal Codespace-Compose, which had no SLA and would add maintenance burden. A Go CLI with versioning that matches HCS releases wraps long compose invocations into commands like `hcs start`, `hcs shell` and `hcs status`. Scheduled automation pins SHAs from the monorepo and service repos into frequent releases, consumed via a devcontainer feature or the gh CLI.

  • The Journey to Cloud Development: How Shopify Went All-in on Spin

    Shopify Engineering mediumAdept

    Shopify replaced its laptop-based `dev` tool and xhyve-backed `railgun` VM with Spin, a cloud development environment, after monoliths and multi-repository projects outgrew local machines and made tophatting collaborators' changes painful. The path went through experiments: a local Kubernetes cluster that never caught on, and ad hoc GCE VMs that gained surprising traction. The first Spin version ran a host pod holding cloned repos plus a Docker Compose stack, and early adopters found its edit-here/run-there split confusing. The team then moved to per-developer Kubernetes namespaces with one pod per repository, and the broader lesson is iterating with users rather than shipping a finished design.

  • How GitHub uses GitHub Actions and Actions larger runners to build and test GitHub.com

    GitHub Engineering mediumAdept

    GitHub moved CI for GitHub.com to GitHub Actions on larger runners, peaking at about 4,500 concurrent 32-core runners, 15,000 jobs per hour and 150,000 cores. Custom VM images that pre-bundle tools and a cached build of the project source, refreshed several times a day through an API, cut workflow time from about 50 to 12 minutes. Reusable workflows keep CI configuration and runner selection central across repositories, and reusing results when Git tree IDs match skips 300-500 runs a day. Isolated runners reach private VPC services through an OIDC-token-validating remote access gateway, whose scaffolding is open-sourced.

  • How we build containerized services at GitHub using GitHub

    GitHub Engineering easyNovice

    GitHub runs hundreds of internal and production services on a "paved path": a Kubernetes-based, multi-cluster, multi-region platform plus conventions and custom tooling layered on top. Services are onboarded via a Hubot ChatOps scaffold command and a GitHub App that opens a PR with deployment.yaml, Kubernetes Deployment/Service manifests, a Debian Dockerfile, and CI checks that build images on every push. Each app/environment gets its own namespace, secrets are injected per-environment from a central vault, and deployments render manifests with the latest image and secrets before applying them across clusters. Centralizing capacity planning, security scanning, base images and deploy tooling lets teams skip cluster management and focus on their applications.

  • Host a Dev Environment on Render with VS Code and Tailscale

    Render mediumAdept

    A self-hosted cloud dev environment can run on Render as a private service, reached over a Tailscale subnet router and edited with VS Code's Remote-SSH extension. code-server works and installs as a PWA, but it lacks some extensions. OpenSSH fails in Render's unprivileged containers because privilege separation needs CAP_SYS_CHROOT, so dropbear serves SSH instead, with SSH agent forwarding for GitHub authentication. A persistent disk mounted at /home keeps repos, caches and the VS Code binaries across deploys, and a start script recreates authorized_keys at runtime so the mount doesn't overwrite it.

The quest for software engineering knowledge.

Look:
Layout: