Skip to content

Instantly share code, notes, and snippets.

@roblayton
Last active August 29, 2015 14:23
Show Gist options
  • Save roblayton/e736230dc063fa58d575 to your computer and use it in GitHub Desktop.
Save roblayton/e736230dc063fa58d575 to your computer and use it in GitHub Desktop.
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