Beruflich Dokumente
Kultur Dokumente
PuppetDB, Exported Resources, 3rd party open source modules, git submodules, inventory service
June 5th, 2012 Puppet Camp Southeast Asia Kuala Lumpur, Malaysia Walter Heck, OlinData
Overview
Introduction OlinData Checkup Set up puppet & puppetdb Set up a 2nd node Add an open source puppet module Implement it and show exported resources usage
Introduction OlinData
OlinData
MySQL Consulting Tribily Server Monitoring as a Service (http://tribily.com) Puppet training and consulting
Founded in 2008
Setup to be run remotely and location independent
Checkup
Who is using puppet? Who's going to? Haven't decided yet? Who is using puppet in production? Stored configs? Open source modules? Exported resources? Inventory service?
Prerequisites Good mood for tinkering VirtualBox Debian 6.0.4 64bit VM Internet connection (preferrably > 28k8)
/etc/puppet/puppet.conf
[master] storeconfigs = true storeconfigs_backend = puppetdb
/etc/puppet/routes.yaml
master: facts: terminus: puppetdb cache: yaml
Restart
Restart apache/passenger & puppetdb
# /etc/init.d/puppetdb restart && apache2ctl restart
Test run!
Check for listening connections
#netstat -ln | grep 808 tcp6 0 0 127.0.1.1:8080 tcp6 0 0 127.0.1.1:8081 :::* :::* LISTEN LISTEN
Run puppet
# puppet agent -t No LSB modules are available. info: Caching catalog for debianpuppetcamp.example.com info: Applying configuration version '1338804503' notice: Finished catalog run in 0.09 seconds
Adding a node
Install puppet
# aptitude install puppet
Point to puppetmaster
# vim /etc/hosts <ip_of_puppetmaster> puppet
Check result
# cat /tmp/puppet.txt This is Host debian-node
Say YEAH!
Checking results
Iptables on puppetmaster
# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- 192.168.0.111 anywhere multiport dports 8140 /* 200 allow conns to the puppetmaster from debian-node.example.com */ ACCEPT tcp -- 192.168.0.109 anywhere multiport dports 8140 /* 200 allow conns to the puppetmaster from debian-puppetcamp.example.com */ [..]
Inventory service
Query for all nodes having debian squeeze
root@debian-puppetcamp:/etc/puppet# curl -k -H "Accept: yaml" https://puppet:8140/production/facts_search/search? facts.lsbdistcodename=squeeze\&facts.operatingsystem=Debian --- debian-puppetcamp.example.com - debian-node.example.com
Questions?
Cheaper then in the West (50% or more discount!) Expanding to 5 countries in 5 months
Consulting
Remote consulting worldwide Ongoing hands-on engineering Start from scratch or improve existing environment
Walter Heck (walterheck@olindata.com) @walterheck / @olindata #PuppetCampSEA http://www.olindata.com Like us on Facebook: http://fb.me/olindata