Uber's DevPod - A Case Study

·

5 min read

Uber’s DevPod — A Case Study

One of the most common issues companies often grapple with is that of having complex codebase fragmentation. Uber, in 2017, was no exception. Their fragmented codebase created issues that permeated library versions, build tools, and dependency management, impacting collaboration and code sharing significantly. In response, Uber took a bold step — transitioning developers to a remote development environment anchored on Monorepos run on a Kubernetes cluster.

Copyright Uber: https://www.uber.com/en-ES/blog/devpod-improving-developer-productivity-at-uber/

DevPod: Uber’s Remote Development Environment

The decision to migrate to a Monorepo architecture wasn’t a small one. It was a strategic choice recommended by Uber’s build-strategy team to consolidate Uber’s sprawling codebase, which, at the time, spanned over 10 programming languages, 4,000+ services, 500+ web apps, and nine build tools. These were distributed across thousands of repositories, each with its trunk-based development and unique version per third-party library.

In an effort to combat these issues, Uber launched its proprietary remote development environment, DevPods, which run on Kubernetes clusters. With zero setup required, DevPods run in the cloud instead of on developers’ laptops, leading to significant improvements in build times. As of November 2022, over 60% of Uber engineers have embraced this new development environment.

By consolidating all codebases into a single Monorepo and centralizing the build platform based on Google’s Bazel, Uber managed to attain better dependency management, consistent universal production library versions, and improved support for a standard set of tools and processes. The cherry on the cake was the boosted visibility, collaboration, and code sharing that this transformation brought about.

However, it wasn’t all smooth sailing. The transition to the new code edit-build-run development loop introduced its own set of challenges. The process became lengthier with cloning, in some cases, taking up hours.

A Tailor-made Solution

Uber’s DevPods were designed to provide a superior developer experience, allowing engineers to leverage faster machines in a secure, controlled cloud environment. Each DevPod is a custom-fitted container running on a Kubernetes cluster, designed with the necessary tools and resources for seamless development on Uber’s monorepo.

These cloud-based DevPods boast enhanced performance, near-zero setup time, and advanced security, running the latest stable versions of each dependency. What’s more, DevPods are persistent, ensuring that engineers won’t lose their setups, files, or code changes while working on different devices or collaborating with others.

The advantages of using DevPods include zero setup and maintenance, top-notch security, and a commitment to low latency. With DevPods, Uber developers can hit the ground running on any of the main monorepos, as tools are ready-to-use, environments are provisioned on-demand, and repositories are pre-cloned.

User Experience: An Intuitive Approach

Uber engineers are presented with a “flavor” — a Docker image preset with tools, default settings, and configurations for specific groups. This approach, Uber engineers believe, “made perfect sense.” It allows them to base the DevPod image on the production image base, enabling the re-use of their critical production software configuration.

Moreover, Uber introduced a web-based interface for a smoother first-time experience with DevPods and improved troubleshooting, with plans to extend Devpod Central for visibility into resource usage and consumption.

Copyright Uber: https://www.uber.com/en-ES/blog/devpod-improving-developer-productivity-at-uber/

Harnessing the Power of Kubernetes

The transition from laptops to cloud computing was just the beginning. Kubernetes served as a foundation, offering a host for containers on powerful hardware, networking for container connectivity, and persistent volumes for storing engineering work between restarts.

Uber used custom resource definitions (CRDs) to extend Kubernetes by providing a data structure stored inside the control plate, eliminating the need for an internal database for Devpod metadata. This also facilitated the creation of and access to Devpods using kubectl.

The road ahead

DevPods have demonstrated their effectiveness in reducing local Git command performance, improving build times by up to 2.5 times over laptops for complex builds. This innovation has been welcomed by the Uber developer community, with over 60% of Uber software engineers adopting DevPods as of November 2022.

As Uber continues to refine its developer ecosystem, the future focus is on making DevPods even more seamless for engineers. Some areas of exploration include reducing the time to set up DevPods, creating ephemeral DevPods, and facilitating seamless file transfers between laptops and DevPods.

Uber’s DevPod stands as a testament to the power of innovation, bridging the gap between the complexities of development and the need for efficiency and speed. As we move forward, the question is no longer about surviving the challenges but about harnessing them for continuous improvement, much like what Uber has done with its DevPod platform.

In conclusion, the groundbreaking shift pioneered by Uber through DevPods presents a formidable model for remote development environments, which, although impressive, might not be feasible for every organization to adopt. This strategy requires a significant commitment of resources, time, and technical prowess, elements that may not be readily available or viable for all companies.

Undertaking such an extensive shift could be a daunting prospect for organizations, particularly those lacking wide in-house expertise and resources that can spend years in making such a tool. This is where Napptive’s Internal Developer Platform (IDP) comes into the fold, offering a comprehensive, ready-to-use solution that meets the needs of companies who look for a fully featured IDP that empowers teams without the need for intensive, time-consuming overhauls. This streamlined, out-of-the-box solution is precisely what businesses require to stay competitive in today’s rapidly evolving technological landscape, bridging the gap between present capabilities and future needs effortlessly. Try Napptive, for free now!