Skip to content

Instantly share code, notes, and snippets.

@kennonkwok
Created January 26, 2015 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennonkwok/de66259eb968f659a482 to your computer and use it in GitHub Desktop.
Save kennonkwok/de66259eb968f659a482 to your computer and use it in GitHub Desktop.
Vagrantfile for CS12 cluster
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "opscode-centos-6.6"
config.vm.define "be1" do |be1|
be1.vm.hostname = "be1.example.com"
be1.vm.provider "virtualbox" do |v|
v.customize [ "modifyvm", :id, "--cpus", "1" ]
v.customize [ "modifyvm", :id, "--memory", "1024" ]
v.customize [ 'createhd', '--filename', 'be1', '--size', 200]
v.customize [ 'storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', 'be1.vdi' ]
end
be1.vm.network "private_network", ip: "192.168.4.1"
be1.vm.network "private_network", ip: "10.1.2.10"
end
config.vm.define "be2" do |be2|
be2.vm.hostname = "be2.example.com"
be2.vm.provider "virtualbox" do |v|
v.customize [ "modifyvm", :id, "--cpus", "1" ]
v.customize [ "modifyvm", :id, "--memory", "1024" ]
v.customize [ 'createhd', '--filename', 'be2', '--size', 200]
v.customize [ 'storageattach', :id, '--storagectl', 'IDE Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', 'be2.vdi' ]
end
be2.vm.network "private_network", ip: "192.168.4.6"
be2.vm.network "private_network", ip: "10.1.2.12"
end
config.vm.define "fe1" do |fe1|
fe1.vm.hostname = "fe1.example.com"
fe1.vm.provider "virtualbox" do |v|
v.customize [ "modifyvm", :id, "--cpus", "1" ]
v.customize [ "modifyvm", :id, "--memory", "1024" ]
end
fe1.vm.network "private_network", ip: "192.168.4.2"
end
config.vm.define "fe2" do |fe2|
fe2.vm.hostname = "fe2.example.com"
fe2.vm.provider "virtualbox" do |v|
v.customize [ "modifyvm", :id, "--cpus", "1" ]
v.customize [ "modifyvm", :id, "--memory", "1024" ]
end
fe2.vm.network "private_network", ip: "192.168.4.3"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment