Mr Cheng bio photo

Mr Cheng

Vagrant

Multiple Nodes

This makes use of a “private network” - a subnet isolated to the machine you’re on:

Vagrant.configure(2) do |config|

  config.vm.define "node1" do |node1|
    node1.vm.box = "opscode-ubuntu-14.04"
    node1.vm.hostname = "node1"
    node1.vm.network :private_network, ip: "192.168.77.100"
  end

  config.vm.define :node2 do |node2|
    node2.vm.box = "opscode-ubuntu-14.04"
    node2.vm.hostname = "node2"
    node2.vm.network :private_network, ip: "192.168.77.101"
  end
  
end