Skip to content

Instantly share code, notes, and snippets.

Created Dec 23, 2013
What would you like to do?
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Ruby hash to specify the hostname and desired fourth octet
# Cannot currently specify the IP. So, octet value is unused
nodes = {
'master' => 200,
'node1' => 210,
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# The "dummy" value is just a placeholder as explained
# in Mitchell's notes = "dummy"
# Specify your ssh private key for remote access
config.ssh.private_key_path = "~/.ssh/id_rsa"
# Use an "each" loop to build multiple VMs
nodes.each do |node, fourth_octet|
config.vm.define "#{node}" do |box|
config.vm.provider :rackspace do |rs|
rs.username = "vmtrooper"
# API key is used instead of a password
rs.api_key = "ffffffffff8675309ffffffffffffffffffff"
# Server sizing determined by RAM assigned
rs.flavor = /1 GB/
# Multiple flavors of Linux and
# versions of Windows are available
rs.image = /Ubuntu 13.10/
# Specify your ssh public key to access the VM
rs.public_key_path = "~/.ssh/"
# Valid region values are :dfw :ord :iad :lon :syd
rs.rackspace_region = :dfw
# Network MUST reside in the same region as your servers
# Get the network uuid using "nova network-list" 'ffffffffff-ffff-ffff-b77c-fffffffffff'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment