Added vagrant testing specific files.
- Vagrantfile - added vagrant deploy host specfics
This commit is contained in:
55
Vagrantfile
vendored
Normal file
55
Vagrantfile
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
Vagrant::Config.run do |config|
|
||||||
|
|
||||||
|
#vagrant config file for building out multi-node with Puppet :)
|
||||||
|
box = 'natty'
|
||||||
|
remote_url_base = ENV['REMOTE_VAGRANT_STORE']
|
||||||
|
|
||||||
|
config.vm.box = "#{box}"
|
||||||
|
config.vm.box_url = "http://faro.puppetlabs.lan/vagrant/#{box}.box"
|
||||||
|
|
||||||
|
config.ssh.forwarded_port_key = "ssh"
|
||||||
|
ssh_forward = 2231
|
||||||
|
|
||||||
|
|
||||||
|
config.vm.box = "#{box}"
|
||||||
|
config.vm.box_url = "http://faro.puppetlabs.lan/vagrant/#{box}.vbox"
|
||||||
|
config.vm.customize do |vm|
|
||||||
|
vm.memory_size = 768
|
||||||
|
vm.cpu_count = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
net_base = "172.20.0"
|
||||||
|
|
||||||
|
# the master runs apply to configure itself
|
||||||
|
config.vm.define :puppetmaster do |pm|
|
||||||
|
|
||||||
|
pm.vm.box = "natty"
|
||||||
|
pm.vm.forward_port("http", 8140, 8141)
|
||||||
|
ssh_forward = ssh_forward + 1
|
||||||
|
pm.vm.forward_port('ssh', 22, ssh_forward, :auto => true)
|
||||||
|
# hard-coding this b/c it is important
|
||||||
|
pm.vm.network("#{net_base}.10")
|
||||||
|
pm.vm.provision :puppet do |puppet|
|
||||||
|
puppet.manifest_file = "master.pp"
|
||||||
|
puppet.options = ["--certname","puppetmaster", '--modulepath', '/vagrant/modules']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
config.vm.define :all do |all|
|
||||||
|
all.vm.box = "natty"
|
||||||
|
ssh_forward = ssh_forward + 1
|
||||||
|
all.vm.forward_port('ssh', 22, ssh_forward, :auto => true)
|
||||||
|
all.vm.network("#{net_base}.11")
|
||||||
|
all.vm.provision :puppet do |puppet|
|
||||||
|
puppet.manifests_path = "manifests"
|
||||||
|
puppet.manifest_file = "all.pp"
|
||||||
|
puppet.options = ['--certname', 'all', '--modulepath', '/vagrant/modules']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
config.vm.define :database do |mysql|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
# vim:ft=ruby
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This manifest installs all of the nova
|
# This manifest installs all of the nova
|
||||||
# components on one node.
|
# components on one node.
|
||||||
#
|
import 'hosts.pp'
|
||||||
resources { 'nova_config':
|
resources { 'nova_config':
|
||||||
purge => true,
|
purge => true,
|
||||||
}
|
}
|
||||||
|
8
manifests/hosts.pp
Normal file
8
manifests/hosts.pp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Host { ensure => present }
|
||||||
|
host { 'puppetmaster':
|
||||||
|
ip => '172.20.0.10',
|
||||||
|
}
|
||||||
|
host { 'all':
|
||||||
|
ip => '172.20.0.11',
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user