Skip to content

Instantly share code, notes, and snippets.

@soulsearcher
Created February 9, 2018 07:51
Show Gist options
  • Save soulsearcher/0019776bb2227a41d2d33eaf50523187 to your computer and use it in GitHub Desktop.
Save soulsearcher/0019776bb2227a41d2d33eaf50523187 to your computer and use it in GitHub Desktop.
vagrantfiles for elastic
# -*- 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