Quick Start
vagrant init ubuntu/xenial64
Change Hostname
config.vm.hostname = 'master'
Use bridge/public network
config.vm.network "public_network"
Change VM memory size
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
Disable box update
config.vm.box_check_update = false
Setup cluster with multi VMs
config.vm.define "master" do |master|
master.vm.box = 'ubuntu/xenial64'
master.vm.hostname = 'master'
end
config.vm.define "worker1" do |worker1|
worker1.vm.box = 'ubuntu/xenial64'
worker1.vm.hostname = 'worker1'
end
config.vm.define "worker2" do |worker2|
worker2.vm.box = 'ubuntu/xenial64'
worker2.vm.hostname = 'worker2'
end
config.vm.define "dev" do |dev|
dev.vm.box = 'ubuntu/xenial64'
dev.vm.hostname = 'dev'
end
网友评论