Last active
January 22, 2019 03:41
-
-
Save guoqiao/5f7862c6666717c049aff4f1960edb38 to your computer and use it in GitHub Desktop.
Vagrantfile example with multiple machines.
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 -*- | |
Vagrant.configure("2") do |config| | |
config.ssh.insert_key = false | |
config.vm.provider "virtualbox" do |v| | |
v.memory = 4096 | |
v.cpus = 4 | |
end | |
config.vm.define "dc0" do |dc| | |
dc.vm.box = "samba-ubuntu1604" | |
dc.vm.hostname = "dc0" | |
dc.vm.network "private_network", ip: "10.10.10.10" | |
end | |
config.vm.define "dc1" do |dc| | |
dc.vm.box = "samba-ubuntu1604" | |
dc.vm.hostname = "dc1" | |
dc.vm.network "private_network", ip: "10.10.10.11" | |
end | |
config.vm.define "dc2" do |dc| | |
dc.vm.box = "samba-ubuntu1604" | |
dc.vm.hostname = "dc2" | |
dc.vm.network "private_network", ip: "10.10.10.12" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment