Close

Puppetlabs

Puppet – Identifying dead puppet code using puppet ghostbuster

This is a how-to guide on using: https://github.com/camptocamp/puppet-ghostbuster First get this working so that you can access this gui dashboard: https://puppet.com/docs/puppetdb/5.1/maintain_and_tune.html#monitor-the-performance-dashboard Install rvm: $ gpg –keyserver hkp://keys.gnupg.net –recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ \curl -sSL https://get.rvm.io | bash -s stable –ruby Check rvm install is successful: schowdhury@Shers-MacBook-Pro:~$ rvm –version rvm 1.29.3 (latest) […]

Read More

Puppet – External Facts

External facts is a great way to attach (arbitrary) metadata to a machine during the the launch of a new machine. E.g. when building a Centos 7 aws ec2 instance, you can generate the external facts via userdata. Puppet can use these external facts in the way as any other […]

Read More

Puppet – querying puppetdb with postgres command line (psql)

Exported Resources https://docs.puppet.com/puppet/latest/reference/lang_collectors.html https://docs.puppet.com/pe/latest/node_deactivation.html querying puppetdb with postgres command line, psql psql -h localhost -U puppetdb puppetdb However to connect to puppet enterprise’s puppetdb, then follow: https://gist.github.com/tnolet/7133083 \q \h \l \d select * FROM catalog_resources \X \x SELECT * FROM catalog_resourcesSELECT * FROM factsselect * from factsssselect * from reports […]

Read More

Puppet – r10k and the Puppetfile

The “Puppetfile” is list of all puppet modules you want downloaded into your puppet master’s modules folder: The first line of this file should be: forge “http://forge.puppetlabs.com” After that any puppet forge modules are listed as: mod ‘puppetlabs/stdlib’, ‘4.5.1’ Next any puppet modules hosted on git (e.g. github or any […]

Read More

Puppet – Ordering your classes

this is common, for example, sometimes once class installs dbg software, and then the next class creates the db istself. class mainclass { include class1 include class2 include class3 include class4 Class[‘class1’] -> Class[‘class2’] -> Class[‘class3’] -> Class[‘class4’] }

Read More