Introduction
In the bustling world of continuous integration (CI), efficiency and flexibility are paramount. This is where Spindle's new microVM engine comes in, offering an innovative approach to running CI workflows using QEMU-based microVMs. Each workflow benefits from a dedicated virtual machine, allowing for complete isolation and on-the-fly customization.
Why microVMs?
MicroVMs differ from traditional VMs by being lightweight. They strip away unnecessary elements like the BIOS or PCI bus, resulting in ultra-fast boot times and minimal memory usage. Spindle leverages this technology to provide CI execution environments that are both agile and powerful.
Configuration with NixOS
One of the most exciting features of this engine is its integration with NixOS. Thanks to Nix, each guest machine can be configured directly from the workflow file. This means you can not only define services to run, like PostgreSQL, but also ensure the correct databases and users are set up, with no manual intervention.
``yaml services: postgresql: enable: true ensureDatabases: ["spindle-workflow"] ensureUsers: - name: spindle-workflow ensureDBOwnership: true ``
Compatibility and Caching
Although the microVM engine is an upgrade from the old Nixery engine, it remains fully compatible. Simply replace nixery with microvm in an existing workflow to take advantage of the new features. Additionally, Spindle's aggressive caching ensures that dependencies, services, and other Nix derivations are stored for quick access during future runs.
The Two Flavors of Images
Spindle offers two types of images: those based on NixOS and others for systems like Alpine. This allows developers to choose the environment that best suits their specific needs.
``yaml image: alpine steps: - name: install golang command: apk add go ``
Self-hosting and Flexibility
One of Spindle's strengths is its ability to be self-hosted. Companies can deploy the microVM engine on their own hardware, offering full control over the CI environment.
Conclusion
Spindle's microVM engine represents a major advancement in continuous integration, combining speed, flexibility, and customization. Whether you're a small developer or a large enterprise, these innovations can transform how you manage your CI workflows.
Let's discuss your project in 15 minutes.