+ All Categories
Home > Technology > Razor: A fresh look at provisioning by David Lutterkort

Razor: A fresh look at provisioning by David Lutterkort

Date post: 22-Jun-2015
Category:
Upload: netways
View: 749 times
Download: 1 times
Share this document with a friend
Description:
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.
Popular Tags:
31
David Lutterkort [email protected] @lutterkort Razor - Provision like a boss
Transcript
Page 1: Razor:  A fresh look at provisioning by David Lutterkort

David Lutterkort [email protected]

@lutterkort

Razor - Provision like a

boss

Page 2: Razor:  A fresh look at provisioning by David Lutterkort

PXE provisioning – satisfaction rating

How satisfied are you with your PXE installation solution ? (representative sample of imaginary users)

Page 3: Razor:  A fresh look at provisioning by David Lutterkort

3

Page 4: Razor:  A fresh look at provisioning by David Lutterkort

4

Page 5: Razor:  A fresh look at provisioning by David Lutterkort

Components

5

Server

Page 6: Razor:  A fresh look at provisioning by David Lutterkort

Components

6

Server

Page 7: Razor:  A fresh look at provisioning by David Lutterkort

Setup

7

Server

TFTP

DHCP

Page 8: Razor:  A fresh look at provisioning by David Lutterkort

Client

Architecture

8

Node

Node

Node

Node

TFTP

DHCP

Server

Page 9: Razor:  A fresh look at provisioning by David Lutterkort

Discovery

9

Node

Server

TFTP

DHCP

Page 10: Razor:  A fresh look at provisioning by David Lutterkort

Node

Discovery

10

MK Serv

er

TFTP

DHCP

Page 11: Razor:  A fresh look at provisioning by David Lutterkort

Node

Server

Client

Setup

11

Repo Broker

Policy

Tags

RE

ST

MK

TFTP

DHCP

Installer

Page 12: Razor:  A fresh look at provisioning by David Lutterkort

Node

Client

Installation

12

RE

ST

MK

TFTP

DHCP

Server

Repo Broker

Policy

Tags Installer

Page 13: Razor:  A fresh look at provisioning by David Lutterkort

Node

Client

Installation

13

RE

ST

TFTP

DHCP

Server

Repo Broker

Policy

Tags Installer

Page 14: Razor:  A fresh look at provisioning by David Lutterkort

Node

Client

Installation

14

RE

ST

TFTP

DHCP

Server

Repo Broker

Policy

Tags Installer

Page 15: Razor:  A fresh look at provisioning by David Lutterkort

Client

Installers

15

Node

Node

Node

Node

TFTP

DHCP

Server

Page 16: Razor:  A fresh look at provisioning by David Lutterkort

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:  A fresh look at provisioning by David Lutterkort

Installer example

17

---

# redhat.yaml

os_version: 6

description: Red Hat EL

installer

boot_sequence:

1: boot_install

default: boot_local

Page 18: Razor:  A fresh look at provisioning by David Lutterkort

Broker example

18

# broker.json

{

“name”: "puppet",

“broker-type”: "puppet",

“configuration”: {

“server”:

"puppet.local.watzmann.net",

“certname”: …,

“environment”:

“production”

}

}

Page 19: Razor:  A fresh look at provisioning by David Lutterkort

Template example

19

# os_boot.erb

hostname <%= 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:  A fresh look at provisioning by David Lutterkort

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:  A fresh look at provisioning by David Lutterkort

21

Page 22: Razor:  A fresh look at provisioning by David Lutterkort

The Cloudy Part

Page 23: Razor:  A fresh look at provisioning by David Lutterkort

ESXi → vCenter

vCenter

Node

Node

Node

Node

TFTP

DHCP

Razor

GET /broker

export node details

collect

puppetlabs/ vcenter

Page 24: Razor:  A fresh look at provisioning by David Lutterkort

Openstack

Cntrl

Comp

TFTP

DHCP

Razor

puppetlabs/ openstack

Page 25: Razor:  A fresh look at provisioning by David Lutterkort

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:  A fresh look at provisioning by David Lutterkort

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:  A fresh look at provisioning by David Lutterkort

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:  A fresh look at provisioning by David Lutterkort

The Future

Page 29: Razor:  A fresh look at provisioning by David Lutterkort

Client

Command and control

29

Node

Node

Node

Node

TFTP

DHCP

Server

Commands

Page 30: Razor:  A fresh look at provisioning by David Lutterkort

Client

Events

30

Node

Node

Node

Node

TFTP

DHCP

Server Events


Recommended