Habitat: Automating Applications, Minus Platform and Infrastructure Hassles

296

Remember the days when technology platforms sat in silos and our fierce allegiance to them did too? “We’re a Mac shop,” admins would announce. “We’re all in on Windows,” another might say.

Those days are quickly fading, along with the barriers that used to separate platform and infrastructure technologies. Instead, we are moving toward a world of containers, multiple instances of virtual machines, and multiple operating systems working in tandem. This is especially true in data centers, and open source tools are helping to drive the trend.

There is a pronounced need for ways to run applications on multiple types of infrastructure, ranging from bare metal to virtual machines to containers to the cloud. That’s where Habitat comes in. It’s an open source project focused on automation that travels with the application.” It has pedigree, too. Habitat comes from the makers of the venerable configuration management and automation platform Chef, which, like Puppet, has helped to optimize many heterogeneous technology environments.

According to Habitat developer and Chef CTO Adam Jacob: “Habitat exists to solve the problem of how we build, deploy, and manage applications…Our software becomes an example of Conway’s Law in action. The deep silo-ing of responsibility present in most enterprises drives us to design software specifically for one silo or another: we build security software, or we build application deployment software, or we build configuration management software. If we endeavor to escape this trap by designing solutions that cut across the silos, we fall prey to another issue: we’re forced to integrate into every silo’s existing software toolchain.”

Application Automation

Habitat is intended for building, deploying, and managing applications assuming that you are taking the application’s perspective on the problem. Habitat’s developers have a succinct phrase for summing this up: application automation.

Habitat insulates application execution from the dependencies of the environments that they operate in. So the applications become cloud- and platform-agnostic. Other orchestration tools require you to lay down the roots that an application will run on, and the roots needed for management, reconfiguration, and more. That produces a lot of extra workloads.

Habitat puts automation and management requirements for an application in one package with two components: 1) a flexible software packaging system; and 2) a supervisor that manages the lifecycle of the services declared in the packages. According to Jacob: “The supervisor component is where the run-time magic happens. Each supervisor can be joined with many others in a ‘ring,’ with the service it manages formed together into service groups. These supervisors can then handle ensuring the application has the correct configuration, has the right secrets, is in the correct topology, coordinates dynamic software upgrades, and more.”

The Chef-based team behind Habitat observed what it refers to as the “production cliff” — the difficulty in application management that arises when you get close to production. The DevOps community is familiar with this problem. Rather than forcing the deployment of more and more infrastructure and management software as you approach production, Habitat removes infrastructure contingencies.

Is Habitat meant to replace the container-centric tools of the moment, including Docker, Flocker, and Kubernetes? No, Habitat can be thought of as a close relative, but it is completely ecumenical when it comes to running on bare metal, virtual machines, or on PaaS platforms.

“We can take an application, wrap it in a layer of application automation, and the resulting package can be deployed on the infrastructure or runtime that suits it best. If your application has hard requirements on physical infrastructure (SAN settings, network topologies, GPUs, etc.), you can deploy it there, and manage it the same way you manage the software that deploys on top of a PaaS, or in a container,” said Jacob.

The best way to get familiar with Habitat is to walk through the free demonstration found here, and you can also walk through a tutorial, launchable here. The demonstration is very telegraphic. Essentially, it allows you to download and run existing packages, creating services with them. If you have experience with Linux package management, you’ll find the process to be very intuitive. The demo will take you about 10 minutes, and is eye-opening.

“Habitat is technology that simplifies the complexity of how we build, deploy, and manage our applications,” Jacob reports. “It empowers the teams that need to collaborate in order to deliver the future; and accelerates the speed with which we can get a better experience out to our users.”