Created
June 10, 2013 00:25
-
-
Save arusso/5745844 to your computer and use it in GitHub Desktop.
Vagrant Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define :nfs do |nfs| | |
nfs.vm.box = "el6" | |
nfs.vm.network :private_network, ip: "10.0.0.13" | |
nfs.vm.provision :shell, :inline => "hostname nfs.lan" | |
nfs.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'nfs.lan' | |
puppet.options = '--no-daemonize -pluginsync -t' | |
end | |
end | |
config.vm.define :iptables do |iptables| | |
iptables.vm.box = "el6" | |
iptables.vm.network :private_network, ip: "10.0.0.14" | |
iptables.vm.provision :shell, :inline => "hostname iptables.lan" | |
iptables.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'iptables.lan' | |
puppet.options = '--no-daemonize --pluginsync -t' | |
end | |
end | |
config.vm.define :iptables5 do |iptables5| | |
iptables5.vm.box = "el5" | |
iptables5.vm.network :private_network, ip: "10.0.0.15" | |
iptables5.vm.provision :shell, :inline => "hostname iptables5.lan" | |
iptables5.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'iptables5.lan' | |
puppet.options = '--no-daemonize --pluginsync -t' | |
end | |
end | |
config.vm.define :nrpe do |nrpe| | |
nrpe.vm.provider :virtualbox do |vb| | |
vb.gui = true | |
end | |
nrpe.vm.box = "el6" | |
nrpe.vm.network :private_network, ip: "10.0.0.12" | |
nrpe.vm.provision :shell, :inline => "hostname nrpe.lan" | |
nrpe.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'nrpe.lan' | |
puppet.options = '--no-daemonize --pluginsync -t' | |
end | |
end | |
config.vm.define :build do |build| | |
build.vm.network :private_network, ip: "10.0.0.26" | |
build.vm.provision :shell, :inline => "hostname build.lan" | |
build.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'build.lan' | |
puppet.options = '--no-daemonize --pluginsync -t' | |
end | |
end | |
config.vm.define :builder5 do |builder| | |
builder.vm.box = 'el5' | |
builder.vm.synced_folder "sync/builder", "/sync" | |
builder.vm.network :private_network, ip: "10.0.0.28" | |
builder.vm.provision :shell, :inline => "hostname builder5.lan" | |
builder.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'builder5.lan' | |
puppet.options = '--no-daemonize --onetime --waitforcert --pluginsync' | |
end | |
end | |
config.vm.define :builder6 do |builder| | |
builder.vm.box = 'el6' | |
builder.vm.synced_folder "sync/builder", "/sync" | |
builder.vm.network :private_network, ip: "10.0.0.29" | |
builder.vm.provision :shell, :inline => "hostname builder6.lan" | |
builder.vm.provision :puppet_server do |puppet| | |
puppet.puppet_server = 'pm.lan' | |
puppet.puppet_node = 'builder6.lan' | |
puppet.options = '--no-daemonize --onetime --waitforcert --pluginsync' | |
end | |
end | |
config.vm.define :burn do |burn| | |
burn.vm.box = 'el6' | |
burn.vm.network :private_network, ip: "10.0.0.250" | |
burn.vm.provision :shell, :inline => "hostname burn.lan" | |
end | |
config.vm.define :git do |git| | |
git.vm.synced_folder "bootstrap/", "/bs" | |
git.vm.network :private_network, ip: "10.0.0.11" | |
git.vm.provision :shell, :inline => "hostname git.lan" | |
git.vm.provision :puppet do |puppet| | |
puppet.manifests_path = 'puppet/nodes/' | |
puppet.manifest_file = 'git-server.pp' | |
puppet.module_path = [ 'dev', 'puppet/modules' ] | |
end # git.vm.provision | |
end # :git | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.provision :shell, :inline => "echo 10.0.0.11 git git.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.12 nrpe nrpe.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.14 iptables nrpe.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.15 iptables5 nrpe.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.13 nfs nfs.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.26 build build.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.27 builder builder.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.28 builder5 builder5.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.29 builder6 builder6.lan >> /etc/hosts" | |
config.vm.provision :shell, :inline => "echo 10.0.0.254 burn burn.lan >> /etc/hosts" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
home = File.dirname(__FILE__) | |
# Primary VagrantFile | |
# handles the setting up of our puppetmaster | |
# Define our default box, in case we dont override it in the VagrantInit | |
# file. We'll also add our puppet hosts entry | |
Vagrant.configure("2") do |config| | |
config.vm.box = "el6" | |
config.vm.provision :shell, :inline => "echo 10.0.0.10 puppet puppet.lan pm pm.lan >> /etc/hosts" | |
end | |
# In this file, we should put any additional config options that should apply | |
# to all hosts, such as entries into /etc/hosts, and the default box | |
load "#{home}/config.d/vagrant-init" | |
Vagrant.configure("2") do |config| | |
# Puppet Master | |
# | |
config.vm.define :master do |master| | |
master.vm.network :private_network, ip: "10.0.0.10" | |
master.vm.provision :shell, :inline => "hostname pm.lan" | |
master.vm.provision :puppet do |puppet| | |
puppet.manifests_path = 'puppet/manifests' | |
puppet.manifest_file = 'puppet-master.pp' | |
puppet.module_path = [ 'dev', | |
'puppet/modules', | |
'puppet/opt-modules' ] | |
end | |
end | |
end | |
load "#{home}/config.d/vagrant-config" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment