ConfigLMM

ConfigLMM - Large Configuration Management Manager

Yo Dawg I Heard you like config so I put a config in your Config

Manage The Management with ease!

You define how you want your applications/systems/containers/services/servers to work without being vendor locked into any particular implementation or provider.

ConfigLMM will materialize this into whichever implementation you feel like using that day :)

One Config to Rule Them All:

The true GitOps/DevOps/DevSecOps/TestOps/SysOps/AIOpsDataOps which I call AllTheOps :)

One Config to Rule Them All

Benefits

Are you wondering if so many features won’t make this unbearably complicated and unmaintainable?

I don’t think so and this project will try to show that :) In fact I think most of existing tools are overly complex. Think about Helm Charts/CloudFormation/Kubernetes/Puppet and such.

While most tools use declarative configuration I think they still got it wrong because they are too low level by asking you to define HOW to accomplish target state while I think configuration should just describe what you WANT the target state to be :)

So with ConfigLMM you only define what you WANT but don’t describe HOW to accomplish that.

Some examples with idea of defining “WHAT I WANT”:

I call this intention based configuration which is used by ConfigLMM and it also follows convention over configuration paradigm.

PS. Looks like I’m not only one thinking this way, see RFC 9315 - Intent-Based Networking. So essentially you can think of ConfigLMM as loose implementation of that RFC but even more because not only Networking part.

Still not sold?

Then consider this scenario:

So currently how would you make life easier/better for your family and friends(s)?

Let’s have a meeting and find out what they actually want to do with their devices.

Okay so now that we have an idea what we need we can start making it happen. But do you know all the things that are needed to accomplish these goals? Your friend???

For brother:

For mom:

For dad:

For friend:

Uhm… Yeah unless you’ve spent years working with IoT it’s unlikely that you can help him there much.

I don’t know about you but for me this all looks like A LOT of work.

So let’s just move to the future and use ConfigLMM to solve all these problems :)

By using ConfigLMM you can create a configuration (even work together on it with family) that will satisfy everyone’s needs and then make it all happen like MAGIC (just what they think it is)

So let’s take a look at it:

BrotherComputer:
    Type: Windows
    Managed: yes
    Apps:
        - Steam
        - Fortnite
        - Roblox
        - Minecraft
        - Firefox

MomPhone:
    Type: Android
    Settings:
        HomeScreen: With App drawer
    Apps:
        - Duolingo
    Remove:
        - CandyCrush

DadBlog:
    # In separate context file, there is specified "Dislikes: Big Tech"
    Type: Blog
    Feature: User Management

Friend:
        # Omitted for brevity but yes ConfigLMM would be able to configure even that

Q: Wait what, is this all, the WHOLE config? Yep, exactly like it should be, no more, no less :)

Q: Then WHY have I been writing gazillion of bash scripts and thousands of Puppet/Kubernetes/CDK code lines? For years I have been wondering the same

Q: But what about friend how will I know how to write such config? You don’t need to know how but just tell him to use ConfigLMM and his company’s development team will spend some time creating it.

Q: How is this even possible? MAGIC! See Implementation section for more details but generally you don’t even need to care how

Back to The Reality

Well unfortunately what I just described is not really implemented yet.

This is a massive project and no matter how much I want to build it - it’s not realistic that I can implement it all on my own.

And this is why I’m proposing this to be a community driven project where all of us help each other by implementing some parts of it.

When thinking about all of us together then it will save a lot of time for many of us. Especially as new Apps we want to host and configure just keeps growing.

Also maybe things you want to configure are already implemented so take a look at Examples/Implemented.mm.yaml and see what we already have! :)

So I ask you to try it out (you can run confilmm types to see what is implemented), submit your issues and Pull Requests. I definitely need your and everyone’s help to achieve this project’s goal.

Installation

First you need to have Ruby and RubyGems. Then you can install it with:

$ gem install ConfigLMM

If that doesn’t work (eg. your Ruby is too old) then install with (it will install RVM)

$ curl -sS https://raw.githubusercontent.com/ConfigLMM/ConfigLMM/master/bootstrap.sh | sh

Usage

Create yaml file with desired config, eg.

Wiki:
    Type: Gollum
    Domain: wiki.example.to
    CertName: Gollum
    Resources:
        NS:
            Type: TonicDNS
            Domain: example.to
            Nameservers:
                ns.example.to: 192.168.5.5
        DNS:
            Type: PowerDNS
            DNS:
                example.to:
                    wiki: CNAME=@ # `@` means point it to the domain root
                    '@': A=@me # first `@` means domain root and `@me` means current external IP

Then deploy it and let the magic happen!

$ configlmm help
Commands:
  configlmm backup [CONFIGS_LIMIT...]  # Backup deployed things
  configlmm build [CONFIGS...]         # Build configuration in deployable form
  configlmm cleanup [CONFIGS...]       # In deployed infrastructure cleanup/delete unused things (eg. deployment leftover junk) (note this can be risky due to mistakes)
  configlmm deploy [CONFIGS...]        # Deploy configuration
  configlmm diff [CONFIGS...]          # Show changes that will be applied with next deploy
  configlmm help [COMMAND]             # Describe available commands or one specific command
  configlmm list [CONFIGS...]          # List things
  configlmm refresh [CONFIGS...]       # Update local state to match deployed things
  configlmm test [CONFIGS...]          # Test whether deployed things work as expected
  configlmm types                      # List available types/plugins
  configlmm update [CONFIGS_LIMIT...]  # Update deployed things
  configlmm validate [CONFIGS...]      # Check whether the configuration is valid
  configlmm version                    # Show program's version

Options:
      [--level=LEVEL]                    # Logging level to use
                                         # Default: info
                                         # Possible values: debug, info, warn, error
  -n, [--dry], [--no-dry], [--skip-dry]  # Only show actions without performing

Configs options:
  [--locations=LOCATIONS]  # Filter by config file locations
  [--things=THINGS]        # Filter on which things to work on

$ configlmm deploy config.mm.yaml
Deploying...
Deploying NS: TonicDNS
Tonic - Successful DNS Change
Deploying DNS: PowerDNS
Deploying Wiki: Gollum
Deploy successful!

FAQ

Q: Why name it “Large”? Why “L” is after Config in ConfigLMM?

To be a pun of LLM and like with a language model you don’t need to write down every single detail. Also ConfigLMM is definitely smarter than LLMs :)

Another thing is that it really is quite Large/big project to accomplish this goal with so many features.

Q: I already have infrastructure deployer/orchestrator that I love and don’t want to change so this is useless for me?

Not necessarily, for example you can use configlmm build feature to create configs and then use your own orchestrator to do actual provisioning/deployment (and even do additional customization on built configs).

Q: Aren’t this many features a bit too much?

No :)

Q: Is this actually doable?

Yes :)

Q: Are you crazy/insane?

Yes :) But maybe everyone/whole world is by learning hundreds of different tools with different versions each with dozens of incompatible/conflicting options/flags and some with couple of configuration files aswell.

I think the complexity of that is insane and the amount of different tools only keeps growing.

Can you count how many different tools/programs have you used today/this week/month? What about in a year or in your whole life together?

Implementation

To accomplish this functionality ConfigLMM consists of 3 main parts:

  1. High level configuration file format (superset/abstraction) that describes your infrastructure intentions
  2. Core Framework that holds ConfigLMM together
  3. Plugins for different apps/services/systems which implement build/deploy logic using provided configuration

Note that this project is in very early development stage and so there won’t really be API/spec stability for some while. You might need to update your configuration as new versions are released and design iterated and improved with time. Unfortunately that’s the sad reality we live in and things can’t always be perfect from the start :)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ConfigLMM/ConfigLMM. Pretty Please! :)

Implement a new Plugin

To implement a new Plugin, simply create a file with name $pluginName.lmm.rb and put it in respective category in Plugins folder.

Then in that file create a method with name action#{pluginName}Deploy and implement logic there. It will be loaded automatically so you don’t need any other changes.

I highly recommend looking at existing plugins. Also you can copy and rename porkbun.lmm.rb to use as a base.

Model Configuration for App/Service/System

Try to model your existing infrastructure with high level YAML and submit those under Examples folder.

This will allow us to come up with best design for configuration file format even before we start implementing such configuration.

And you never know, maybe someone will love it so much he’ll implement necessary Plugins so then others and you will be able to use configlmm to deploy such infrastructure.