In my free time I was tinkering with a build tool that could satisfy my humble needs:
Universal, can be used to manage systems in general. Historically, I used to abuse make for sysadmin stuff, scheduling scientific calculations and analyzing the results, etc., etc. ANVL grew out of such “creative” use of build systems.
NOT declarative, as every sufficiently complex declarative configuration contains a broken and undocumented implementation of 1/2 of COBOL. Instead, Erlang is used for both configuration and to define the rules.
NOT a DSL. The goal is to stay as close to normal Erlang as possible. Currently, only one simple parse transform and one macro deviate from the bog-standard syntax.
Self-documenting, without hidden variables. If something can be tweaked, it is visible in the manual, automatically.
Expandable via plugins
Plugins are OTP applications, that ANVL itself can build
Currently the project can bootstrap itself, but some of the code is extremely messy or WIP.
P.S. Originally I didn’t plan to make any of this public, to avoid expansion of the zoo of tools used to build Erlang code (rebar3, Erlang.mk, mix …), but according to this announcement, we’ll end up there anyway, and I already have a (somewhat) working code, so why not.
Documentation: Introduction (ANVΛ)
License: LGPL
Current state: Proof of concept
Bugs: Yes
Source code:
In the meantime, I used ANVL to automate A/B performance testing of our new database engine. One invocation of the script automatically clones experiment and control versions of the code, re-builds system under test if it’s changed, as well as the benchmark code, re-runs the benchmarks (if needed) and processes the results with some badly written python scripts.
I’ve added a very basic rebar3 compatibility layer that translates somerebar.config files to anvl.erl. This is mostly to let plugins use 3rd-party dependencies, and to stress-test ANVΛ’s plugin and hook systems: rebar3 compatibility is implemented as an optional plugin that hooks into the config loader at the core of ANVΛ, creating a very complex dependency graph.
I’ve drafted a new external plugin: GitHub - k32/anvl_remote_admin . It uses OTP’s ssh application to set up remote hosts. Like everything else, it’s in pre-alpha state, but I already use it to manage some servers. And it is already less painful than having to touch Ansible, if I do say so myself…