Skip to content

Instantly share code, notes, and snippets.

@roblayton roblayton/Vagrantfile
Last active Aug 29, 2015

Embed
What would you like to do?
A Vagrant multi-machine cluster
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: "apt-get update"
config.vm.define "hostname1" do |cfg|
cfg.vm.provider :virtualbox do |vb, override|
override.vm.network :private_network, ip: "192.168.33.10"
override.vm.hostname = "hostname1"
vb.name = "hostname1"
vb.customize ["modifyvm", :id, "--memory", 1024, "--cpus", 1, "--hwvirtex", "on"]
end # end proviser
end # end config
config.vm.define "hostname2" do |cfg|
cfg.vm.provider :virtualbox do |vb, override|
override.vm.network :private_network, ip: "192.168.33.11"
override.vm.hostname = "hostname2"
vb.name = "hostname2"
vb.customize ["modifyvm", :id, "--memory", 1024, "--cpus", 1, "--hwvirtex", "on"]
end # end proviser
end # end config
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.