Use vagrant-omnibus to test Chef provisioning on example Vagrantfile
This commit is contained in:
parent
0e66eb675b
commit
4bd6bffcb6
3 changed files with 13 additions and 5 deletions
1
Gemfile
1
Gemfile
|
@ -6,6 +6,7 @@ group :development do
|
||||||
gem 'vagrant', github: 'mitchellh/vagrant'
|
gem 'vagrant', github: 'mitchellh/vagrant'
|
||||||
gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
|
gem 'vagrant-cachier', github: 'fgrehm/vagrant-cachier'
|
||||||
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
|
gem 'vagrant-pristine', github: 'fgrehm/vagrant-pristine'
|
||||||
|
gem 'vagrant-omnibus'
|
||||||
gem 'guard'
|
gem 'guard'
|
||||||
gem 'guard-rspec'
|
gem 'guard-rspec'
|
||||||
gem 'rb-inotify'
|
gem 'rb-inotify'
|
||||||
|
|
|
@ -96,6 +96,7 @@ GEM
|
||||||
simplecov-html (0.7.1)
|
simplecov-html (0.7.1)
|
||||||
slop (3.4.5)
|
slop (3.4.5)
|
||||||
thor (0.18.1)
|
thor (0.18.1)
|
||||||
|
vagrant-omnibus (1.1.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
@ -112,4 +113,5 @@ DEPENDENCIES
|
||||||
vagrant!
|
vagrant!
|
||||||
vagrant-cachier!
|
vagrant-cachier!
|
||||||
vagrant-lxc!
|
vagrant-lxc!
|
||||||
|
vagrant-omnibus
|
||||||
vagrant-pristine!
|
vagrant-pristine!
|
||||||
|
|
15
example/Vagrantfile
vendored
15
example/Vagrantfile
vendored
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
# Not really needed, but useful while developing so that vagrant picks it up
|
# Not really needed, but useful while developing so that vagrant picks it up
|
||||||
Vagrant.require_plugin 'vagrant-lxc'
|
Vagrant.require_plugin 'vagrant-lxc'
|
||||||
|
Vagrant.require_plugin 'vagrant-omnibus'
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.synced_folder "/tmp", "/vagrant_data"
|
config.vm.synced_folder "/tmp", "/vagrant_data"
|
||||||
|
@ -22,11 +23,6 @@ echo "Hi there I'm a shell script used for provisioning"
|
||||||
puppet.manifest_file = "site.pp"
|
puppet.manifest_file = "site.pp"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provision :chef_solo do |chef|
|
|
||||||
chef.add_recipe "hello-world"
|
|
||||||
chef.log_level = :debug
|
|
||||||
end
|
|
||||||
|
|
||||||
port = 8080
|
port = 8080
|
||||||
releases = %w(precise quantal raring wheezy squeeze sid)
|
releases = %w(precise quantal raring wheezy squeeze sid)
|
||||||
releases.each do |release|
|
releases.each do |release|
|
||||||
|
@ -37,6 +33,15 @@ echo "Hi there I'm a shell script used for provisioning"
|
||||||
# lxc_config.vm.box_url = "../boxes/output/lxc-#{release}-amd64-2013-07-12.box"
|
# lxc_config.vm.box_url = "../boxes/output/lxc-#{release}-amd64-2013-07-12.box"
|
||||||
lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1)
|
lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1)
|
||||||
lxc_config.vm.hostname = "lxc-#{release}64-example"
|
lxc_config.vm.hostname = "lxc-#{release}64-example"
|
||||||
|
|
||||||
|
if %w(precise quantal raring squeeze).include? release
|
||||||
|
lxc_config.omnibus.chef_version = :latest
|
||||||
|
|
||||||
|
lxc_config.vm.provision :chef_solo do |chef|
|
||||||
|
chef.add_recipe "hello-world"
|
||||||
|
chef.log_level = :debug
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue