Ruby gem version dependency hell (gettext 3.3.0)

$ /bin/bundle install –gemfile=ci/Gemfile Gem::InstallError: gettext requires Ruby version >= 2.5.0. An error occurred while installing gettext (3.3.0), and Bundler cannot continue. Make sure that `gem install gettext -v ‘3.3.0’` succeeds before bundling. TL;DR, this works – there’s another option which might work, see below, but I can’t be bothered to try. This is two […]

fun with ruby in containers

This is related to the various posts tagged gitlab-runner. I got puppet linting, syntax checking etc. is working via the GitLab runner shell executor, and the next step was to move it into containers. There be dragons, and they didn’t google very well, so here goes. I’m using a Red Hat UBI Ruby 2.5 container […]

gitlab ci for puppet control-repo – a test suite

There’s lots of content already out there about puppet CI testing; this is what I initially came up with using GitLab CI, and with various other improvements such blogged about previously in posts tagged gitlab-runner such as: Separate rake files. A lot of examples I found had very long complicated rake files to define different […]

gitlab runners and ci – getting started

intro Before trying to use GitLab runner (shell) in anger, I wanted to peek under the hood – it’ll make things easier later. I’ll stash more information here if it looks useful. Docs: built in docs at gitlab.example.com/help/ci/quick_start/README https://docs.gitlab.com/ee/ci/ One of a number of posts on GitLab CI, see the gitlab-runner tag. .gitlab-ci.yml This is […]

building or appending to an array using a lambda in Puppet

Tripped over a challenge shifting KVM guest definitions into hiera. I’m using the cirrax/libvirt module which offers up this way to define a guest.  (I’ve modified the example in the module documentation.) libvirt::domain { ‘my-domain’: max_memory => ‘2000’, cpus => 2, boot => ‘hd’, disks => [{‘type’ => ‘file’, ‘device’ => ‘disk’, ‘source’ => {‘dev’ […]

puppetising kvm on centos7

Yak shaving I found out about a bunch of stuff today, including the now 19-year-old term yak shaving. Clearer examples out there such as here, here and here. I was trying to roll creation of KVM virtual machines into Puppet (that is, bring my existing use of KVM at home under management) and in unpicking […]

puppet apply #8 – puppet apply and hiera

Adding classes At present, puppet apply should look something like this: $ sudo scripts/puppetapply.sh + /opt/puppetlabs/bin/puppet apply –test –environment=local /etc/puppetlabs/code/environments/local/manifests Info: Loading facts Notice: Compiled catalog for clientname in environment local in 0.16 seconds Info: Applying configuration version ‘xxx’ Notice: Applied catalog in 0.09 seconds Let’s add back in the clientscope class. This will populate […]

puppet apply #7 – classification via hiera

Hiera introduction Hiera is used to store data. Roles and profiles are about code reusability, and separating data and code is probably the other main pillar of Puppet best practise. Hiera layers the data, allowing you to selectively mask values with others based on properties of the puppet client.  The trick is to pick useful […]