Logical thoughts exposed

A journey through my life as a infrastructure developer

Apr 24, 2017 - 2 minute read - Comments - devops puppet testing debugger benchmark

Benchmarking Your Puppet Code

Did you know the puppet debugger can measure how fast your puppet code runs? Starting with release 0.6.1 of the puppet-debugger you can now perform simple benchmarks against your puppet code. So if you ever wondered how fast your puppet code is or that custom puppet function you wrote now there is a way to benchmark those things. All you need to do is enable benchmark mode, and then use the debugger as you normally do.

Mar 25, 2017 - 4 minute read - Comments - devops puppet testing debugger

Testing DataTypes with the Puppet Debugger

The puppet language comes with a lot of extremely useful syntax and concepts. However, sometimes it is difficult to understand how these work or how to use them. Datatypes are found in almost every programming language so it is no surprise that puppet 4 has a similar feature for validating parameter data. If you have never used a puppet datatype before have a look here first. The other day I was showing my client the awesome power of puppet datatypes and I was using the puppet-debugger to illustrate how datatypes work.

Jan 16, 2016 - 8 minute read - Comments - devops puppet testing hiera validation

Testing Hiera Data

As a puppet consultant I often run into the same problems with multiple clients. Many times I can reuse a magical script and my value instantly becomes obvious. I like to think I have things figured out, but sometimes there are just problems we as a community have not solved yet. The problem I am talking about is hiera validation. Most of us are too busy learning puppet, ruby, markdown, and git that testing is not a priority until your puppet code blows up in your face.

Jan 15, 2016 - 5 minute read - Comments - puppet testing validation

How to build a module schema

As a long time puppet module developer and puppet consultant I have noticed some trends over the years. Puppet modules are becoming increasingly sophisticated and complex. When consuming forge modules I often spend time figuring out how it works and what the developer requires for parameters. Especially when it comes to inserting data into hiera. Schemas help validate the user is doing what the developer intended. Creating a schema might not seem necessary but anybody using your module will greatly appreciate it.

May 28, 2015 - 10 minute read - Comments - devops puppet testing

Leveraging Docker for Puppet Development

Last week I decided to format my macbook pro after several years of gem and vagrant clutter. My computer was suffering from lag, wasted space, spinning beach balls, and weird crashes. So after I backed up and formatted, I decided I was going to do things differently from now on because starting from scratch is such a pain. Since I had some free time on hand I thought I could take a chance to explore docker as a development environment.

Apr 14, 2015 - 12 minute read - Comments - puppet chef rspec unit testing testing

Testing Your Infallibleness - Part 1

Audience: System Admin, Self taught coder, Computer Scientist Summary: How to leverage puppet-retrospec to generate your puppet unit test suite Time Involved: 10 minutes How many of you remember when the spell checker first came out? It had such a huge impact in everyones life because instantly everyone who used the spell checker appeared as if they had won the international spelling bee. How long did it take you to switch from looking up every single word in a paper dictionary to simply right clicking on a word?