Puppet environments

For my job I do a lot of Puppet and I thought it was about time to write some tips and tricks down. First part of this post is about my environment setup. In my test setup I use a lot of environments. They are not at all useful, but that’s not the point. It’s my lab environment so things need to break once in a while. But with multiple environments Puppetlabs says that you should switch to directory environments (PuppetDoc) but some way or another I cannot get that to work in a good way with my PE version (3. [Read More]

Puppet Facter Fact

Look at me, I made a Puppet Facter Fact!!! With a lot of thanks to Andrew Beresford who started the initial code. I just tweaked it. What it does is rather simple, it finds the expiration date of the SSL certificate of this host and returns the expiration date and time when there are less than 30 days left. Otherwise it just returns a --sign. In the Puppet manifest I check if it’s this --sign and if not I generate a warning. [Read More]

Puppet User Group

Yesterday I attended the first meet up of the Dutch Puppet User Group and I gave a talk about how to start with Puppet.

It was called: “Puppet deployment, an introduction” and the PDF slideshow can be viewed or downloaded from speakerdeck.

If you have any comment, please send me an email.


Puppet updates

When working with Puppet and a VCS (like git and SVN) it’s nice to have a simple way of updating the Puppet tree. My tree is always in /etc/puppet and owned by user and group puppet. User puppet is allowed to checkout the complete tree from git or subversion. I have created two one-liners to update the complete tree and make sure all rights are still correct. update_svn #!/bin/bash # update_svn su - puppet -c 'cd /etc/puppet; svn up; cd doc; . [Read More]

Updated Pygments

I’m using Pygments for quite some time now and I just noticed there was a new version available (1.5). I installed that and I was wondering if there would be a lexer included for Puppet. Well, it wasn’t, but a short Google action directed me to the Pygments lexer for the Puppet DSL. Of course my old CentOS 5 system with Python 2.6 doesn’t want to install this, so I hacked the Puppet lexer into Pygments. [Read More]

FreeBSD PXE boot Part 2

Some posts ago I wrote that I was busy to find out how a FreeBSD machine can be PXE-ed from a Linux server. Well, I found that some time ago, but I didn’t have the time to type it here, yet. Well, as always, once you know how it’s done, it’s quite simple. But because a lot of the FreeBSD documentation is very old (talking about FreeBSD 4, 5 and 6) it takes some time to find it all. [Read More]

Why does Puppet keep breaking?????

In my previous post I stipulated that I was PXE booting FreeBSD. Well this works and I will come back on that. But for the configuration I want to run Puppet. Nice and easy config management. On my server I run Puppet from source. This because the server is a CentOS box with a very old Ruby and Puppet. So I decided to run the Puppet client from source as well. [Read More]

umask per directory

Some users insist on using bash. This is a good shell, but not as good as zsh. But, I do want them to be able to use the per directory umask as well as all the zsh users. So I started digging, as the bash shell does not support a chpwd hook. This is what I came up with: chpwd() { # Set the initial umask case "${PWD}/" in /etc/puppet/*) um=$(umask) umask 007 ;; *) [[ x"${um}" ! [Read More]

umask per directory

I’ve been working with Puppet some time now, and we are configuring our way through a lot of hosts, with 6 persons, all working in the same Puppet master directory. This should work fine with all UNIX/Linux groups and setgid directories. But simple problem arose with the git version control stuff. Once in a while the complete git repo was destroyed and quite a lot of searching revealed the reason why. [Read More]