Guest User

Untitled

a guest
Feb 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. #
  4.  
  5. #domain = "soulsearcher.com"
  6.  
  7. nodes = [
  8. { :hostname => 'master', :ip => '192.168.56.70', :box => 'bento/centos-7.4', :ram => 5120 },
  9. { :hostname => 'data-1', :ip => '192.168.56.71', :box => 'bento/centos-7.4'},
  10. ]
  11.  
  12. Vagrant.configure("2") do |config|
  13. nodes.each do |node|
  14. config.vm.define node[:hostname] do |nodeconfig|
  15. nodeconfig.vm.box = "bento/centos-7.4"
  16. nodeconfig.vm.hostname = node[:hostname] + ".box"
  17. nodeconfig.vm.network :private_network, ip: node[:ip]
  18.  
  19. memory = node[:ram] ? node[:ram] : 4096;
  20. nodeconfig.vm.provider :virtualbox do |vb|
  21. vb.customize [
  22. "modifyvm", :id,
  23. "--cpus", 1,
  24. "--memory", memory.to_s,
  25. ]
  26. end
  27. end
  28. end
  29. end
Add Comment
Please, Sign In to add comment