Releasing Comfygure 1.0
Tags: devops, webdev, opensource, showdev
Published: 2019-05-28 16:20:36

---
title: "Releasing Comfygure 1.0"
published: true
description: "Two years after the initial release, we're finally publishing a stable version of comfygure! Read on to see what's new in our open-source configuration storage."
cover_image: https://i.imgur.com/jp5soSLg.png
canonical_url: https://marmelab.com/blog/2019/05/28/releasing-comfygure-1-0.html
tags: 
- devops
- webdev
- opensource
- showdev
---

[Two years ago](https://marmelab.com/blog/2017/11/07/introducing-comfygure.html), 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.

> The blog 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](https://kvinmaschtaler.typeform.com/to/KMXdh2), and you can see the results by following this link: [Configuration Management Survey Results](https://kvinmaschtaler.typeform.com/report/KMXdh2/A4g9saoaIc2vFfbl)

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:

![List of survey feedbacks about frustrating configuration management experiences](https://i.imgur.com/C3ko1pT.jpg)


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](https://marmelab.com/blog/2017/11/07/introducing-comfygure.html) 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.**

![Comfygure example demo, with multiple commands](https://i.imgur.com/jp5soSLg.png)

## 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:

```bash
$ 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!

```bash
$ 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](https://marmelab.com/comfygure/HostYourOwn.html) explaining how you can deploy comfygure on [ZEIT's now](https://zeit.co/now), for example, as well as a Docker image available on Docker Hub: [marmelab/comfygure](https://hub.docker.com/r/marmelab/comfygure).

We use [serverless](https://serverless.com/) 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](https://serverless.com/framework/docs/providers/)!

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.

![marmelab/comfygure image on Docker Hub](https://i.imgur.com/ZsnLnuL.jpg)

## 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:
- [GitHub Repository](https://github.com/marmelab/comfygure)
- [comfygure package on NPM](https://www.npmjs.com/comfygure)
- [Documentation](https://marmelab.com/comfygure/)
- [Docker Image](https://hub.docker.com/r/marmelab/comfygure)
- [The previous blog post about comfy](https://marmelab.com/blog/2017/11/07/introducing-comfygure.html)
- [My Twitter account @Kmaschta](https://twitter.com/Kmaschta)