razor: provision like a boss (build-a-cloud edition)
DESCRIPTION
Introduction to the Razor provTRANSCRIPT
![Page 2: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/2.jpg)
PXE provisioning – satisfaction rating
RageAtrociousHorribleMeh
How satisfied are you with your PXE installation solution ?(representative sample of imaginary users)
![Page 3: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/3.jpg)
3
![Page 4: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/4.jpg)
4
![Page 5: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/5.jpg)
Client
Architecture
5
Node
Node
Node
Node
TFTPDHCP
Server
![Page 6: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/6.jpg)
Components
6
Server
![Page 7: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/7.jpg)
Components
7
Server
![Page 8: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/8.jpg)
Setup
8
Server
TFTPDHCP
![Page 9: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/9.jpg)
Discovery
9
Node
PXE
Server
TFTPDHCP
![Page 10: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/10.jpg)
Node
Discovery
10
MK
HTTP
Facts
Commands
Server
TFTPDHCP
![Page 11: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/11.jpg)
NodeServer
Client
Setup
11
RepoBroke
r
Policy
TagsREST
MK
TFTPDHCP
Installer
![Page 12: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/12.jpg)
Node
Client
Installation
12
REST
MK
TFTPDHCP
reboot
Server
RepoBroke
r
Policy
TagsInstaller
![Page 13: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/13.jpg)
Node
Client
Installation
13
REST
TFTPDHCP
installerServer
RepoBroke
r
Policy
TagsInstaller
![Page 14: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/14.jpg)
Node
Client
Installation
14
REST
TFTPDHCP
● fetch template
● store value
● log message
● stage finished
Server
RepoBroke
r
Policy
TagsInstaller
![Page 15: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/15.jpg)
Client
Installers
15
Node
Node
Node
Node
TFTPDHCP
Server
![Page 16: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/16.jpg)
Tags
• A named match rule• Rules can have complex logic
16
[“or”, [“in”, [“fact”, “macaddress”], “de:ad:be:ef:00:01”, “de:ad:be:ef:00:02”], [“=”, “2”, [“fact”, “processorcount”]]]
![Page 17: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/17.jpg)
Installer example
17
---# redhat.yamlos_version: 6description: Red Hat EL installerboot_sequence: 1: boot_install default: boot_local
![Page 18: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/18.jpg)
Broker example
18
# broker.json{ “name”: "puppet", “broker-type”: "puppet", “configuration”: { “server”: "puppet.local.watzmann.net", “certname”: …, “environment”: “production” }}
![Page 19: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/19.jpg)
Template example
19
# 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 <%= repo_url(“/vmlinuz”) %> \ ks=<%= file_url(“kickstart”) %>
![Page 20: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/20.jpg)
Policy example
# policy.json{ “name”: “centos”, “repo”: { “name”: “centos-6.4” }, “installer”: { “name”: “centos” }, “broker”: { “name”: “puppet” }, “hostname”: “host${id}.example.com”, “root_password”: “secret”, “max_count”: 20, “enabled”: true, “rule_number”: 100, “tags”: [{ “name”: “large-server”, “rule”: [ … ] }]}
![Page 21: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/21.jpg)
21
![Page 22: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/22.jpg)
The Cloudy Part
![Page 23: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/23.jpg)
ESXi → vCenter
vCenter
Node
Node
Node
Node
TFTPDHCP
Razor
GET /broker
export node details
collect
puppetlabs/ vcenter
![Page 24: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/24.jpg)
Openstack
Cntrl
Comp
TFTPDHCP
Razor
puppetlabs/ openstack
![Page 25: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/25.jpg)
Openstack: Controller Policy
# controller.json{ “name”: “controller”, “repo”: { “name”: “fedora-19” }, “installer”: { “name”: “fedora” }, “broker”: { “name”: “puppet” }, “hostname”: “controller${id}.example.com”, “root_password”: “secret”, “max_count”: 1, “enabled”: true, “rule_number”: 100, “tags”: [{ “name”: “controller”, “rule”: [ … ] }]}
![Page 26: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/26.jpg)
Openstack: Compute Policy
# compute.json{ “name”: “compute”, “repo”: { “name”: “fedora-19” }, “installer”: { “name”: “fedora” }, “broker”: { “name”: “puppet” }, “hostname”: “compute${id}.example.com”, “root_password”: “secret”, “max_count”: 1, “enabled”: true, “rule_number”: 90, “tags”: [{ “name”: “compute”, “rule”: [ … ] }]}
![Page 27: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/27.jpg)
Openstack: site.pp
node /controller/ { class { 'openstack::controller': public_address => '192.168.100.10', public_interface => 'eth0', private_interface => 'eth1', … } }
node /compute/ { class { 'openstack::compute': internal_address => $::ipaddress_eth0, … } }
![Page 28: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/28.jpg)
The Future
![Page 29: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/29.jpg)
Client
Command and control
29
Node
Node
Node
Node
TFTPDHCP
Server
Commands
![Page 30: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/30.jpg)
Client
Events
30
Node
Node
Node
Node
TFTPDHCP
ServerEvents
![Page 31: Razor: provision like a boss (Build-a-cloud edition)](https://reader034.vdocuments.mx/reader034/viewer/2022052522/554f8962b4c905d25b8b4e31/html5/thumbnails/31.jpg)
Don’t be a stranger
• Github repos (will change)– Server:
https://github.com/puppetlabs/razor-server–Microkernel:
https://github.com/puppetlabs/razor-el-mk
• Mailing list: http://groups.google.com/group/puppet-razor
• IRC: #puppet-razor (freenode)• My email: [email protected]
31