SlideShare uma empresa Scribd logo
1 de 25
Razor 
David Lutterkort 
Principal Engineer | Puppet Labs 
@lutterkort
PXE provisioning - user satisfaction
Overview 
• Intro to Razor 
• Examples 
• Minimal setup 
• Direct provisioning 
• Brownfield 
• Windows 
• Server locality 
• Puppet Enterprise
Razor in a nutshell 
• iPXE 
• Node Discovery 
• Stay focussed
Moving pieces 
Repo What to install ISO contents 
Task How to install Installer scripts 
Broker How to manage PE agent install 
Tag Where to install Named match rule 
Policy Combine it all Ordered table
Examples
Minimal setup 
> razor create-repo --name centos6  
--iso-url http://example.org/centos-6.5.iso  
--task centos
Minimal setup 
> razor create-repo --name centos6  
--iso-url http://example.org/centos-6.5.iso  
--task centos 
From http://razor:8080/api/collections/repos/centos6: 
name: centos6 
iso_url: http://example.org/centos-6.5.iso 
url: — 
task: centos 
command: http://razor:8080/api/collections/commands/74
Minimal setup 
> razor create-broker --name pe --broker-type puppet-pe  
--configuration server=puppet-master.example.org
Minimal setup 
> razor create-tag --name test --rule '["=", 1, 1]'
Minimal setup 
> razor create-policy --name demo  
--repo centos6  
--hostname 'host${id}.example.com'  
--root-password 'geheim'  
--broker pe 
--tag test
MAC-based provisioning 
> razor update-tag-rule --name test --force  
--rule '["in", ["fact", "macaddress"], 
"00:00:de:ad:be:ef"]'
MAC-based provisioning 
> razor update-tag-rule --name test --force  
--rule '["in", ["fact", "macaddress"], 
"00:00:de:ad:be:ef", 
"00:00:8b:ad:f0:0d"]'
Using node metadata 
> razor update-tag-rule --name test --force  
--rule '["=", ["metadata", "os"] "centos"]'
Using node metadata 
> razor update-node-metadata --node node42  
--key os  
--value centos
Brownfield deployments 
• protect_new_nodes setting in config.yaml 
• register_node command
Windows installation 
• Additional setup steps: 
1. Build WinPE 
2. Create Windows repo 
3. Samba server 
• Supported: Windows 8, Windows 2012R2, 2008R2 WIP
Server locality (@virtualswede) 
• server role based on position 
• talk to network equipment 
• extend MK with LLDP facts
LLDP facts 
> razor nodes node1 facts 
From http://localhost:8080/api/collections/nodes/node1: 
… 
ipaddress_ens2f0: 192.168.1.107 
macaddress_ens2f0: 00:1e:67:4d:c2:06 
netmask_ens2f0: 255.255.255.0 
… 
lldp_neighbor_portid_ens2f0: Ethernet17 
lldp_neighbor_sysname_ens2f0: razor-switch1 
lldp_neighbor_mngaddr_ipv4_ens2f0: 192.168.1.254 
…
Microkernel extensions 
> tree extension 
extension/ 
├── bin/ 
├── lib/ 
│ └── ruby/ 
│ └── facter/ 
└── facts.d/ 
> cd extension && zip -r ../mk-extension.zip * 
> cp mk-extension.zip $extension-zip
Hook scripts 
• Called at predefined points in a node’s lifecycle 
• node-registered 
• node-bound 
• node-uninstalled 
• node-deleted
Hook scripts 
json=$(< /dev/stdin) 
name=$(jq '.hook.name' <<< $json) 
value=$(( $(jq '.hook.config.value' <<< $json) + 1 )) 
cat <<EOF 
{ 
"hook": { 
"config": { "value": $value } 
}, 
"metadata": { $name: $value } 
} 
EOF
Puppet 
Enterprise
Razor and Puppet Enterprise 
• In Tech Preview since PE 3.2 
• Major updates in PE 3.3 
• Ongoing work to support fully 
• Vagrant stack: 
https://github.com/npwalker/pe-razor-vagrant-stack
Questions ? 
https://github.com/puppetlabs/razor-server 
http://virtualswede.files.wordpress.com/2012/07/puppet-plus-razor-is-good.png

Mais conteúdo relacionado

Mais procurados

Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Simon Boulet
 

Mais procurados (20)

Cloud FoundryではじめるPaaSアプリケーション 開発入門講座
Cloud FoundryではじめるPaaSアプリケーション 開発入門講座 Cloud FoundryではじめるPaaSアプリケーション 開発入門講座
Cloud FoundryではじめるPaaSアプリケーション 開発入門講座
 
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFestThe Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
 
Automated Deployment using Open Source
Automated Deployment using Open SourceAutomated Deployment using Open Source
Automated Deployment using Open Source
 
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie EnvironmentsDotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
 
Selenium Automation at Incapsula
Selenium Automation at IncapsulaSelenium Automation at Incapsula
Selenium Automation at Incapsula
 
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
 
Node.js primer for ITE students
Node.js primer for ITE studentsNode.js primer for ITE students
Node.js primer for ITE students
 
Ansible container
Ansible containerAnsible container
Ansible container
 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Selenium
 
How to setup jenkins
How to setup jenkinsHow to setup jenkins
How to setup jenkins
 
Bypassing cisco’s sourcefire amp endpoint solution – full demo
Bypassing cisco’s sourcefire amp endpoint solution – full demoBypassing cisco’s sourcefire amp endpoint solution – full demo
Bypassing cisco’s sourcefire amp endpoint solution – full demo
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
 
How to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthroughHow to work with Selenium Grid: a quick walkthrough
How to work with Selenium Grid: a quick walkthrough
 
NoOpsが目指す未来とコンテナ技術
NoOpsが目指す未来とコンテナ技術NoOpsが目指す未来とコンテナ技術
NoOpsが目指す未来とコンテナ技術
 
Node.JS security
Node.JS securityNode.JS security
Node.JS security
 
Eclipse Concierge - an OSGi R5 framework for IoT applications
Eclipse Concierge - an OSGi R5 framework for IoT applicationsEclipse Concierge - an OSGi R5 framework for IoT applications
Eclipse Concierge - an OSGi R5 framework for IoT applications
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Open stack qa and tempest
Open stack qa and tempestOpen stack qa and tempest
Open stack qa and tempest
 
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
Deploying with Super Cow Powers (Hosting your own APT repository with reprepro)
 
Nodejs Security
Nodejs SecurityNodejs Security
Nodejs Security
 

Destaque (10)

virtual surgery
virtual surgeryvirtual surgery
virtual surgery
 
Virtual retinal-display ppt
Virtual retinal-display pptVirtual retinal-display ppt
Virtual retinal-display ppt
 
Virtual retinal display ppt
Virtual retinal display pptVirtual retinal display ppt
Virtual retinal display ppt
 
Polyfuse.
Polyfuse.Polyfuse.
Polyfuse.
 
Virtual surgery [new].ppt
Virtual surgery [new].pptVirtual surgery [new].ppt
Virtual surgery [new].ppt
 
Polyfuse
PolyfusePolyfuse
Polyfuse
 
Polyfuse
PolyfusePolyfuse
Polyfuse
 
Hy wire-car
Hy wire-carHy wire-car
Hy wire-car
 
Hy wire ppt
Hy wire pptHy wire ppt
Hy wire ppt
 
4g wireless final ppt
4g wireless  final ppt4g wireless  final ppt
4g wireless final ppt
 

Semelhante a Razor, the Provisioning Toolbox - PuppetConf 2014

Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Jan Kalcic
 
E2E PVS Technical Overview Stephane Thirion
E2E PVS Technical Overview Stephane ThirionE2E PVS Technical Overview Stephane Thirion
E2E PVS Technical Overview Stephane Thirion
sthirion
 

Semelhante a Razor, the Provisioning Toolbox - PuppetConf 2014 (20)

Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR[OpenStack 하반기 스터디] HA using DVR
[OpenStack 하반기 스터디] HA using DVR
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
E2E PVS Technical Overview Stephane Thirion
E2E PVS Technical Overview Stephane ThirionE2E PVS Technical Overview Stephane Thirion
E2E PVS Technical Overview Stephane Thirion
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Automation day red hat ansible
   Automation day red hat ansible    Automation day red hat ansible
Automation day red hat ansible
 
OpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloud
OpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloudOpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloud
OpenCloudDay 2014: Deploying trusted developer sandboxes in Amazon's cloud
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
 
Hands on Virtualization with Ganeti
Hands on Virtualization with GanetiHands on Virtualization with Ganeti
Hands on Virtualization with Ganeti
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
Building an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent ConnectionsBuilding an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent Connections
 

Mais de Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
Puppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
Puppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
Puppet
 

Mais de Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Razor, the Provisioning Toolbox - PuppetConf 2014

  • 1. Razor David Lutterkort Principal Engineer | Puppet Labs @lutterkort
  • 2. PXE provisioning - user satisfaction
  • 3. Overview • Intro to Razor • Examples • Minimal setup • Direct provisioning • Brownfield • Windows • Server locality • Puppet Enterprise
  • 4. Razor in a nutshell • iPXE • Node Discovery • Stay focussed
  • 5. Moving pieces Repo What to install ISO contents Task How to install Installer scripts Broker How to manage PE agent install Tag Where to install Named match rule Policy Combine it all Ordered table
  • 7. Minimal setup > razor create-repo --name centos6 --iso-url http://example.org/centos-6.5.iso --task centos
  • 8. Minimal setup > razor create-repo --name centos6 --iso-url http://example.org/centos-6.5.iso --task centos From http://razor:8080/api/collections/repos/centos6: name: centos6 iso_url: http://example.org/centos-6.5.iso url: — task: centos command: http://razor:8080/api/collections/commands/74
  • 9. Minimal setup > razor create-broker --name pe --broker-type puppet-pe --configuration server=puppet-master.example.org
  • 10. Minimal setup > razor create-tag --name test --rule '["=", 1, 1]'
  • 11. Minimal setup > razor create-policy --name demo --repo centos6 --hostname 'host${id}.example.com' --root-password 'geheim' --broker pe --tag test
  • 12. MAC-based provisioning > razor update-tag-rule --name test --force --rule '["in", ["fact", "macaddress"], "00:00:de:ad:be:ef"]'
  • 13. MAC-based provisioning > razor update-tag-rule --name test --force --rule '["in", ["fact", "macaddress"], "00:00:de:ad:be:ef", "00:00:8b:ad:f0:0d"]'
  • 14. Using node metadata > razor update-tag-rule --name test --force --rule '["=", ["metadata", "os"] "centos"]'
  • 15. Using node metadata > razor update-node-metadata --node node42 --key os --value centos
  • 16. Brownfield deployments • protect_new_nodes setting in config.yaml • register_node command
  • 17. Windows installation • Additional setup steps: 1. Build WinPE 2. Create Windows repo 3. Samba server • Supported: Windows 8, Windows 2012R2, 2008R2 WIP
  • 18. Server locality (@virtualswede) • server role based on position • talk to network equipment • extend MK with LLDP facts
  • 19. LLDP facts > razor nodes node1 facts From http://localhost:8080/api/collections/nodes/node1: … ipaddress_ens2f0: 192.168.1.107 macaddress_ens2f0: 00:1e:67:4d:c2:06 netmask_ens2f0: 255.255.255.0 … lldp_neighbor_portid_ens2f0: Ethernet17 lldp_neighbor_sysname_ens2f0: razor-switch1 lldp_neighbor_mngaddr_ipv4_ens2f0: 192.168.1.254 …
  • 20. Microkernel extensions > tree extension extension/ ├── bin/ ├── lib/ │ └── ruby/ │ └── facter/ └── facts.d/ > cd extension && zip -r ../mk-extension.zip * > cp mk-extension.zip $extension-zip
  • 21. Hook scripts • Called at predefined points in a node’s lifecycle • node-registered • node-bound • node-uninstalled • node-deleted
  • 22. Hook scripts json=$(< /dev/stdin) name=$(jq '.hook.name' <<< $json) value=$(( $(jq '.hook.config.value' <<< $json) + 1 )) cat <<EOF { "hook": { "config": { "value": $value } }, "metadata": { $name: $value } } EOF
  • 24. Razor and Puppet Enterprise • In Tech Preview since PE 3.2 • Major updates in PE 3.3 • Ongoing work to support fully • Vagrant stack: https://github.com/npwalker/pe-razor-vagrant-stack
  • 25. Questions ? https://github.com/puppetlabs/razor-server http://virtualswede.files.wordpress.com/2012/07/puppet-plus-razor-is-good.png