Created
July 29, 2013 07:54
-
-
Save erikh/6102748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'furnish/dsl' | |
require 'furnish/orchestration/ubuntu' | |
Furnish.provision do | |
# provisioning group | |
group :import_box do | |
add :virtualbox_import do | |
ova_file File.expand_path("~/box-test.ova") | |
vm_name "my_box" | |
end | |
end | |
group :chef_server do | |
depends :import_box | |
# driver scopes things in a specific furnish module | |
driver :virtualbox do | |
add :hostonly | |
add :machine do | |
clone_vm "my_box" | |
# FIXME shouldn't need this | |
network_orchestrator Furnish::Orchestration::Ubuntu.new(:username => "erikh", :password => "erikh", :sudo_password => "erikh") | |
end | |
end | |
end | |
group :chef_clients do | |
# depend on a previously defined provision | |
depends :import_box | |
depends :chef_server | |
# unscoped usage -- same idea as above, only _ is coerced into a deeper | |
# namespace | |
add :virtualbox_hostonly | |
add :virtualbox_machine do | |
clone_vm "my_box" | |
count 5 # 5 machines | |
port_range (2210..2220) | |
# these are ubuntu machines -- orchestrators are a bit magical right now | |
# and I hope to improve that soon. | |
network_orchestrator Furnish::Orchestration::Ubuntu.new(:username => "erikh", :password => "erikh", :sudo_password => "erikh") | |
end | |
end | |
# will wait for this provision to complete before returning control to the program | |
wait_for :chef_clients | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment