SlideShare a Scribd company logo
Bare Metal to OpenStack
with Razor and Chef
Egle Sigler, Rackspace
Matt Ray, Opscode
Agenda


Razor Introduction and Overview

Razor demonstration

OpenStack cookbook walkthrough
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
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
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
Fusion Network 1
Fusion Network 2
Fusion Network 2 Preferences
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
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
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
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
Razor State of Things
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
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
Bright and Shiny Future


After v1.0:

  Windows support

  maybe AIX and Solaris support
Connecting to Razor VM

VirtualBox:

  ssh -p 2223 localhost

VMware Fusion:

  get IP and ssh to it
Hands On Razor


User name: anystacker

Password: razor

Switch to root.
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
ifconfig
root@razor:~# ifconfig

eth1     Link encap:Ethernet HWaddr 00:0c:29:aa:f9:65
inet addr:172.16.16.1 Bcast:172.16.16.255 Mask:
255.255.255.0
inet6 addr: fe80::20c:29ff:feaa:f965/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:7525 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:677489 (677.4 KB) TX bytes:2362 (2.3 KB)
Razor Commands

add MikroKernel

add Image

add Model

add Policy

add Broker
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
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
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
Model

 Map image to built-in template



razor model add template -t ubuntu_precise -
l install_precise_server -i
36Lrq9JMiRwvrw5rSruSjg
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
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)
 >
Model


Model created
 Label => install_precise_server
 Template => linux_deploy
 Description => Ubuntu Precise Model
 UUID => 5VShcTIkmqrCXGUBM3UwLI
 Image UUID => 36Lrq9JMiRwvrw5rSruSjg
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
Razor Brokers


Puppet

Chef

Script
Brokers


root@razor:~# razor broker plugin

Available Broker Plugins:
Plugin        Description
chef    Opscode Chef
puppet PuppetLabs PuppetMaster
Puppet Broker


If you use Puppet, use it.

Puppet Master hostname

Puppet version
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
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)
Add Broker


razor broker add -p chef -n allinone -d
openstack_allinone
--- Building Broker (chef):

... lots of stuff
Add Broker to Policy



razor policy add -p linux_deploy -l
precise_server -m 5VShcTIkmqrCXGUBM3UwLI   -
t nics_2 --enabled true
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
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
anystacker.com
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
Agenda


Razor Introduction and Overview

Razor demonstration

OpenStack cookbook walkthrough
Agenda


Razor Introduction and Overview

Razor demonstration

OpenStack cookbook walkthrough
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/
Rackspace Private Cloud
Rackspace Private Cloud

github.com/rcbops/chef-cookbooks/tree/v3.0.1

roles/

environments/

cookbooks/
cookbooks/
apache2/             monit/
apt/                 monitoring/
aws/                 mysql/
build-essential/     mysql-openstack/
cinder/              nova/
collectd/            nova-network/
collectd-graphite/   ntp/
collectd-plugins/    openssh/
corosync/            openssl/
database/            openstack-ha/
dsh/                 osops-utils/
erlang/              postgresql/
exerstack/           rabbitmq/
glance/              rabbitmq-openstack/
graphite/            rsyslog/
haproxy/             runit/
hardware/            selinux/
horizon/             sosreport/
keepalived/          swift/
keystone/            sysctl/
kong/                xfs/
memcached/           yum/
modules/
environments/example.json
{
    "name": "example_environment",
    "description": "Chef-server example environment",
    "cookbook_versions": {
    },
    "json_class": "Chef::Environment",
    "chef_type": "environment",
    "default_attributes": {
    },
    "override_attributes": {
      "developer_mode": false,
      "monitoring" : {
         "metric_provider" : "collectd",
         "procmon_provider" : "monit"
       },
      "glance": {
         "image_upload": true,
         "images": ["cirros", "precise"]
       },
environments/example.json
"nova": {
  "ratelimit" : {
     "api" : { "enabled" : true },
     "volume" : { "enabled" : true }
   },
  "libvirt": { "virt_type": "qemu" },
  "networks": [
      {
         "label": "public",
         "ipv4_cidr": "10.10.100.0/24",
         "num_networks": "1",
         "network_size": "255",
         "bridge": "br100",
         "bridge_dev": "eth0.100",
         "dns1": "8.8.8.8",
         "dns2": "8.8.4.4"
      },
      {
         "label": "private",
         "ipv4_cidr": "172.16.101.0/24",
         "num_networks": "1",
         "network_size": "255",
         "bridge": "br101",
         "bridge_dev": "eth0.101",
         "dns1": "8.8.8.8",
         "dns2": "8.8.4.4"
      }
   ]
},
environments/example.json

        "mysql": {
          "allow_remote_root": true,
          "root_network_acl": "%"
        },
        "osops_networks": {
          "nova": "192.168.1.0/24",
          "public": "192.168.1.0/24",
          "management": "192.168.1.0/24"
        },
        "package_component": "folsom"
    }
}
roles/
allinone.rb               nova-api-ec2.rb
base.rb                   nova-api-os-compute.rb
cinder-all.rb             nova-api.rb
cinder-api.rb             nova-cert.rb
cinder-scheduler.rb       nova-controller.rb
cinder-setup.rb           nova-misc-services.rb
cinder-volume.rb          nova-network-compute.rb
collectd-client.rb        nova-network-controller.rb
collectd-server.rb        nova-network.rb
glance-api.rb             nova-scheduler.rb
glance-registry.rb        nova-setup.rb
glance-setup.rb           nova-vncproxy.rb
glance.rb                 nova-volume.rb
graphite.rb               openstack-ha.rb
ha-controller1.rb         quantum-network-manager.rb
ha-controller2.rb         rabbitmq-server.rb
haproxy.rb                rsyslog-client.rb
horizon-server.rb         rsyslog-server.rb
jenkins-allinone.rb       single-compute.rb
jenkins-compute.rb        single-controller.rb
jenkins-controller.rb     swift-account-server.rb
jenkins-glance.rb         swift-all-in-one.rb
jenkins-mysql-master.rb   swift-container-server.rb
jenkins-nova-api.rb       swift-management-server.rb
keystone-api.rb           swift-object-server.rb
keystone.rb               swift-proxy-server.rb
mysql-master.rb           swift-setup.rb
roles/allinone.rb
name "allinone"
description "This will create an all-in-
one Openstack cluster"
run_list(
  "role[single-controller]",
  "role[single-compute]"
)
expanded run list
osops-utils::packages, openssh, ntp, sosreport,
rsyslog::default, hardware, osops-
utils::default, mysql-openstack::server,
erlang::default, rabbitmq-openstack::server,
keystone::server, keystone::keystone-api,
glance::setup, glance::registry, glance::api,
nova::nova-setup, nova-network::nova-controller,
nova::scheduler, nova::api-ec2, nova::api-os-
compute, nova::volume, nova::nova-cert,
nova::vncproxy, mysql::client, mysql::ruby,
horizon::server, nova-network::nova-compute,
nova::compute
roles/single-controller
name "single-controller"
description "Nova Controller (non-HA)"
run_list(
  "role[base]",
  "role[mysql-master]",
  "role[rabbitmq-server]",
  "role[keystone]",
  "role[glance-setup]",
  "role[glance-registry]",
  "role[glance-api]",
  "role[nova-setup]",
  "role[nova-network-controller]",
  "role[nova-scheduler]",
  "role[nova-api-ec2]",
  "role[nova-api-os-compute]",
  "role[nova-volume]",
  "role[nova-cert]",
  "role[nova-vncproxy]",
  "role[horizon-server]"
)
roles/base
name "base"
description "Base role for a server"
run_list(
  "recipe[osops-utils::packages]",
  "recipe[openssh]",
  "recipe[ntp]",
  "recipe[sosreport]",
  "recipe[rsyslog::default]",
  "recipe[hardware]",
  "recipe[osops-utils::default]"
)
default_attributes(
  "ntp" => {
    "servers" => ["0.pool.ntp.org", "1.pool.ntp.org",
"2.pool.ntp.org"]
  }
)
roles/mysql-master
name "mysql-master"
description "Installs mysql and sets up
replication (if 2 nodes with role)"
run_list(
  "role[base]",
  "recipe[mysql-openstack::server]"
)
roles/rabbitmq-server
name "rabbitmq-server"
description "RabbitMQ Server (non-ha)"
run_list(
  "role[base]",
  "recipe[erlang::default]",
  "recipe[rabbitmq-openstack::server]"
)
roles/keystone
name "keystone"
description "Keystone server"
run_list(
  "role[base]",
  "recipe[keystone::server]",
  "role[keystone-api]"
)
roles/glance-setup
name "glance-setup"
description "sets up glance registry db
and passwords"
run_list(
  "role[base]",
  "recipe[glance::setup]"
)
roles/glance-registry
name "glance-registry"
description "Glance Registry server"
run_list(
  "role[base]",
  "recipe[glance::registry]"
)
roles/glance-api
name "glance-api"
description "Glance API server"
run_list(
  "role[base]",
  "recipe[glance::api]"
)
roles/nova-setup
name "nova-setup"
description "Where the setup operations
for nova get run"
run_list(
  "recipe[nova::nova-setup]"
)
/nova-network-controller
name "nova-network-controller"
description "Setup nova-networking for
controller node"
run_list(
  "recipe[nova-network::nova-
controller]"
)
roles/nova-scheduler
name "nova-scheduler"
description "Nova scheduler"
run_list(
  "role[base]",
  "recipe[nova::scheduler]"
)
roles/nova-api-ec2
name "nova-api-ec2"
description "Nova API EC2"
run_list(
  "role[base]",
  "recipe[nova::api-ec2]"
)
/nova-api-os-compute
name "nova-api-os-compute"
description "Nova API for Compute"
run_list(
  "role[base]",
  "recipe[nova::api-os-compute]"
)
roles/nova-volume
name "nova-volume"
description "Nova Volume Service"
run_list(
  "role[base]",
  "recipe[nova::volume]"
)
roles/nova-cert
name "nova-cert"
description "Nova Certificate Service"
run_list(
  "role[base]",
  "recipe[nova::nova-cert]"
)
roles/nova-vncproxy
name "nova-vncproxy"
description "Nova VNC Proxy"
run_list(
  "role[base]",
  "recipe[nova::vncproxy]"
)
roles/horizon-server
name "horizon-server"
description "Horizon server"
run_list(
  "role[base]",
  "recipe[mysql::client]",
  "recipe[mysql::ruby]",
  "recipe[horizon::server]"
)
roles/single-compute
name "single-compute"
description "Nova compute (with non-HA
Controller)"
run_list(
  "role[base]",
  "role[nova-network-compute]",
  "recipe[nova::compute]"
)
Thanks!

Egle Sigler

egle.sigler@rackspace.com



Matt Ray

matt@opscode.com

More Related Content

PDF
The state of the swarm
PDF
Docker - From Walking To Running
ODP
Docker - The Linux Container
PDF
Shipping Applications to Production in Containers with Docker
PDF
Docker From Scratch
PPTX
Docker on openstack by OpenSource Consulting
PDF
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
PDF
Docker and Containers for Development and Deployment — SCALE12X
The state of the swarm
Docker - From Walking To Running
Docker - The Linux Container
Shipping Applications to Production in Containers with Docker
Docker From Scratch
Docker on openstack by OpenSource Consulting
Deploying Docker (Provisioning /w Docker + Chef/Puppet) - DevopsDaysPGH
Docker and Containers for Development and Deployment — SCALE12X

What's hot (20)

PPTX
Installaling Puppet Master and Agent
PDF
Docker by Example - Basics
PDF
How to operate containerized OpenStack
PDF
Introduction openstack-meetup-nov-28
PPTX
Docker toolbox
PDF
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
PDF
Docker - introduction
PDF
Docker Introduction
PDF
Docker from A to Z, including Swarm and OCCS
PDF
Orchestrating Docker with OpenStack
PDF
Introduction to Docker and deployment and Azure
PDF
Docker worshop @Twitter - How to use your own private registry
PDF
OpenStack - Docker - Rackspace HQ
PDF
Running Docker with OpenStack | Docker workshop #1
PDF
Docker introduction
PPTX
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Package your Java EE Application using Docker and Kubernetes
PDF
Ansible docker
PPTX
Docker Ecosystem on Azure
PDF
Introduction To Docker
Installaling Puppet Master and Agent
Docker by Example - Basics
How to operate containerized OpenStack
Introduction openstack-meetup-nov-28
Docker toolbox
Deploying containers and managing them on multiple Docker hosts, Docker Meetu...
Docker - introduction
Docker Introduction
Docker from A to Z, including Swarm and OCCS
Orchestrating Docker with OpenStack
Introduction to Docker and deployment and Azure
Docker worshop @Twitter - How to use your own private registry
OpenStack - Docker - Rackspace HQ
Running Docker with OpenStack | Docker workshop #1
Docker introduction
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Package your Java EE Application using Docker and Kubernetes
Ansible docker
Docker Ecosystem on Azure
Introduction To Docker
Ad

Viewers also liked (20)

PDF
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
PPTX
Route maps
PDF
Escalating complexity: DevOps learnings from Air France 447
PDF
Barva - Ti corona mga_5046
PDF
Seven Ineffective Coding Habits of Many Programmers
PPT
PPT
CCIE Lab - IGP Routing
PDF
Evolution of CloudStack Architecture (Collab 2012)
PDF
Futures Trading Strategies on SGX - India chapter in AFACT in Singapore
PPT
5 Storia Della Scenografia, Il Rinascimento, Parte B
PPTX
DPDK KNI interface
PPTX
PDF
[Webinar Slides] Programming the Network Dataplane in P4
PPT
La gestión de los recursos humanos
PPT
8237 / 8257 DMA
PDF
Design and Performance Characteristics of Tap-as-a-Service
PDF
Portfolio Planning in Higher Education Industry
PPTX
Understanding DPDK algorithmics
PPTX
Squeezing Deep Learning Into Mobile Phones
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
Route maps
Escalating complexity: DevOps learnings from Air France 447
Barva - Ti corona mga_5046
Seven Ineffective Coding Habits of Many Programmers
CCIE Lab - IGP Routing
Evolution of CloudStack Architecture (Collab 2012)
Futures Trading Strategies on SGX - India chapter in AFACT in Singapore
5 Storia Della Scenografia, Il Rinascimento, Parte B
DPDK KNI interface
[Webinar Slides] Programming the Network Dataplane in P4
La gestión de los recursos humanos
8237 / 8257 DMA
Design and Performance Characteristics of Tap-as-a-Service
Portfolio Planning in Higher Education Industry
Understanding DPDK algorithmics
Squeezing Deep Learning Into Mobile Phones
Ad

Similar to Bare Metal to OpenStack with Razor and Chef (20)

PDF
Automation day red hat ansible
PDF
Automação do físico ao NetSecDevOps
PDF
Postgres the hardway
PDF
Automating Container Deployments on Virtualization with Ansible: OpenShift on...
PDF
One-Man Ops
PDF
Continuous Delivery: The Next Frontier
PPTX
Network Automation Tools
PDF
Preparation study of_docker - (MOSG)
PDF
Build Automation 101
PDF
Kubernetes for the PHP developer
PDF
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
ODP
Puppet and Apache CloudStack
PDF
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
PDF
Web Applications with Eclipse RT and Docker in the Cloud
PDF
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
PDF
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
PDF
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
PDF
Dessi docker kubernetes paas cloud
PDF
Agile Brown Bag - Vagrant & Docker: Introduction
PPTX
Couch to OpenStack: Nova - July, 30, 2013
Automation day red hat ansible
Automação do físico ao NetSecDevOps
Postgres the hardway
Automating Container Deployments on Virtualization with Ansible: OpenShift on...
One-Man Ops
Continuous Delivery: The Next Frontier
Network Automation Tools
Preparation study of_docker - (MOSG)
Build Automation 101
Kubernetes for the PHP developer
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
Puppet and Apache CloudStack
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Web Applications with Eclipse RT and Docker in the Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Dessi docker kubernetes paas cloud
Agile Brown Bag - Vagrant & Docker: Introduction
Couch to OpenStack: Nova - July, 30, 2013

More from Matt Ray (20)

PDF
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
PDF
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
PDF
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
PDF
HashiTalks 2020 - Chef Tools & Terraform: Better Together
PDF
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
PDF
Wellington DevOps: Bringing Your Applications into the Future with Habitat
PDF
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
PDF
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
PDF
Compliance as Code Everywhere
PDF
DevOpsDays Jakarta: State of DevOps 2018
PDF
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
PDF
Infrastructure and Compliance Delight with Chef Automate
PDF
Cooking Up Windows with Chef Automate
PDF
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
PDF
DevOpsDays Singapore Habitat Ignite
PDF
Chef Automate - Azure Sydney User Group
PDF
Automating Compliance with InSpec - AWS North Sydney
PDF
Automating Applications with Habitat - Sydney Cloud Native Meetup
PDF
Automating AWS Compliance with InSpec
PDF
Chef Automate - Infracoders Canberra August 8, 2017
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
HashiTalks 2020 - Chef Tools & Terraform: Better Together
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
Wellington DevOps: Bringing Your Applications into the Future with Habitat
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Compliance as Code Everywhere
DevOpsDays Jakarta: State of DevOps 2018
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
Infrastructure and Compliance Delight with Chef Automate
Cooking Up Windows with Chef Automate
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore Habitat Ignite
Chef Automate - Azure Sydney User Group
Automating Compliance with InSpec - AWS North Sydney
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating AWS Compliance with InSpec
Chef Automate - Infracoders Canberra August 8, 2017

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
A Presentation on Artificial Intelligence
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Modernizing your data center with Dell and AMD
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
A Presentation on Artificial Intelligence
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Advanced methodologies resolving dimensionality complications for autism neur...
Per capita expenditure prediction using model stacking based on satellite ima...
Modernizing your data center with Dell and AMD
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
The Rise and Fall of 3GPP – Time for a Sabbatical?

Bare Metal to OpenStack with Razor and Chef

  • 1. Bare Metal to OpenStack with Razor and Chef Egle Sigler, Rackspace Matt Ray, Opscode
  • 2. Agenda Razor Introduction and Overview Razor demonstration OpenStack cookbook walkthrough
  • 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
  • 8. Fusion Network 2 Preferences
  • 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
  • 13. Razor State of Things
  • 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
  • 18. Hands On Razor User name: anystacker Password: razor Switch to root.
  • 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
  • 20. ifconfig root@razor:~# ifconfig eth1 Link encap:Ethernet HWaddr 00:0c:29:aa:f9:65 inet addr:172.16.16.1 Bcast:172.16.16.255 Mask: 255.255.255.0 inet6 addr: fe80::20c:29ff:feaa:f965/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7525 errors:0 dropped:0 overruns:0 frame:0 TX packets:19 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:677489 (677.4 KB) TX bytes:2362 (2.3 KB)
  • 21. Razor Commands add MikroKernel add Image add Model add Policy add Broker
  • 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
  • 31. Brokers root@razor:~# razor broker plugin Available Broker Plugins: Plugin Description chef Opscode Chef puppet PuppetLabs PuppetMaster
  • 32. Puppet Broker If you use Puppet, use it. Puppet Master hostname Puppet version
  • 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
  • 41. Agenda Razor Introduction and Overview Razor demonstration OpenStack cookbook walkthrough
  • 42. Agenda Razor Introduction and Overview Razor demonstration OpenStack cookbook walkthrough
  • 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/
  • 46. cookbooks/ apache2/ monit/ apt/ monitoring/ aws/ mysql/ build-essential/ mysql-openstack/ cinder/ nova/ collectd/ nova-network/ collectd-graphite/ ntp/ collectd-plugins/ openssh/ corosync/ openssl/ database/ openstack-ha/ dsh/ osops-utils/ erlang/ postgresql/ exerstack/ rabbitmq/ glance/ rabbitmq-openstack/ graphite/ rsyslog/ haproxy/ runit/ hardware/ selinux/ horizon/ sosreport/ keepalived/ swift/ keystone/ sysctl/ kong/ xfs/ memcached/ yum/ modules/
  • 47. environments/example.json { "name": "example_environment", "description": "Chef-server example environment", "cookbook_versions": { }, "json_class": "Chef::Environment", "chef_type": "environment", "default_attributes": { }, "override_attributes": { "developer_mode": false, "monitoring" : { "metric_provider" : "collectd", "procmon_provider" : "monit" }, "glance": { "image_upload": true, "images": ["cirros", "precise"] },
  • 48. environments/example.json "nova": { "ratelimit" : { "api" : { "enabled" : true }, "volume" : { "enabled" : true } }, "libvirt": { "virt_type": "qemu" }, "networks": [ { "label": "public", "ipv4_cidr": "10.10.100.0/24", "num_networks": "1", "network_size": "255", "bridge": "br100", "bridge_dev": "eth0.100", "dns1": "8.8.8.8", "dns2": "8.8.4.4" }, { "label": "private", "ipv4_cidr": "172.16.101.0/24", "num_networks": "1", "network_size": "255", "bridge": "br101", "bridge_dev": "eth0.101", "dns1": "8.8.8.8", "dns2": "8.8.4.4" } ] },
  • 49. environments/example.json "mysql": { "allow_remote_root": true, "root_network_acl": "%" }, "osops_networks": { "nova": "192.168.1.0/24", "public": "192.168.1.0/24", "management": "192.168.1.0/24" }, "package_component": "folsom" } }
  • 50. roles/ allinone.rb nova-api-ec2.rb base.rb nova-api-os-compute.rb cinder-all.rb nova-api.rb cinder-api.rb nova-cert.rb cinder-scheduler.rb nova-controller.rb cinder-setup.rb nova-misc-services.rb cinder-volume.rb nova-network-compute.rb collectd-client.rb nova-network-controller.rb collectd-server.rb nova-network.rb glance-api.rb nova-scheduler.rb glance-registry.rb nova-setup.rb glance-setup.rb nova-vncproxy.rb glance.rb nova-volume.rb graphite.rb openstack-ha.rb ha-controller1.rb quantum-network-manager.rb ha-controller2.rb rabbitmq-server.rb haproxy.rb rsyslog-client.rb horizon-server.rb rsyslog-server.rb jenkins-allinone.rb single-compute.rb jenkins-compute.rb single-controller.rb jenkins-controller.rb swift-account-server.rb jenkins-glance.rb swift-all-in-one.rb jenkins-mysql-master.rb swift-container-server.rb jenkins-nova-api.rb swift-management-server.rb keystone-api.rb swift-object-server.rb keystone.rb swift-proxy-server.rb mysql-master.rb swift-setup.rb
  • 51. roles/allinone.rb name "allinone" description "This will create an all-in- one Openstack cluster" run_list( "role[single-controller]", "role[single-compute]" )
  • 52. expanded run list osops-utils::packages, openssh, ntp, sosreport, rsyslog::default, hardware, osops- utils::default, mysql-openstack::server, erlang::default, rabbitmq-openstack::server, keystone::server, keystone::keystone-api, glance::setup, glance::registry, glance::api, nova::nova-setup, nova-network::nova-controller, nova::scheduler, nova::api-ec2, nova::api-os- compute, nova::volume, nova::nova-cert, nova::vncproxy, mysql::client, mysql::ruby, horizon::server, nova-network::nova-compute, nova::compute
  • 53. roles/single-controller name "single-controller" description "Nova Controller (non-HA)" run_list( "role[base]", "role[mysql-master]", "role[rabbitmq-server]", "role[keystone]", "role[glance-setup]", "role[glance-registry]", "role[glance-api]", "role[nova-setup]", "role[nova-network-controller]", "role[nova-scheduler]", "role[nova-api-ec2]", "role[nova-api-os-compute]", "role[nova-volume]", "role[nova-cert]", "role[nova-vncproxy]", "role[horizon-server]" )
  • 54. roles/base name "base" description "Base role for a server" run_list( "recipe[osops-utils::packages]", "recipe[openssh]", "recipe[ntp]", "recipe[sosreport]", "recipe[rsyslog::default]", "recipe[hardware]", "recipe[osops-utils::default]" ) default_attributes( "ntp" => { "servers" => ["0.pool.ntp.org", "1.pool.ntp.org", "2.pool.ntp.org"] } )
  • 55. roles/mysql-master name "mysql-master" description "Installs mysql and sets up replication (if 2 nodes with role)" run_list( "role[base]", "recipe[mysql-openstack::server]" )
  • 56. roles/rabbitmq-server name "rabbitmq-server" description "RabbitMQ Server (non-ha)" run_list( "role[base]", "recipe[erlang::default]", "recipe[rabbitmq-openstack::server]" )
  • 57. roles/keystone name "keystone" description "Keystone server" run_list( "role[base]", "recipe[keystone::server]", "role[keystone-api]" )
  • 58. roles/glance-setup name "glance-setup" description "sets up glance registry db and passwords" run_list( "role[base]", "recipe[glance::setup]" )
  • 59. roles/glance-registry name "glance-registry" description "Glance Registry server" run_list( "role[base]", "recipe[glance::registry]" )
  • 60. roles/glance-api name "glance-api" description "Glance API server" run_list( "role[base]", "recipe[glance::api]" )
  • 61. roles/nova-setup name "nova-setup" description "Where the setup operations for nova get run" run_list( "recipe[nova::nova-setup]" )
  • 62. /nova-network-controller name "nova-network-controller" description "Setup nova-networking for controller node" run_list( "recipe[nova-network::nova- controller]" )
  • 63. roles/nova-scheduler name "nova-scheduler" description "Nova scheduler" run_list( "role[base]", "recipe[nova::scheduler]" )
  • 64. roles/nova-api-ec2 name "nova-api-ec2" description "Nova API EC2" run_list( "role[base]", "recipe[nova::api-ec2]" )
  • 65. /nova-api-os-compute name "nova-api-os-compute" description "Nova API for Compute" run_list( "role[base]", "recipe[nova::api-os-compute]" )
  • 66. roles/nova-volume name "nova-volume" description "Nova Volume Service" run_list( "role[base]", "recipe[nova::volume]" )
  • 67. roles/nova-cert name "nova-cert" description "Nova Certificate Service" run_list( "role[base]", "recipe[nova::nova-cert]" )
  • 68. roles/nova-vncproxy name "nova-vncproxy" description "Nova VNC Proxy" run_list( "role[base]", "recipe[nova::vncproxy]" )
  • 69. roles/horizon-server name "horizon-server" description "Horizon server" run_list( "role[base]", "recipe[mysql::client]", "recipe[mysql::ruby]", "recipe[horizon::server]" )
  • 70. roles/single-compute name "single-compute" description "Nova compute (with non-HA Controller)" run_list( "role[base]", "role[nova-network-compute]", "recipe[nova::compute]" )