Razor talk-2013-08-23
-
Upload
puppet -
Category
Technology
-
view
1.681 -
download
0
Transcript of Razor talk-2013-08-23
![Page 1: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/1.jpg)
RazorProvision like a bossDavid LutterkortPrincipal Engineer | Puppet Labs @[email protected]
![Page 2: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/2.jpg)
Who are you ?• Joined Puppet Labs in May
• One of the first contributors to Puppet
• Started Augeas
• Apache Deltacloud, DMTF CIMI
• email: [email protected]
• IRC: lutter, twitter: @lutterkort
![Page 3: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/3.jpg)
Razor history• Started by EMC/VMWare
• Nick Weaver, Tom McSweeney
• EMC World 2012
• PuppetConf 2012
![Page 4: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/4.jpg)
![Page 5: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/5.jpg)
![Page 6: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/6.jpg)
Ingredients• ipxe
• Hardware discovery and inventory
• Tagging and policies
![Page 7: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/7.jpg)
Where is Razor going• Rewrite for different stack
• Simplify deployment
• Simplify maintenance
• Simplify usage
Don’t muck with the good bits
![Page 8: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/8.jpg)
The more it changes ...• Node discovery with MK and facter
• Use ipxe to control boot
• Written in Ruby
• Flexible tag/rule-based policy match
• Simple handoff to Puppet
• Manage large number of nodes
![Page 9: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/9.jpg)
Foundations
![Page 10: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/10.jpg)
Aside: Torquebox rules• Daemons
• Scheduled Jobs
• Messaging
• Clustering
• Integration with Java libraries
• Java management
![Page 11: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/11.jpg)
Components• Razor server
• Razor CLI
• Microkernel agent
• Microkernel image
• Razor UI
![Page 12: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/12.jpg)
Microkernel• Separate MK agent from OS image
• Build on EL
• well-known hardware support
• formal support offerings
• currently ~ 150MB (unoptimized)
• Enable alternative MK builds
![Page 13: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/13.jpg)
Server API• JSON everywhere
• Query objects with RESTful interface
• Update/modify using commands (CQRS)
• all changes happen async
• Authentication [TODO]
![Page 14: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/14.jpg)
CLI
1> razor nodes
2> razor tags mytag
3> razor create-tag --name=any \ --rule ‘[“=”, 1, 1]’
4> razor create-image --name=... \ --image-url=...
5> razor create-policy --json policy.json
![Page 15: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/15.jpg)
Tags
• A named rule
• Rules can have complex logic
[“or”, [“in”, [“fact”, “macaddress”, “de:ad:be:ef:00:01”, “de:ad:be:ef:00:02”]], [“=”, “2”, [“fact”, “processorcount”]]]
![Page 16: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/16.jpg)
Policies# policy.json{ “name”: “fedora-for-any”, “image”: { “name”: “fedora-19” }, “installer”: { “name”: “fedora-base” }, “broker”: { “name”: “puppet” }, “hostname”: “host${id}.example.com”, “root_password”: “secret”, “max_count”: 20, “enabled”: true, “line_number”: 100, “tags”: [{ “name”: “any” }]}
![Page 17: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/17.jpg)
Installers• OS installation inherently linear
• Completely in metadata
• file based or in DB
• Simple node/server API
• evaluate and fetch ERB template
• store a value (e.g., IP address)
• log a message
![Page 18: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/18.jpg)
Installer example---# redhat.yamlos: Red Hat Enterprise Linuxos_version: 6description: Red Hat EL installerboot_sequence: 1: boot_install default: boot_local
![Page 19: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/19.jpg)
Template example
# os_boot.erbhostname <%= node.hostname %>
yum -y install rubygems facter[ $? -eq 0 ] && curl <%= log_url(“ok”) %>\ || curl <%= log_url(“fail”, :error) %>
#!ipxe# boot_install.erb
kernel <%= image_url(“/vmlinuz”) %> \ ks=<%= file_url(“kickstart”) %>
![Page 20: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/20.jpg)
The road forward• Make release soon (~ 2 weeks)
• Add lifecycle management features
• Userdata for nodes
• Node commands
• Generate events
![Page 21: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/21.jpg)
Possible node commands• Boot locally
• Boot into MK
• register
• update facts
• BIOS/firmware update
• Reinstall OS
• Unbind & run through policy table
![Page 22: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/22.jpg)
Event generation• User-controlled actions (commands)
• Possible events
• node discovered
• policy bound
• installer finished
• policy unbound
![Page 23: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/23.jpg)
Demo time
![Page 24: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/24.jpg)
Don’t be a strangerGithub repos (will change)Server: https://github.com/puppetlabs/razor-serverMicrokernel: https://github.com/puppetlabs/razor-el-mkMailing listhttp://groups.google.com/group/puppet-razorIRC: #puppet-razor (freenode)My email: [email protected]
![Page 25: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/25.jpg)
Thank YouDavid LutterkortPrincipal Engineer | Puppet Labs @lutterkort
Collaborate. Automate. Ship.
![Page 26: Razor talk-2013-08-23](https://reader034.fdocuments.net/reader034/viewer/2022050614/554f7055b4c905c8088b5524/html5/thumbnails/26.jpg)
Follow us on Twitter @puppetlabs
youtube.com/puppetlabsinc
slideshare.net/puppetlabs
Collaborate. Automate. Ship.