We built a tool called atmos. It is both a command-line tool and Golang module for provisioning, managing, and orchestrating workflows across various toolchains including terraform and helmfile.

The atmos tool is part of the SweetOps toolchain and was built to make DevOps and Cloud automation easier across multiple tools. Utilizing “Stacks”, atmos enables you to effortlessly manage the configuration of your Terraform and Helmfile Components and run them from your local machine, in your CI/CD pipelines with Geodesic, or using platforms like Spacelift.

Problem

A modern infrastructure built on open source depends on lots of various tools like terraform, packer, helmfile, helm, kubectl, docker, etc. All these tools have varying degrees of configuration support, but most are not optimized for defining DRY configurations across dozens or hundreds of environments. Moreover, the configuration format is very different between the tools, but usually, boils down to some kind of hierarchical key-value configuration in either JSON or YAML. This lack of configuration consistency poses a problem when we want to make it easy to declaratively define the settings that end-users should care about.

Solution

We defined a “universal” configuration format that works for all the tools we use. When using terarform, helmfile, etc we design our components as re-usable building blocks that accept simple declarative parameters and offload all business logic to the tools themselves.

We designed this configuration schema in YAML and added convenient and robust deep-merging strategies that allow configurations to extend other configurations. As part of this, we support OOP concepts of mixins, inheritance, and multiple inheritances – but all applied to the configuration. We support YAML anchors to clean up complex blocks of configuration, folder structures, environment variables, and all kinds of tool-specific settings.

Call to Action

Check out the project on GitHub.

Try out some of the tutorials.