Razor is an open source provisioning tool that was originally developed by EMC and Puppet Labs. It can discover hardware, select images to deploy, and provision nodes using model-based provisioning. The demo showed setting up a Razor appliance, adding images, models, policies, and brokers. It then deployed an OpenStack all-in-one environment to a new VM using Razor and Chef. The OpenStack cookbook walkthrough explained the roles, environments, and cookbooks used to deploy and configure OpenStack components using Chef.
3. Get Razor Appliance
USB keys (thanks to eNovance, Suse, and Piston)
Wireless network: razor5 and razor24 (thank you Rackers!)
Start downloading/copying
http://192.168.1.3:8080/examples/razor.tar
4. Setting up Razor Appliance in
Virtual Box
Must have extension pack installed. Get it here:
https://www.virtualbox.org/wiki/Downloads
Verify extension pack is installed:
VBoxManage list extpacks
File/Import Appliance...
Default options for everything
5. Setting up Razor Appliance in
VMware Fusion
File/Import: select ovf file, ignore warnings.
File/Import Appliance...
Set up two nics for the VM, second one internal
Make sure the DHCP for internal nic is turned off,
under VMware Fusion/Preferences.../Network
9. Razor Appliance
Built on Ubuntu Server, 12.04, for this tutorial
Must have two nics, one for external, one for internal traffic
Comes with:
Razor
TFTP service
DHCP service
MongoDB
Chef Server
Rackspace Private Cloud Cookbooks
MicroKernel and Ubuntu Server ISO
10. Logging In
User name: anystacker
Password: razor
Login, and switch to root.
Verify razor is running:
root@razor:~# /opt/razor/bin/razor_daemon.rb status
If not:
root@razor:~# /opt/razor/bin/razor_daemon.rb start
11. About Razor
Provisioning solution for hardware
Initially developed by EMC and Puppet
Open sourced as a Puppet Labs project
Install using Puppet, Chef, or manual
12. About Razor
Auto-Discovered Real-Time Inventory Data
Dynamic Image Selection
Model-Based Provisioning
APIs and Plug-in Architecture
Metal-to-Cloud Application Lifecycle Management
14. Razor State of Things
Razor is awesome!
Still not a 1.* release
MongoDB may cause concurrency issues
Policy limit counts may not be enforced
Some other issues
15. Bright and Shiny Future
v1.0 release focus on stability and scalability:
Beta version in Q3
support concurrency
scale well
easy to install, upgrade, and test
16. Bright and Shiny Future
After v1.0:
Windows support
maybe AIX and Solaris support
17. Connecting to Razor VM
VirtualBox:
ssh -p 2223 localhost
VMware Fusion:
get IP and ssh to it
19. Verify Status
Verify razor is running:
root@razor:~# /opt/razor/bin/razor_daemon.rb status
If not:
root@razor:~# /opt/razor/bin/razor_daemon.rb start
Check networks
22. MicroKernel
Variant of Tiny Core Linux
Found here: https://github.com/puppetlabs/razor-
microkernel/downloads
Need to add it once:
razor image add -t mk -p ./rz_mk_prod-image.0.9.3.0.iso
23. Add Image
razor image add -t os -p ./ubuntu-12.04.2-
server-amd64.iso -n ubuntu_precise_server
-v 12.04.2
Attempting to add, please wait...
New image added successfully
24. Added Image:
UUID => 36Lrq9JMiRwvrw5rSruSjg
Type => OS Install
ISO Filename => ubuntu-12.04.2-server-
amd64.iso
Path => /opt/razor/image/os/
36Lrq9JMiRwvrw5rSruSjg
Status => Valid
OS Name => ubuntu_precise_server
OS Version => 12.04.2
25. Model
Map image to built-in template
razor model add template -t ubuntu_precise -
l install_precise_server -i
36Lrq9JMiRwvrw5rSruSjg
26. Current Templates
ROOT@RAZOR:~# RAZOR MODEL TEMPLATE
MODEL TEMPLATES:
TEMPLATE NAME DESCRIPTION
DEBIAN_WHEEZY DEBIAN WHEEZY MODEL
OPENSUSE_12 OPENSUSE SUSE 12 MODEL
REDHAT_6 REDHAT 6 MODEL
SLES_11 SLES 11 MODEL
UBUNTU_ONEIRIC UBUNTU ONEIRIC MODEL
UBUNTU_PRECISE UBUNTU PRECISE MODEL
UBUNTU_PRECISE_IP_POOL UBUNTU PRECISE MODEL (IP
POOL)
VMWARE_ESXI_5 VMWARE ESXI 5 DEPLOYMENT
CENTOS_6 CENTOS 6 MODEL
ORACLELINUX_6 ORACLE LINUX 6 MODEL
27. razor model add template -t ubuntu_precise -l
install_precise_server -i 36Lrq9JMiRwvrw5rSruSjg
--- Building Model (ubuntu_precise):
Please enter node hostname prefix (will append node
number) (example: node)
default: node
(QUIT to cancel)
>
Please enter local domain name (will be used in /etc/
hosts file) (example: example.com)
default: localdomain
(QUIT to cancel)
>
Please enter root password (> 8 characters) (example:
P@ssword!)
default: test1234
(QUIT to cancel)
>
28. Model
Model created
Label => install_precise_server
Template => linux_deploy
Description => Ubuntu Precise Model
UUID => 5VShcTIkmqrCXGUBM3UwLI
Image UUID => 36Lrq9JMiRwvrw5rSruSjg
29. Policy
Map model to a node
razor policy add -p linux_deploy -l precise_server -m
5VShcTIkmqrCXGUBM3UwLI -t nics_1 --enabled true
Policy created
UUID => 6BtPna2OuYDcFPZr7ec1XU
Line Number => 0
Label => precise_server
Enabled => true
Template => linux_deploy
Description => Policy for deploying a Linux-based operating
system.
Tags => [nics_1]
Model Label => install_precise_server
Broker Target => none
Currently Bound => 0
Maximum Bound => 0
Bound Counter => 0
33. Chef Broker
Bootstrap install
URL for Chef Server, https:hostname
Chef version
validation.pem file
validation client name
Chef environment
Omnibus installer script
alternative path for chef-client binary
run list
34. Script Broker
Very new, not on Razor appliance
Runs scripts on the newly installed node
Soon, will gain special powers:
pre and post scripts
run on Razor server for full integration with tools
(signing Puppet certificate, etc)
35. Add Broker
razor broker add -p chef -n allinone -d
openstack_allinone
--- Building Broker (chef):
... lots of stuff
36. Add Broker to Policy
razor policy add -p linux_deploy -l
precise_server -m 5VShcTIkmqrCXGUBM3UwLI -
t nics_2 --enabled true
37. razor policy update 28kDQSkIVWtp9DFOuQdAgK -b
4uiuMcQVoePYmKOc3QLeRE
UUID => 28kDQSkIVWtp9DFOuQdAgK
Line Number => 1
Label => precise_server
Enabled => true
Template => linux_deploy
Description => Policy for deploying a Linux-
based operating system.
Tags => [nics_2]
Model Label => install_precise_server
Broker Target => allinone
Currently Bound => 0
Maximum Bound => 0
Bound Counter => 0
38. Boot VM
Create new VM
Make sure it has 2 nics, both on private network
2 GB memory
80 GB disk
on VirtualBox, set boot order
Connect to real internets, otherwise chef client will not
install
40. All in one OpenStack on
your VM
If all goes well, OpenStack should be running or
your new VM
Try setting up additional policies, and deploy
different VMs
43. Rackspace Private Cloud
currently Folsom release (v3.0.1)
open source Chef 11 server embedded
http://www.rackspace.com/cloud/private/
https://github.com/rcbops
https://github.com/rcbops-cookbooks/