Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JOC multi-machine Vagrant file
Vagrant.configure("2") do |config|
config.vm.define "joc" do |joc|
joc.vm.box = "puppetlabs/centos-7.0-64-puppet"
joc.vm.network "private_network", ip: "192.168.56.105"
joc.vm.usable_port_range = (2200..2250)
joc.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--memory", 1024]
virtualbox.customize ["modifyvm", :id, "--cpus", 2]
virtualbox.customize ["modifyvm", :id, "--name", "JenkinsJoc"]
virtualbox.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--ioapic", "on"]
virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
joc.ssh.forward_agent = true
joc.vagrant.host = :detect
end
config.vm.define "master" do |master|
master.vm.box = "puppetlabs/centos-7.0-64-puppet"
master.vm.network "private_network", ip: "192.168.56.106"
master.vm.usable_port_range = (2200..2250)
master.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--memory", 1024]
virtualbox.customize ["modifyvm", :id, "--cpus", 2]
virtualbox.customize ["modifyvm", :id, "--name", "JenkinsMaster"]
virtualbox.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--ioapic", "on"]
virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
master.ssh.forward_agent = true
master.vagrant.host = :detect
end
config.vm.define "slave" do |slave|
slave.vm.box = "puppetlabs/centos-7.0-64-puppet"
slave.vm.network "private_network", ip: "192.168.56.107"
slave.vm.usable_port_range = (2200..2250)
slave.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--memory", 1024]
virtualbox.customize ["modifyvm", :id, "--cpus", 2]
virtualbox.customize ["modifyvm", :id, "--name", "JenkinsSlave"]
virtualbox.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--ioapic", "on"]
virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
slave.ssh.forward_agent = true
slave.vagrant.host = :detect
end
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.