Last active
January 3, 2016 15:29
-
-
Save zeroDivisible/8483145 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'json' | |
Vagrant.configure("2") do |config| | |
config.vm.box = "devvm-centos6.4" | |
ACTIVEMQ_HOME = '/usr/local/' | |
# default configuration for the machines, instead of being kept in this file, is saved somewhere | |
VAGRANT_JSON = JSON.parse(Pathname(__FILE__).dirname.join('nodes', 'vagrant.json').read) | |
config.vm.provision :chef_solo do |chef| | |
chef.log_level = :debug | |
chef.cookbooks_path = ['site-cookbooks', 'cookbooks'] # site-cookbooks are first, to allow picking overrides | |
chef.data_bags_path = "data_bags" | |
chef.roles_path = "roles" | |
chef.add_role "server-database" | |
chef.json = VAGRANT_JSON | |
end | |
# machines are booted in order in which they are defined | |
# PostgreSQL vm's | |
config.vm.define :db01 do |db_conf| | |
db_conf.vm.hostname = "db01" | |
db_conf.vm.network :private_network, ip: "192.168.10.10" | |
db_conf.vm.provision :chef_solo do |chef| | |
chef.run_list = [ | |
"role[server-database]" | |
] | |
end | |
end | |
# ActiveMQ vm's | |
config.vm.define :amq1 do |amq_conf| | |
amq_conf.vm.hostname = "amq1" | |
amq_conf.vm.network :private_network, ip: "192.168.30.10" | |
db_conf.vm.provision :chef_solo do |chef| | |
chef.add_role "server-activemq" | |
end | |
end | |
config.vm.define :amq2 do |amq_conf| | |
amq_conf.vm.hostname = "amq2" | |
amq_conf.vm.network :private_network, ip: "192.168.30.11" | |
db_conf.vm.provision :chef_solo do |chef| | |
chef.add_role "server-activemq" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment