puppet & vagrant intro
DESCRIPTION
Short introduction to Puppet and Vagrant (what they are all about and basic usage) Talk given at WDCM Dresden at Feb 11, 2014TRANSCRIPT
Was ist Puppet
• IT Automatisierung
• Infrastruktur Management
• Configuration File Management
• Skalierungs-freundlich
Demo file.ppfile {'/tmp/test1': ensure => file, content => "Hi.\n", } ! file {'/tmp/test2': ensure => directory, mode => 0644, } ! file {'/tmp/test3': ensure => link, target => '/tmp/test1', } ! user {'katie': ensure => absent, } ! notify {"I'm notifying you.":} notify {"So am I!":}
# puppet apply file.ppnotice: /Stage[main]//File[/tmp/test1]/ensure: created notice: /Stage[main]//File[/tmp/test3]/ensure: created notice: /Stage[main]//File[/tmp/test2]/ensure: created notice: So am I! notice: /Stage[main]//Notify[So am I!]/message: defined 'message' as 'So am I!' notice: I'm notifying you. notice: /Stage[main]//Notify[I'm notifying you.]/message: defined 'message' as 'I'm notifying you.' notice: Finished catalog run in 0.05 seconds
Was ist Vagrant• einfache Entwicklungsumgebungen
• Provisionierbar über Puppet
• Virtualisierung mit
• Virtualbox
• VMWare (kostenpflichtig)
Basis-Umgebung
$ vagrant box add base http://files.vagrantup.com/precise32.box $ vagrant init $ vagrant up
Beispiel-Config mit puppetVagrant.configure("2") do |config| ! config.vm.box = "debian-607" config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210.box" config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--memory", "4096"] v.customize ["modifyvm", :id, "--cpus", "4"] end config.vm.network :public_network config.vm.network :forwarded_port, guest: 80, host: 8080 config.vm.hostname = „demo.hostname.local“ ! config.vm.provision :puppet_server do |puppet| puppet.puppet_server = „puppet.meinhost.de“ puppet.options = "--verbose --debug --environment testing" end end
zum Lernen
• Puppet Tutorial: http://bit.ly/lernpuppet
• Vagrant: http://bit.ly/learnvagrant