little puppet tools to make your life better
Post on 05-Dec-2014
196 Views
Preview:
DESCRIPTION
TRANSCRIPT
Little Puppet Tools To Make Your Life Better!
Bit hyperbolic...
Some things I made that help me!Hopefully they can help you too!
MeDeveloper turned ops guy
Working at Kainos, contracting on Government Projects
Previously on the IER projectNow live!
https://www.gov.uk/register-to-vote
Now on the DEFRA CAPD project
So first up!
puppet-install-shellhttps://github.com/petems/puppet-
install-shell
· Shell (not bash!) script· Installs Puppet on (most!) Unix flavour
machines· Plan to support all platforms officially
supported by Puppet (https://docs.puppetlabs.com/guides/platforms.html)
· Currently supports EL, Fedora, Debian, Ubuntu, OSX and Arch!
A mix of various provisioner scripts I found around the
Internet
A lot oftest -f
machine=`uname -m`os=`uname -s`
if test -f "/etc/lsb-release" && grep -q DISTRIB_ID /etc/lsb-release; then platform=`grep DISTRIB_ID /etc/lsb-release | cut -d "=" -f 2 | tr '[A-Z]' '[a-z]'` platform_version=`grep DISTRIB_RELEASE /etc/lsb-release | cut -d "=" -f 2`
Quick one step to get puppet installed on a machine:
curl https://raw.github.com/petems/puppet-install-shell/master/install_puppet.sh | sudo sh
Live Demo Warning!
Its main use was for another tool:
vagrant-puppet-install
Well, making is a strong term...
Took over maintenance of!
Easy way to provision servers created with Vagrant
Works with Vagrant Cloud Providers too!
Vagrant.configure("2") do |config|
config.vm.define :ubuntu do |ubuntu| ubuntu.puppet_install.puppet_version = '3.6.1'
ubuntu.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
ubuntu.vm.provision :puppet do |puppet| puppet.manifests_path = File.expand_path('../../../support/manifests', __FILE__) puppet.manifest_file = "base.pp" end
ubuntu.vm.provision "shell", inline: "puppet --version"
end
Nice and simple...· Checks the version you've defined is valid (from
RubyGems.org...)· Rsyncs or downloads a script that installs puppet (uses puppet-install-shell script by
default!)· Standard error handling and catching
· Windows support soon!
Live Demo Warning!
And finally
Puppet-doc-lint· Tool for module maintainers
· Looks through your Puppet documentation and shows when you have undocumented
parameters· Or documentation on parameters that are now
missing
Current status: Very brittle!· New syntax breaks it!· A few false positives
· A few false negatives...
But people are using it (woo!)
Well, a few...
@electrical (Richard Pijnenburg) is my current ginea pig!
He's been using it for logstash Puppet module
It's helped him, so it's helped at least 1 person! :)
Live Demo Warning!
That's it!
Q & A
top related