Categories
CICD Puppet Snippets

GitLab spot runners & Puppet

We are on AWS with GitLab. For ease of use, and because our build hosts degenerate for some reason (network issues), we decided to use spot instances with GitLab. The journey was all but easy. Here’s why. GitLab Runner configuration complaints First: The process To configure GitLab runner, you have to … install GitLab, write […]

Categories
Puppet

Quick puppet debugging snipper for Atom

Not sure how I could have lived without this until now (had it before in Sublime, never bothered porting, stooooopid as I realize now 😉 ): ‘.source.puppet’: ‘Puppet: fail inline template’: ‘prefix’: ‘fit’ ‘body’: “”” $fail_me = inline_template(‘<%= require “yaml”; YAML.dump(@$1) %>’) fail(“\\\\n\\\\nVariable \\\\$$1:\\\\n\${fail_me}\\\\n\\\\n”) “””

Categories
Puppet

Loathing RSpec and Puppet

There are words for how much I hate RSpec (especially RSpec-Puppet), but they would be too harsh to write down. So now that I don’t have to google the same shit over and over again, here’s what you have to do to get basic puppet module testing up and running (replace $MODULE with your module […]

Categories
Puppet

Puppet spec fixtures

That’s how you specify branches in puppetlabs’ spec_helper fixtures.yml: fixtures: forge_modules: stdlib: repo: “puppetlabs/stdlib” ref: “4.6.0” symlinks: mapr_helpers: “#{source_dir}” repositories: mapr: repo: “http://myurl/puppet-mapr.git” # this is a branch. stolen from: don’t remember. ref: ‘remotes/origin/ab/devel’

Categories
Puppet

Puppet Quiz: What’s wrong here?

The error is: Dependency cycle. The code is: class my::own::docker { include ::docker file { ‘/var/lib/docker’: ensure => directory, before => Class[‘docker’], } } Why? 🙂 It’s rather simple here, in the real class it really took me a while to find it.