-
-
Save erikh/21ebcc5dc93dbf198027 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
Furnish::DSL.provision do | |
# provisioning group | |
group :provision1 do | |
# driver scopes things in a specific furnish module | |
driver :virtualbox do | |
# this just constructs a Furnish::Provisioner::VirtualBox::Import and | |
# schedules it in the group for when the provision starts. Adds it to the | |
# bottom of the stack for ordering purposes. | |
add :import do | |
image "my_box.ova" | |
end | |
add :hostonly do | |
subnet "10.0.1.0/24" | |
end | |
add :machine do | |
clone "my_box" | |
network_orchestrator :ubuntu | |
end | |
end | |
add :chef11server | |
end | |
group :provision2 do | |
# depend on a previously defined provision | |
depends :provision1 | |
# unscoped usage -- same idea as above, only _ is coerced into a deeper | |
# namespace | |
add :virtualbox_import do | |
image "my_box.ova" | |
end | |
add :virtualbox_hostonly do | |
subnet "10.0.1.0/24" | |
end | |
add :virtualbox_machine do | |
clone "my_box" | |
count 5 # 5 machines | |
# these are ubuntu machines -- orchestrators are a bit magical right now | |
# and I hope to improve that soon. | |
network_orchestrator :ubuntu | |
end | |
end | |
# driver classes set up defaults for a specific driver | |
driver_class :single_hostonly, :virtualbox do | |
add :import do | |
image "my_box.ova" | |
end | |
add :hostonly do | |
subnet "10.0.1.0/24" | |
end | |
add :machine do | |
clone "my_box" | |
network_orchestrator :ubuntu | |
end | |
end | |
# let's make another chef server | |
group :provision3 do | |
# no depends so provision1 and provision3 will be in parallel | |
use_class :single_hostonly | |
add :chef11server | |
end | |
wait_for :provision2 # do not continue anything until provision2 completes | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment