Habitat, by Chef
One of the talks at the recent London DevOps meetup was about Habitat, a new product from Chef.
It’s completely independent from Chef, and is designed to deploy applications (whereas Chef is designed for ensuring consistency amongst servers).
Briefly, it does this by providing a supervisor that wraps your application. This supervisor, amongst other things, runs your application, monitors it via simple health checks, and manages the configuration.
There are a couple of other components of Habitat, which generally deal with telling Habitat about your app, but the supervisor is the key part.
If you were to tell the supervisor that the config has changed, it will restart the application with the new config.
Interestingly, it also communicates with other supervisors via the gossip protocol, so you only have to tell one of your application instances that the config has changed, and each instance would pick it up from another.
The live demo showed the Habitat supervisor running Redis, all of which happened inside a Docker container. If the Redis config was updated, the Redis instance would be restarted, without a new Docker image being built.
All sounds OK so far, but to me it’s clear that this is a tool solving yesterdays problems.
If you are trying to deploy applications to bare metal servers or VMs using Chef or Puppet, you will have ran in to a number of issues, and ended up with overly complicated recipes. These tools just weren’t designed for the job.
Habitat tries to solve that, and seems to do it fairly well.
However, the new world consists of clusters running managers such as Mesos, Kubernetes, etc, running Docker images or similar.
If I wanted to change the config in this world, I would ask the cluster manager to do it. It would then scale down the old instances whilst starting up the new instances, doing a rolling deployment.
Likewise, if I wanted to upgrade the application, I would build a new image, and again ask the cluster manager to deploy it in the same way.
The cluster manager has all of this capability, so I don’t see what Habitat gives us in this world.
Looking further ahead and even all of this may be superseded by going serverless. I recently used Heroku for a simple web app and it was great. AWS Lambda is also looking like a very interesting idea.
I think Habitat is an interesting solution to a an old problem. But the world is moving on, and I think Habitat will be left behind.