10. Hello Puppet knox:puppet jsimpson$ ./manifests/classes/01_hello_world.pp warning: Could not retrieve fact fqdn notice: /Stage[main]//File[/tmp/PuppetHelloWorld]/ensure: defined content as '{md5}54393566ca75844a50baf0c6bccd84b5' notice: Finished catalog run in 0.16 seconds knox:puppet jsimpson$ cat /tmp/PuppetHelloWorld Hello Yow! knox:puppet jsimpson$
11. Hello Chef cat -n chef-repo/cookbooks/hello/recipes/default.rb 1 file "/tmp/Chef_Hello_World" do2 content "Hello, world!"3 end
12. Hello Chef knox:chef-repo jsimpson$ ./go [Thu, 01 Dec 2011 14:26:46 +1100] INFO: *** Chef 0.10.4 ***[Thu, 01 Dec 2011 14:26:46 +1100] INFO: Setting the run_list to ["recipe[hello]"] from JSON[Thu, 01 Dec 2011 14:26:46 +1100] INFO: Run List is [recipe[hello]][Thu, 01 Dec 2011 14:26:46 +1100] INFO: Run List expands to [hello][Thu, 01 Dec 2011 14:26:46 +1100] INFO: Starting Chef Run for knox[Thu, 01 Dec 2011 14:26:46 +1100] INFO: Processing file[/tmp/Chef_Hello_World] action create (hello::default line 1)[Thu, 01 Dec 2011 14:26:47 +1100] INFO: file[/tmp/Chef_Hello_World] created file /tmp/Chef_Hello_World[Thu, 01 Dec 2011 14:26:47 +1100] INFO: Chef Run complete in 0.084655 seconds[Thu, 01 Dec 2011 14:26:47 +1100] INFO: Running report handlers[Thu, 01 Dec 2011 14:26:47 +1100] INFO: Report handlers complete
18. 1 include_recipe "jetty"2 3 # We do it like this for the example...4 cookbook_file "/usr/share/jetty/webapps/app.war" do5 source "app.war"6 mode "0644"7 end8 9 # In real life I'd do something like...10 #remote_file "/usr/share/jetty/webapps/app.war" do11 # source node[:jetty][:deploy][:source]12 # checksum node[:jetty][:deploy][:checksum] if node[:jetty][:deploy][:checksum]13 # notifies :restart, "service[jetty]"14 #end
30. “ if you want a tool to be congruent, you really have to never re-write history. You have to constantly apply every byte-for-byte change in the same order, on every system you build. Skip a step in history, and everything goes off-kilter” Adam Jacob, 4 Dec
31. Luke Kanies is here to present on “Essential Incompleteness in Program Modeling”, and starts by getting right into Godel’s Incompleteness Theorem. [it] says that for any system that attempts to model reality (“any sufficiently complex system”), it can never be both consistent and complete.
36. Windows? Resource Puppet Chef File ✔ ✔ User ✔ ✔ Group ✔ ✔ Scheduled Task ✔ ✔ Service ✔ ✔ Exec ✔ ✔ Host ✔ ✔ Package(MSI) ✔ ✘ Powershell ✘ ✔
37.
38.
39.
40.
41.
Editor's Notes
Explain the 50% habit - rather have walkouts than reds Aussie developers seem smart Organisations make people smart Code has been reviewed by opscode and puppet labs
Ask them to make a mental note of it Agenda: demo, code and then theory You can ask questions: stop me if I’m going too fast/too slow
Story of the change management freak - no more than 5 minutes Introduction: sysadmin, build monkey, devops believer CM is being redefined in some people’s eyes/BCS ‘honest broker’
Define Puppet and Chef: both DSL’s for systems administration Why would we bother?
Enables seamless testing *Drive home that this *IS* what prod looks like Especially helpful if you use windows
All examples assume a single node with no server Point out the use of server is common and neccessary with any real number of nodes Chef 5 nodes, Puppetmaster easy to install
Here’s our corporate application
Shebangs - very simple command line tools to run Puppetmaster vs local
Chef server vs chef-solo the first tool is always a framework
PUPPET resources: package, file, service providers
CHEF Chef has cookbooks/recipes/roles
PUPPET - with Jetty pp file is getting big
CHEF line 1 is as about as graph-like
PUPPET show file distribution
CHEF: show file distribution
puppet modules are the unit of reuse
puppet is a directed graph
Role class
Some of the tooling goes back to the early 90’s It was easy desktop virtualisation, cloud and decent dynamic langs that made it possible
This ignores a lot, like LCFG, BCFG2, all the commercial tools, all the johnny-come lateleys
Puppet has a Ruby DSL now Providers and Resources are useful like Apache Ant’s tasks Chef has databags, puppet needs to implement other things
Congruent: how many Java or .NET VM’s did you kill yesterday? Congruent school of thought insists that order matters Convergent school is that order sometimes matters, and machines can drift closer
Puppet’s ordering is declarative. Chef’s isn’t. Chef is more declarative in some ways than Puppet: see the brevity of code