This is the blog formerly found at ffrank.github.io. Logo credit: nature by Flatart from Noun Project (CC BY 3.0)

Building Http Support

Overview One of the most requested capabilities for Puppet has been to support code such as the following: file { '/opt/jdk.tar.gz': source => 'http://filerepo.local/java/jdk.tar.gz', } Retrieving files (especially larger archives) via HTTP is a very convenient practice. People have been doing it through custom exec resources and defined types all over the place, for years. There are several sophisticated modules that bring this capability along. Still, all these approaches lack some of the convenience that Puppet’s file type brings to the table. [Read More]

Openstack Dach Day Recap

Some history OpenStack is the sort of open source behemoth that is constantly buzzing these days. Apparently, there are two major international conferences taking place each year, as well as frequent smaller events around the globe. This year’s OpenStack October summit will be in Tokyo, and next year will have one in Austin, TX. Berlin has had an annual conference for quite a while, but this year shook things up. Historically, the OpenStack Day used to be organized in conjunction with Linux Tag, the largest Linux tech conference in Germany. [Read More]

Friends Don't Let Friends Use Refreshonly

Update 2017-09-03: A code example included an invalid resource reference. Many thanks to Jo Rhett for pointing it out. Manifest imperfection The goal of any Puppet manifest is to describe a desired state. Puppet’s abstraction model breaks this down into an arbitrary set of discrete resources. Each resource describes a specific piece of system state. file { '/etc/shadow': owner => 'root', mode => '0600', } This approach is oft proven to yield very maintainable and readable code. [Read More]

Master Load Balancing

Background At his amazing presentation of the new features in Puppet 4 at Puppet Camp Berlin 2015, Martin explained how masters can be configured to perform only a subset of the available master services. This way you can have, say, a single CA server, some file servers and a swarm of manifest compilers. Someone in the audience asked how to use this, since typically you address the master through just the one domain name (e. [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]

Turning Puppet's HTTP Support Up A Notch

Making HTTP requests from within Puppet Puppet without HTTP support is unthinkable. Most if not all communications between the different parts of a Puppet setup use REST APIs. Puppet modules from the Forge are retrieved through HTTPS exclusively. There are convenient methods available in the existing code base, which can be used by new features that need to perform HTTP requests. There are some details and limitations to keep in mind, though. [Read More]

The Belgium Conferences 2015 Edition

Getting to the conference It was that magic time of the year again - Belgium lured professionals and enthusiasts to great conferences. FOSDEM is one of the world’s largest gathering of open source software contributors and vendors. For me, the place to be afterwards is Config Management Camp, a gathering of users and developers of configuration management software such as Puppet, Ansible or Chef. (Fun fact: attendees expressed broader interest in Ansible than Chef this year, apparently. [Read More]

Who Moved My Cheese

Finding out why Travis fails your latest PR - 2 minutes. Reproducing locally and figuring out how to fix the issue - 3 hours. Squashing and rebasing to master, then finding out that the issue reappeared due to the rebase - priceless. What is it now? The work on PUP-3341 had basically been finished weeks earlier. The mailing list had consented (or something like that) and implementation had gone rather swimmingly. [Read More]

Adding Http Sources

Many users (myself included) would like to specify source => http://... for file resources in Puppet manifests. It turns out that the existing infrastructure in the Puppet core makes this quite easy to implement. File serving in Puppet Among the most basic functions of any configuration management system is the central maintenance and programmatic distribution of various configuration files. Data files such as binary applications or tarballs are frequently managed as well. [Read More]

Purging Unnamed Sshkeys

Puppet got in trouble when users manually created resources that had no description. Unnamed resources are difficult for Puppet to handle. To allow successful purging, it is necessary to generate internal names for such resources. Background In this post, I want to describe a problem that cropped up in a feature that I had implemented for one of the late 3.x releases. At the time, it was the most requested item, with dozens of votes on Redmine (of course it was old), and later on Jira. [Read More]
puppet  bugs  ssh  keys  purging