Puppet – Identifying dead puppet code using puppet ghostbuster

This is a how-to guide on using: First get this working so that you can access this gui dashboard: Install rvm: $ gpg –keyserver hkp:// –recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB $ \curl -sSL | 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 performance tuning

The latest version of PE 2016.4 has the capability to monitor the heap memory as a feature of puppet server 2.6. this guide: Thundering herd test: After you’ve added hundreds of nodes to your deployment you may notice that your agents are running slow or […]

Read More

Puppet – Using AWS web console as Puppet’s external node classifier (ENC)

This is a script I wrote that queries the ec2 tags of an aws console, in order to figure out what environment a node belongs to, and what class to assign to it. #!/bin/bash # # export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxxxxx export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxx export AWS_DEFAULT_REGION=xxxxxxx instanceid=`echo $1 | awk -F”_” ‘{print […]

Read More

Puppet – querying puppetdb with postgres command line (psql)

Exported Resources querying puppetdb with postgres command line, psql psql -h localhost -U puppetdb puppetdb However to connect to puppet enterprise’s puppetdb, then follow: \q \h \l \d select * FROM catalog_resources \X \x SELECT * FROM catalog_resourcesSELECT * FROM factsselect * from factsssselect * from reports […]

Read More