Counting Resource Translation Misses

This is another post in the wake of CfgMgmtCamp 2018, where the mgmt hack room saw lively discussion that inspired some new ideas as well as reminding me of some ideas I had last year, but didn’t manage to implement or describe yet. This post is about one of those. Recap Even though we now have a slick Puppet module that allows early adopters and testers to run mgmt from Puppet manifest code, our ability to run existing, complex manifests is somewhat limited. [Read More]

Thinking About Migration From Puppet To Mgmt

Abstract We have already implemented a way to replace the Puppet Agent with the mgmt engine. It can run a graph on a machine that is derived from the machine’s Puppet catalog. The user is limited to mgmt features that can be expressed in Puppet’s DSL in this scenario. In order to unlock mgmt’s full potential, the user will have to rewrite all their Puppet code in mgmt’s language. This presents a significant challenge for maintainers of larger Puppet code bases that are actively used and evolving. [Read More]

Edging It All In

The mgmt translator for puppet catalogs was truly created from the bottom up. We started with a few resource types, and the relationships between the translated resources. This falls short for many catalogs, of course, because dependencies must often put whole classes in order, or do the same for instances of defined types. Allowing the translator module to accept such macro-dependencies was not much work, but it did require some intense digging. [Read More]

Puppet Powered Mgmt

Recently, I wrote a veritable deep-dive on mgmt’s new Puppet integration code, but didn’t include a good overview of how the new features look in practice. Here we go. The original interface If you recall, mgmt has no configuration language of its own. With its highly dynamic and distributed nature, it’s also not a good fit for the languages that established tools such as puppet and chef use. (Please note that Salt has no language either, and Ansible relies on a weird YAML hybrid). [Read More]

From Catalog To Mgmt

Have you heard of mgmt yet? It’s (currently) a prototype config management engine written by James and brings some exciting new ideas to the table, building on the proven concepts of Puppet. You should probably read up on it right now. James gave the inaugural demo at ConfigMgmtCamp 2016 in Gent, Belgium, and mentioned that he can picture a sort of “transpiler” that will create resource graphs from Puppet manifest code. [Read More]

Debugging Rspec Of Catalog Application

Running catalogs from RSpec tests is tricky. There are some examples in the existing test base that help doing it. One basic pattern goes like this: describe SomeThing let(:catalog) { Puppet::Resource::Catalog.new } context "when doing something else" do let(:resource) do Puppet::Type::MyType.new( :ensure => :present, :param => 'value', ) end it "behaves a certain way" do catalog.add_resource(resource) catalog.apply expect( check_result() ).to be_truthy end end end Of course, such tests can fail for various reasons. [Read More]