Created
February 9, 2018 07:51
-
-
Save soulsearcher/0019776bb2227a41d2d33eaf50523187 to your computer and use it in GitHub Desktop.
vagrantfiles for elastic
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 : | |
# | |
#domain = "soulsearcher.com" | |
nodes = [ | |
{ :hostname => 'master', :ip => '192.168.56.70', :box => 'bento/centos-7.4', :ram => 5120 }, | |
{ :hostname => 'data-1', :ip => '192.168.56.71', :box => 'bento/centos-7.4'}, | |
] | |
Vagrant.configure("2") do |config| | |
nodes.each do |node| | |
config.vm.define node[:hostname] do |nodeconfig| | |
nodeconfig.vm.box = "bento/centos-7.4" | |
nodeconfig.vm.hostname = node[:hostname] + ".box" | |
nodeconfig.vm.network :private_network, ip: node[:ip] | |
memory = node[:ram] ? node[:ram] : 4096; | |
nodeconfig.vm.provider :virtualbox do |vb| | |
vb.customize [ | |
"modifyvm", :id, | |
"--cpus", 1, | |
"--memory", memory.to_s, | |
] | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment