Slide 1

Slide 1 text

Puppet & Vagrant

Slide 2

Slide 2 text

Was ist Puppet • IT Automatisierung • Infrastruktur Management • Configuration File Management • Skalierungs-freundlich

Slide 3

Slide 3 text

Aufbau • Facter • (PuppetDB) • Manifests • node.pp

Slide 4

Slide 4 text

# puppet apply file.pp

Slide 5

Slide 5 text

Demo file.pp file {'/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!":}

Slide 6

Slide 6 text

# puppet apply file.pp notice: /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

Slide 7

Slide 7 text

Klassen/ Module • class ntp { … } • include ntp

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Vagrant

Slide 10

Slide 10 text

Was ist Vagrant • einfache Entwicklungsumgebungen • Provisionierbar über Puppet • Virtualisierung mit • Virtualbox • VMWare (kostenpflichtig)

Slide 11

Slide 11 text

Basis-Umgebung $ vagrant box add base http://files.vagrantup.com/precise32.box $ vagrant init $ vagrant up

Slide 12

Slide 12 text

Beispiel-Config mit puppet Vagrant.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

Slide 13

Slide 13 text

zum Lernen • Puppet Tutorial: http://bit.ly/lernpuppet • Vagrant: http://bit.ly/learnvagrant

Slide 14

Slide 14 text

We are hiring! jobs.lovoo.net