Razor - Provision like a

boss
David Lutterkort
lutter@puppetlabs.com
@lutterkort
PXE provisioning – satisfaction rating

How satisfied are you with your PXE installation solution ?
(representative sample...
3
4
Components

Serv
er

5
Components

Serv
er

6
Setup
DH
CP
TF
TP

Serv
er

7
Architecture
DH
CP
TF
TP

No
de

Serv
er

No
de

Clie
nt

No
de

No
de

8
Discovery
DH
CP
TF
TP

Serv
er

No
de

9
Discovery
DH
CP
TF
TP

Serv
er

M
K
No
de

1
0
Setup

DH
CP
TF
TP

RE
ST

Clie
nt

Serv
er
Re
po
Brok
er
Ta
gs
Install
er

M
K
No
de

Poli
cy

1
1
Installation

RE
ST

Clie
nt

DH
CP
TF
TP

Serv
er
Re
po
Brok
er
Ta
gs
Install
er

M
K
No
de

Poli
cy

1
2
Installation

RE
ST

Clie
nt

DH
CP
TF
TP

Serv
er
Re
po
Brok
er
Ta
gs
Install
er

No
de

Poli
cy

1
3
Installation

RE
ST

Clie
nt

DH
CP
TF
TP

Serv
er
Re
po
Brok
er
Ta
gs
Install
er

No
de

Poli
cy

1
4
Installers
DH
CP
TF
TP

No
de

Serv
er

No
de

Clie
nt

No
de

No
de
1
5
Tags

• A named match rule
• Rules can have complex logic
[“or”,
[“in”, [“fact”, “macaddress”],
“de:ad:be:ef:00:01”,
“de:a...
Installer example

--# redhat.yaml
os_version: 6
description: Red Hat EL
installer
boot_sequence:
1: boot_install
default:...
Broker example

# broker.json
{
“name”: "puppet",
“broker-type”: "puppet",
“configuration”: {
“server”:
"puppet.local.watz...
Template example
#!ipxe
# boot_install.erb
kernel <%=
repo_url(“/vmlinuz”) %> 
ks=<%=
file_url(“kickstart”) %>
# os_boot.e...
Policy example
# policy.json
{
“name”: “centos”,
“repo”: { “name”: “centos-6.4” },
“installer”: { “name”: “centos” },
“bro...
2
1
The Cloudy Part
ESXi → vCenter

DH
CP
TF
TP

No
de

Raz
or

No
de

vCen
ter

GET /broker

collect

No
de

puppetlabs/
vcenter

export node...
Openstack

DH
CP
TF
TP

Raz
or

puppetlabs/
openstack

Cnt
rl

Co
mp
Openstack: Controller Policy
# controller.json
{
“name”: “controller”,
“repo”: { “name”: “fedora-19” },
“installer”: { “na...
Openstack: Compute Policy
# compute.json
{
“name”: “compute”,
“repo”: { “name”: “fedora-19” },
“installer”: { “name”: “fed...
Openstack: site.pp
node /controller/ {
class { 'openstack::controller':
public_address => '192.168.100.10',
public_interfa...
The Future
Command and control
DH
CP
TF
TP

No
de

Serv
er

No
de

Commands
Clie
nt

No
de

No
de
2
9
Events
DH
CP
TF
TP

Events

No
de

Serv
er

No
de

Clie
nt

No
de

No
de
3
0
Don’t be a stranger
• Github repos (will change)
– Server: https://github.com/puppetlabs/razorserver
– Microkernel:
https:...
Upcoming SlideShare
Loading in …5
×

Razor: A fresh look at provisioning by David Lutterkort

924 views

Published on

Razor is a flexible provisioning tool that makes it easy to control how machines are built based on rules and policies. It maintains an inventory of nodes and their hardware characteristics, gathered by booting each node into a discovery image. Razor is an opinionated tool that focuses narrowly on provisioning, but makes it easy to hand off a node after installation to a configuration management system like Puppet to perform more complicated setup tasks and for ongoing maintenance.This talk will give an overview of Razor's capabilities and provide some hands-on examples about its use, including how Razor can be used to build an OpenStack cloud using Puppet Labs' OpenStack modules.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
924
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Razor: A fresh look at provisioning by David Lutterkort

  1. 1. Razor - Provision like a boss David Lutterkort lutter@puppetlabs.com @lutterkort
  2. 2. PXE provisioning – satisfaction rating How satisfied are you with your PXE installation solution ? (representative sample of imaginary users)
  3. 3. 3
  4. 4. 4
  5. 5. Components Serv er 5
  6. 6. Components Serv er 6
  7. 7. Setup DH CP TF TP Serv er 7
  8. 8. Architecture DH CP TF TP No de Serv er No de Clie nt No de No de 8
  9. 9. Discovery DH CP TF TP Serv er No de 9
  10. 10. Discovery DH CP TF TP Serv er M K No de 1 0
  11. 11. Setup DH CP TF TP RE ST Clie nt Serv er Re po Brok er Ta gs Install er M K No de Poli cy 1 1
  12. 12. Installation RE ST Clie nt DH CP TF TP Serv er Re po Brok er Ta gs Install er M K No de Poli cy 1 2
  13. 13. Installation RE ST Clie nt DH CP TF TP Serv er Re po Brok er Ta gs Install er No de Poli cy 1 3
  14. 14. Installation RE ST Clie nt DH CP TF TP Serv er Re po Brok er Ta gs Install er No de Poli cy 1 4
  15. 15. Installers DH CP TF TP No de Serv er No de Clie nt No de No de 1 5
  16. 16. Tags • A named match 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”]]] 1 6
  17. 17. Installer example --# redhat.yaml os_version: 6 description: Red Hat EL installer boot_sequence: 1: boot_install default: boot_local 1 7
  18. 18. Broker example # broker.json { “name”: "puppet", “broker-type”: "puppet", “configuration”: { “server”: "puppet.local.watzmann.net", “certname”: …, “environment”: “production” } } 1 8
  19. 19. Template example #!ipxe # boot_install.erb kernel <%= repo_url(“/vmlinuz”) %> ks=<%= file_url(“kickstart”) %> # os_boot.erb hostname <%= node.hostname %> yum -y install rubygems facter [ $? -eq 0 ] && curl <%= log_url(“ok”) %> 1 9
  20. 20. 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”: [ … ] }] }
  21. 21. 2 1
  22. 22. The Cloudy Part
  23. 23. ESXi → vCenter DH CP TF TP No de Raz or No de vCen ter GET /broker collect No de puppetlabs/ vcenter export node details No de
  24. 24. Openstack DH CP TF TP Raz or puppetlabs/ openstack Cnt rl Co mp
  25. 25. 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”: [ … ] }] }
  26. 26. 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”: [ … ] }] }
  27. 27. 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, … } }
  28. 28. The Future
  29. 29. Command and control DH CP TF TP No de Serv er No de Commands Clie nt No de No de 2 9
  30. 30. Events DH CP TF TP Events No de Serv er No de Clie nt No de No de 3 0
  31. 31. Don’t be a stranger • Github repos (will change) – Server: https://github.com/puppetlabs/razorserver – Microkernel: https://github.com/puppetlabs/razor-el-mk • Mailing list: http://groups.google.com/group/puppet-razor • IRC: #puppet-razor (freenode) • My email: lutter@puppetlabs.com 3 1

×