Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

benburkert/razor-vagrant-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

razor-vagrant-demo

A demo of Razor using Vagrant.

Demo

This is a demo using Vagrant of Puppet Lab's Razor introduction.

Step 1: Setup

First install VirtualBox and the VirtualBox Extension Pack. Next bundle & boot the servers:

$ bundle install
$ bundle exec rake start

The gold server will boot first and kick off a puppet run. This will install razor and setup dhcp on the internal VM network. Once the gold server finished the agent1 box will boot. agent1 initially fails to PXE boot because razor is not configured with a microkernel.

MicroKernel Missing

Step 2: Register a MicroKernel

$ bundle exec rake microkernel

The microkernel rake task downloads and registers the razor microkernel. At this point agent1 will boot the microkernel.

MicroKernel Console

The agent1 server will register itself with razor. We can inspect it via the razor node command.

$ bundle exec vagrant ssh gold
$ sudo su -
$ cd /opt/razor
$ bin/razor node

razor node

The razor node attributes command will show the attributes of agent1.

$ bin/razor node attributes ...

razor node attributes

Step 3: Register an OS

Run the ubuntu rake task to download and register Ubuntu Precise 12.04 Server with razor. This may take a while.

$ bundle exec rake ubuntu

List the registered OS images via razor image.

$ bundle exec vagrant ssh gold
$ sudo su -
$ cd /opt/razor
$ bin/razor image

razor image

Step 4: Create a Model

Add a model for ubuntu\_precise with the new image.

$ bin/razor model add template=ubuntu_precise label=install_precise image_uuid=...

razor model add

Step 5: Add a Policy

Create a policy to install ubuntu on agent1.

$ bin/razor policy add --template=linux_deploy --label=precise --broker-uuid=none --tags=virtualbox_vm --enabled --model-uuid=...

razor policy add

Step 6: Ubuntu

On the next checkin by agent1 the server will reboot. Instead of booting the microkernel, razor serves agent1 the Ubuntu installer.

Ubuntu Installer

Once that finishes you can login as root with your password.

Ubuntu Console

Step 7: Cleanup

Run vagrant destroy to cleanup everything.

$ bundle exec vagrant destroy --force

About

A demo of Razor using Vagrant.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published