Skip to content

Instantly share code, notes, and snippets.

@hhoover
Created July 27, 2014 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hhoover/996191094b22cb441234 to your computer and use it in GitHub Desktop.
Save hhoover/996191094b22cb441234 to your computer and use it in GitHub Desktop.
machine 'mysql-master' do
machine_options ssh_username: 'root',
bootstrap_options: {
key_name: 'id_rsa',
flavor_id: 'onmetal-io1',
image_id: 'd22ea57e-e12e-4a0a-ad6b-680dd676fd7c'
}
recipe 'apt'
recipe 'mysql::server'
tag 'database'
end
num_web = 10
machine_batch do
1.upto(num_web) do |i|
machine "web-#{i}" do
machine_options ssh_username: 'root',
bootstrap_options: {
key_name: 'id_rsa',
flavor_id: 'onmetal-compute1',
image_id: 'd22ea57e-e12e-4a0a-ad6b-680dd676fd7c'
}
recipe 'apt'
recipe 'apache2'
tag 'web'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment