Releasing Comfygure 1.0
Two years ago, we introduced an open-source configuration manager called comfygure. Since then, we've been using this tool in production, and we've tweaked it so it's ready for prime time. Today, we are proud to announce that we released a stable version!
Read on to see what is included in this version, how you can test it, and what's our plan for the future of this project.
This post was published and commented on Hacker News: https://news.ycombinator.com/item?id=20029420
What Is Comfygure?
Let's take two minutes to explain what comfygure is and how it works. Not so long ago, I ran a small survey on how software engineers handle the deployment of their environments.
The survey is still online, and you can see the results by following this link: Configuration Management Survey Results
Let me summarize what the participants answered:
- Software engineers and ops have full responsibility to trigger production deployment by themselves
- Most of the time, 2 to 5 team members can do so
- Deployments are automated, at least partially
- Each team tends to have 2 to 3 environments per application
- Environment variables, JSON files and YAML files are the favorites configuration formats
- There is no consensus on how to store these configurations
- Most answerers don't use configuration or secret managers but would like to
I also gave them a chance to say what they find frustrating about configuration management:
There were not enough participants to extrapolate. However, I understand every one of the participants because we were in a similar situation: too early to have an utomated and full-featured configuration management, but too far to keep managing configurations by hand.
This is the reason why we decided to build a new solution that fulfilled our needs.
A small tool that could store, version, retrieve, and format our application configurations in order to keep sync between coworkers and environments.
What's New In The Stable Release
Quick Configuration Accessors
This release introduces a new command (comfy set
) and improves the comfy get
command in order to let you read or update a subset of a configuration:
$ comfy set production version "1.0.0"
$ comfy get production version
1.0.0
$ comfy set production flags.stable true
$ comfy get production flags --json
{
"stable": true
}
You no longer need to fetch the configuration file, open it with your IDE, update that one flag and update the full version of the file. All of that is managed by comfy set
. It's particularly useful to quickly change feature flags or bump the project version.
Keep Track Of Your Configuration History
The previous version already had a comfy log
command, showing the latest changes in the configuration. The stable release fixes a few things about it. Also, it is now possible to retrieve a specific version of your configuration.
Combined with tags, these commands will let you deploy a fixed version to your environment and rollback at the speed of light!
$ comfy log production
2019-5-24 10:50:30 production da70d7d69bb7f158748cf3ea76c08b9c4a12c3c0 latest
2019-5-24 10:50:19 production ae30ab2567e7316cf5521d26b8c7a03ece0522d3 no tag
2019-5-24 10:50:10 production 964e51df37c0fe2a518998fb6457b461c4013d28 no tag
$ comfy get production version --hash 964e51df37c0fe2a518998fb6457b461c4013d28
0.1.4
$ comfy get productiion version --hash ae30ab2567e7316cf5521d26b8c7a03ece0522d3
1.0.0
You may also note that the tag latest
replaces the stable
and next
tags when your create a new environment. You are still able to create them manually by running comfy tag add production stable <hash>
.
Host Your Own Configuration Store And Server
Marmelab hosts the default comfygure server at https://comfy.marmelab.com
, for free. But some people don't want to let a third-party company store their configuration, even though it's a zero knowledge platform (the configuration is encrypted client-side), and this is perfectly fine.
This is the reason why we focused on making it easy to host your own comfygure service for that release.
To this end, we published extensive documentation explaining how you can deploy comfygure on ZEIT's now, for example, as well as a Docker image available on Docker Hub: marmelab/comfygure.
We use serverless to deploy our own comfygure origin server. That means you can also deploy your own comfy server on Amazon Web Services, Microsoft Azure, Google Cloud Platform, and many others!
Feel free to deploy your own comfygure server and play with it. The more comfy servers there are out there, the less this service is centralized. Our goal isn't to become the default host, just to make developers life a bit easier.
What's next?
The goal of this release was to implement the major breaking changes, and to publish a stable version. The goal of the 1.1 will be to make this tool easier to use.
Installing comfy locally is easy, since all the configuration is stored in a single file. On a server or on a CI, it might be a bit cumbersome, since it requires no less than six environments variables. How ironic for a tool that wants to make configuration easier to deal with! So the first milestone of the next release is to make server installation fast and easy, and update the related documentation, with some real examples.
Similarly, there is a small permission management system on comfy with read-only and admin tokens. This is not explicit enough and these tokens need to be editable. This will also be an objective of the next release.
Also, I find pretty hard to navigate the configuration history. I'd love to have a comfy diff <env> <tag|hash> <tag|hash>
command that would show what changed between two versions! So, it is in the pipes.
Finally and most importantly, I would love to hear what are you thinking of this small tool! Please give it a try and tell me what you think of it.
Here are some links where you can find more details about it: