Speed, Isolation, Developer Experience: Pick Two for CI/CD
Developers don't have to settle for less. Virtual machines make continuous integration and delivery easier than ever.
But these pipelines, despite all their benefits, come with hidden costs and trade-offs. Not long ago, you had to pick two out of three following benefits: speed, isolation, and simplicity of use. With legacy dev tools, it was not possible to achieve all three. The same problem applies to continuous integration (CI) systems.
Trade-Offs: Is It Possible to Have It All?
If you wanted fast pipelines, you would use a light-weight, reliable, scalable CI system that ran on containers and could be provisioned and killed easily (following the cattle vs pet analogy). This setup would allow your CI system to run fast builds with minimal resource costs. After all, this build system would be ephemeral and immutable. This is what Harness CI was designed for, as it’s powered by Drone.
But if, let’s say, you optimize for security because you work for a highly regulated industry or for a government, then you would likely focus more on isolation. If the main driver of your software delivery efforts was security, you wouldn't mind that the infrastructure powering your CI took longer to provision as long as it had higher levels of isolation and access to more secure lower level kernel features. But that scenario is certainly more cumbersome and slow than the former, and none were particularly dev friendly from the get-go. Scripting, pipeline maintenance, and more everyday toil was unavoidable in those two scenarios – and it sucked. In essence, those tradeoffs were inevitable.
Darren Shepherd highlights a key pain point with many tools: usability. In some cases, developer experience is the main driver when building a software delivery pipeline. Running nested or parallel tasks on other containers may require the ability to provide root or admin privileges to a container. This situation doesn’t come without risks and friction. On top of that, other security-centered use cases required access to the hypervisor or deeper layers of the runtime. The available runtime in any given container was just not enough. Adding to the developer headache is the question of price -- specifically, managing cloud costs when it comes to multiple separate tools.
At Harness, we strive to make these trade-offs a thing of the past. Not only that, we want to make CI processes complementary and enjoyable to all developers. Whether speed is the main driver, security is top of mind, or you’d like the tools you work with to help solve tasks elegantly, Harness has a tool for developers.
No More Trade-Offs: Fast CI on VMs Anywhere
Virtual machines (VMs) underpinned the virtualization revolution. They are still a fantastic way to isolate computers and make the best of bare metal machines. VMs run everywhere, including at the Edge and in the public cloud, and they do so with a full system image running in them. AWS was the first to offer VMs through its Elastic Compute Cloud (EC2). Google Cloud offers a similar service called Compute Engine and Microsoft Azure also has Virtual Machines. VMs are not as easy to provision and delete as containers, but they are still easier to provision than a physical machine.
Harness Support on VMs
Harness CI currently runs on VMs on AWS with either Docker, Linux/arm64 or MacOS images and GCP VMs. These are all the infrastructure options Harness CI supports currently:
- Win on K8s
- Docker runner
The list will continue to expand, so if you want to stay updated on new Harness features and use cases, subscribe to our YouTube and Twitch channels, where we host a variety of shows like Drone and Harness CI office hours or the CodeAbout sessions. We want to help our users get the most out of Harness CI by providing information about CI/CD best practices.
Harness CI: Delivering Speed, Isolation, AND Developer Experience
At Harness, we are providing the best developer experience regardless of the choices you make or the constraints you have. We want your software delivery efforts to be productive and enjoyable. Unlike many open source CI tools, Harness CI is an enterprise-grade and yet lightweight CI system. It’s the launchpad to DevOps growth through its modern software delivery platform. This means Harness CI is able to extend elastically to meet spikes in resource demand and shrink when idle. It’s designed with efficiency in mind, like the rest of the platform.
That’s the beauty of having built a cloud-native CI system: it’s fully adapted to efficiencies of elastic and declarative infrastructure. The fact that many developers love both containers and Kubernetes is confirmation that this was a good decision when we launched the CI module back in August 2021.
Harness CI is powered by Drone so it runs wherever you need it to at scale. And, it also aims to make using it memorable. Part of the experience is Matrix builds. Everyday life for developers is easier, especially if they are combined with the different looping capabilities the product offers as well. With this feature, developers can simplify the definition of builds by making changes to complex pipelines in one place in one go. Previously, they would have to make changes across disparate places in a file. Matrix builds effectively reduce the repetition and redundant definitions of pipelines that are hard to edit or change.
Test parallelization comes in handy when developers don’t want to wait long for their builds to finish. Test parallelization contributes to the Harness CI experience by letting developers set parallelism for a given job and keep it extensible for use cases outside of tests. For example, security scanning, code linting, and workload generation testing are other potential use cases that can benefit from being able to run in parallel.
The way Harness CI manages tests through its flagship capability, Test Intelligence, is the way we want to contribute to fostering the adoption of test-driven development. Running your test suites shouldn’t be painful or boring,. iIt should be incremental and provide feedback when it’s relevant. Test intelligence is language specific and it now supports Microsoft’s .NET Core.