article

Simplifying Deployments with Compose files

In a continued effort towards easing the construction and use-in-production unikernel dream, we're excited to announce that we've introduced initial Compose file support into our tooling.

· 3 min read
In a continued effort towards easing the construction and use-in-production
unikernel dream, we're excited to announce that we've introduced initial
Compose file support into our tooling.

Where unikernels offer an ultra-lightweight, specialized alternative to traditional operating systems, with a guaranteed improvement in both efficiency, cold-start times, scale-to-zero and security for applications; they haven’t always been easy to build or use.

This is, however, exactly the space Unikraft operates in. Our ethos is to empower developers to build and deploy applications in this efficient way, quickly and easily. Today’s announcement brings us one step closer to this.

Thanks to the container revolution, tooling has never been easier to get things into the cloud; but there has been a huge sacrifice to in terms of performance and security. My recent article on how containers and unikernels work together goes into more detail about how using containers can be beneficial when done right. While the container revolution brought us both Compose, Kubernetes and a plethora of other orchestration tools, it also came with a hefty sacrifice in terms of software abstractions. We went from worrying about “bulky VMs” to obsessing over bulky deployments, sidecars, and layers-upon-layers of runtimes and in the process, we may have lost sight of simplicity.

With our latest update to kraft, integrating Compose file support into our tooling, we’re taking a significant step forward in closing the gap: ease-of-use and high-performance. Compose files, a staple in the Docker ecosystem, provide a simple and intuitive way to define multi-”container” applications and have become larger than just Docker itself. Now dubbed:

A specification for developer-centric application definition used in Cloud Native Applications. The Compose Specification is a developer-focused standard for defining cloud and platform agnostic container-based applications.

By extending support to Compose files in our open-source command-line client kraft, we’re enabling developers to leverage their existing knowledge and workflows seamlessly with unikernels.

This integration means that developers can now describe their application’s architecture, dependencies, and networking requirements using familiar Compose syntax:

services:
redis:
image: redis:latest
app:
build: .
ports:
- 443:8080
environment:
- REDIS_ADDR=http-go122-redis-redis.internal:6379

While our tooling takes care of the heavy lifting to package it into a lean, efficient unikernel, deployment is then handled either locally or on our hosted platform KraftCloud, for example:

Terminal window
kraft compose up

The above command will start everything on your host machine via QEMU, Firecracker or Xen (depending on your application’s configuration). Or, deploy remotely and benefit from scale-to-zero, auto-scale and more via:

Terminal window
kraft cloud compose up

By tackling both the local and remote setup, it streamlines the development process but also ensures consistency and reproducibility across environments. You can learn more about how to deploy to KraftCloud with Compose files in our documentation.

Furthermore, by embracing Compose files, we’re opening yet another door to a broader ecosystem of tools and services that support this standard, making it easier for teams to adopt unikernels without disrupting their existing workflows. Whether deploying locally for testing or scaling in production, the transition to unikernels has never been smoother.

As we continue to refine and expand our tooling, we’re committed to making unikernels accessible to all, unlocking new possibilities for efficient, secure, and scalable application deployment. In this initial release we support basic networking, services and volumes but we plan to continue to abide by the specification and make future improvements.

Compose and Beyond!

If you have found this article interesting, or use Compose files and you want to find out more about the tech behind KraftCloud read our other blog posts, join our Discord server and check out the Unikraft’s Linux Foundation OSS website. We would be extremely grateful for any feedback provided!

Sign-up now