Xavi Carrillo's talk "Puppet and Telefonica R&D" from Puppet Camp Barcelona 2013. Learn about upcoming Puppet Camps at http://puppetlabs.com/community/puppet-camp/
3. 01
Introduction
Who am I?
§ Puppet user for the last 2 years
§ Working at Telefonica I+D for 4 months
§ Telefonica Digital curently involved in a process
of modernization
§ Helping on that by puppetizingTelefónica I+D
3
7. 02
Environment
x7
Development
Staging
Production
7
8. 02
The problem domain
§ Machine Setups: manually (howtos,etc)
§ Environments: docs, wikis.
§ Releases: Hand over an RPM…
§ At least one SysAdmin per initiative
8
9. 02
The needs
• Infrastructure for many sysadmins, initiatives and environments.
• Each initiatives’ setups are isolated.
• Some manifests are common.
• User-friendly repo management.
• Updates must be automatic, with some degree of control.
9
13. 03
Git Frontends
Git + Gitolite or Gitosis + Gitweb
§ Takes time (install, make it work, learn)
§ Not the most user friendly combo.
§ Ugly
13
14. 03
Gitlab
§ Open Source
§ Free
§ Easy to install
§ Easy to administrate
§ LDAP integration
§ Owner of repo can manage
team members
§ Looks great!
14
19. 04
Hooks
Commit goes through
YES?
pre-receive post-receive
Update the
push
initiative’s
origin manifests
develop
sysadmins
19
20. 04
The Big Picture
CDN
cdn_dev
m2m_sta
DEVELOPMENT
M2M
sysadmins
STAGING
M2M
CDN
20
21. 04
Yeah!
• Different sysadmins can configure their
systems in several environments in a
centralized way
• All machines in a controlled state
• Inventory
• Changes are tracked (commits)
• No more how-tos: a git repository is all you
need
• Deploying new environments is much
easier
• Reduce duplication of work (Apache,
MySQL, etc)
21
22. 04
Work in progress
Production is not puppetized yet
22
24. 05
Evangelization
• puppetusers@tid.es
• Separate data from code (Hiera)
• Always have the future in mind
(parametrized classes, OS changes, multiple networks, etc.)
24
25. 05
Vagrant
Vagrant::Config.run do |config|
config.vm.box = “RH5.8_2”
config.vm.box_url = http://xxx/rh58_base.box
config.vm.host_name = “m2mvagrant2”
config.vm.provision :puppet_server do |puppet|
puppet.puppet_server = "puppet.aislada“
puppet.options = ["--environment","m2m_dev"]
end
end
25
26. 05
Mcollective
$ mco puppet runall 10
2013-03-13 14:26:50: Running all nodes with a concurrency of 10
2013-03-13 14:26:50: Discovering enabled Puppet nodes to manage
$ mco package status kernel
Summary of Ensure:
2.6.32-220.el6 = 147
2.6.32-279.19.1.el6 = 19
2.6.32-220.7.1.el6 = 3
26
27. 05
Mcollective – Detect performance issues
$ mco puppet summary
Total resources: ▇▁▁▁▁▁▁▁▁▁
▁▁▁▁▁▁▁▁▁▂min: 66.0 max: 4.7k
Out Of Sync resources: ▇▁▁▁▁▁▁▁▁▁
▁▁▂▁▁▁▁▁▁▁min: 0.0 max: 7.0
Failed resources: ▇▁▁▁▁▁▁▁▁▁
▁▁▁▁▁▁▁▁▁▁min: 0.0 max: 1.0
Changed resources: ▇▁▂▁▁▁▁▁▁▁
▁▁▁▁▁▁▁▁▁▁min: 0.0 max: 6.0
Config Retrieval time (seconds): ▇▁▁▁▁▁▁▁▁▁
▁▁▁▁▁▁▁▁▁▁min: 0.7 max: 1.2
Total run-time (seconds): ▇▁▁▂▁▁▁▁▁▁
▁▁▁▁▁▁▁▁▁▁min: 1.2 max: 10.9
Time since last run (seconds): ▄▃▂▅ ▃▇▂ ▂▂
▂▃▄▄▆▃▁▄▂▁▅min: 31.0 max: 1.8k
$ mco find -S "resource().total_time > 10"
node-demo-fe-01
27