How to monitor your host metrics with Prometheus, using consul to automatically pick up freshly spawned hosts.
Tag: puppet
… so far. It might be crappy, but I’ll share it, cause it’s working. (Well, today it started doing this 😉 ). But enough preamble, let’s jump in. The Situation I am in a new project. Those people have nothing but a deadline, and when I say nothing I mean it. Not even code. They […]
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’
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.
Okay. Maybe this is the completely wrong way to do this, but I found no other. Comments appreciated. Situation: A DNS server cluster, meaning pacemaker managing an IP failover if one of them fails. The cluster IP (the one switching over) should be the IP used for DNS lookups. Idea: Hosts should automatically find ‘their’ […]
Augeas und Reihenfolge
Problem: mit HIlfe von Augeas einen Eintrag zur /etc/hosts Datei hinzufügen. Erste Lösung: augeas { “${title}” : context => ‘/files/etc/hosts’, changes => [ “rm *[canonical = ‘${host}’]”, “set 02/canonical ${host}”, “set 02/ipaddr ${ip}”, ] } Funktioniert nicht. Warum? Trotz Aufruf von “save” am Ende einer jeden Sitzung im augtool ist die Reihenfolge der Anweisungen durchaus […]
Nervige Puppet Fehler
Was geht hier nicht? class { ‘whatever’ : do => ‘something’, before => Class[ ‘something_else’ ], } -> class { ‘yeah_yeah’ : do => ‘even_more’, } Na? Niemand? Gut. Lösung: “before =>” und “->” mischen sich nicht. Das wäre nicht so schlimm, wäre die Fehlermeldung nicht absolut … unzureichend: err: Could not retrieve catalog from […]
Puppet & Augeas & Pulp
Ach Augeas ist schon genial. Wenn nur nicht … (jaja, immer was zu meckern). Anlass diesmal: /etc/pulp/admin/admin.conf. Das ist eine in Augeas nicht vorgesehene Datei, und die Augeas-Doku ist … nun ja. Analyse: Die Datei besteht aus Sektionen (“[blablubb]”), und Einträgen (“hallo = welt”). Da sollte sich doch was finden lassen. Tut es auch: Die […]
Puppet, Arrays & Iteratoren
Endlich, endlich, endlich kommt in Puppet 3.2 die Möglichkeit, Schleifen zu bauen. Dann könnte ich eventuell folgende Aufgabenstellung ein klein wenig einfacher realisieren (aktuell arbeite ich bis zur endgültigen Umstellung unserer Systeme mit Puppet 2.7): Fasse alle im Rechner befindlichen Blockdevices der Form “/dev/sd*” – aber außer /dev/sda – in einer LVM volume group zusammen. […]
Puppet Stages & Notify
Die notify Funktion von Puppet hat eine seltsame Eigenschaft, die ich persönlich wenig nachvollziehbar finde. Sie impliziert einen “before”-Zusammenhang zwischen der Resource, die benachrichtigt, und der benachrichtigten. Das führt zu unpraktischen Komplikationen. Der Versuch einer Herleitung: service { “tomcat” : ensure => running } file { “/etc/tomcat.conf” : notify => Service[“tomcat”] } Das funktioniert bestens, […]