Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multiple vagrant box deployment
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: "echo Multiple vagrant box deployment"
config.vm.box = "bento/ubuntu-16.04"
# Customize the amount of memory on the VM:
config.vm.provider :virtualbox do |vb|
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
end
config.vm.define "web_node" do |web_node|
web_node.vm.box = "web_node"
web_node.vm.network :private_network, ip: '10.10.10.200'
web_node.vm.synced_folder "../apps", "/web", :owner=> 'vagrant', :group=>'www-data', :mount_options => ['dmode=770', 'fmode=770']
end
config.vm.define "db_node" do |db_node|
db_node.vm.box = "db_node"
db_node.vm.network :private_network, ip: '10.10.10.201'
db_node.vm.synced_folder "../apps", "/web", :owner=> 'vagrant', :group=>'www-data', :mount_options => ['dmode=770', 'fmode=770']
end
config.vm.define "es_node" do |es_node|
es_node.vm.box = "es_node"
es_node.vm.network :private_network, ip: '10.10.10.202'
es_node.vm.synced_folder "../apps", "/web", :owner=> 'vagrant', :group=>'www-data', :mount_options => ['dmode=770', 'fmode=770']
end
config.vm.define "redis_node" do |redis_node|
redis_node.vm.box = "redis_node"
redis_node.vm.network :private_network, ip: '10.10.10.203'
redis_node.vm.synced_folder "../apps", "/web", :owner=> 'vagrant', :group=>'www-data', :mount_options => ['dmode=770', 'fmode=770']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment