Coder Social home page Coder Social logo

razor-vagrant-lab's Introduction

Razor Vagrant Lab

Initial Setup

Download and install the following on your workstation:

  1. VirtualBox (currently tested on version 4.2.4 on Mac)
  2. VirtualBox Oracle VM VirtualBox Extension Pack (needed for PXE booting support)
  3. Vagrant (package install, version 1.1.0 or higher)
  4. vagrant-berkshelf plugin (needed to resolve and use cookbooks)
  5. vagrant-omnibus plugin (needed to install Chef on the Vagrant VMs)

Note: please ensure that VirtualBox's DHCP server is not running, otherwise the razor client nodes may recieve IP address in the 192.168.0.0. range:

VBoxManage list dhcpservers                          # should show no dhcp servers
VBoxManage dhcpserver remove --netname NETWORK_NAME  # otherwise, run this

Now clone this project repo to your workstation.

All you should have to type in the project directory is:

$ ./script/bootstrap

Follow any directions given and possibly re-run the bootstrap script.

Usage

Starting The Razor Node

$ vagrant up razor

Starting The Chef Server (Optional)

$ vagrant up chef

Starting The Puppet Master Server (Optional)

$ vagrant up puppet

Setting Up A Sample Razor Configuration

To see Razor in action, several "slices" have to be set up in order to execute a policy on a node. Several quickstart examples have been provided which will set up all nodes to install Ubuntu 12.04 LTS. To run the script, login to the razor node and become the root user:

$ vagrant ssh razor
$ sudo su - root

Chef Broker Configuration

This will set up a Chef broker to run after nodes are provisioned. Run it from the Vagrant-provided mount:

$ /vagrant/contrib/razor_for_chef_ubuntu.sh

For a list of configuration overrides (such as the ISO download URL), please run:

$ /vagrant/contrib/razor_for_chef_ubuntu.sh help

Puppet Broker Configuration

This will set up a Puppet broker to run after nodes are provisioned. Run it from the Vagrant-provided mount:

$ /vagrant/contrib/razor_for_puppet_ubuntu.sh

For a list of configuration overrides (such as the ISO download URL), please run:

$ /vagrant/contrib/razor_for_puppet_ubuntu.sh help

Brokerless Configuration

This will set up a basic setup with no brokers running. Run it from the Vagrant-provided mount:

$ /vagrant/contrib/razor_for_bare_ubuntu.sh

For a list of configuration overrides (such as the ISO download URL), please run:

$ /vagrant/contrib/razor_for_bare_ubuntu.sh help

Starting A Razor Client Node

$ vagrant up node1

There are by default 3 nodes available (i.e. node1, node2, node3), but you can set a higher/lower number by setting RAZOR_NODES=10 in your shell environment:

$ export RAZOR_NODES=10
$ vagrant status
Current VM states:

razor                    running
chef                     not_created
puppet                   not_created
node1                    not created
node2                    not created
node3                    not created
node4                    not created
node5                    not created
node6                    not created
node7                    not created
node8                    not created
node9                    not created
node10                   not created

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

Starting The Entire Cluster

$ vagrant up

Vagrant Base Boxes

The base boxes were built with the VeeWee gem. The Razor and Puppet nodes are using an Opscode provided Ubuntu 12.04 base box, built from VeeWee definitions in a project called Bento. To simulate unprovisioned bare metal instances, a special base box called blank-amd64 was created and was built from VeeWee definitions in a project called veewee-definitions.

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make.

License and Author

Author:: Fletcher Nichol ([email protected])

Copyright 2012, Blue Box Group, LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

razor-vagrant-lab's People

Contributors

echohead avatar fnichol avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.