Merge "Backport of 'Create Chef Key' task in Rakefile" into stable/juno

This commit is contained in:
Jenkins 2015-08-10 14:10:58 +00:00 committed by Gerrit Code Review
commit 170dbff9ed
2 changed files with 12 additions and 5 deletions

View File

@ -22,7 +22,6 @@ $ git clone https://github.com/jjasghar/chef-openstack-testing-stack.git testing
$ cd testing-stack
$ vi vagrant_linux.rb # change the 'vm.box' to the openstack platform you'd like to run.
$ chef exec rake berks_vendor
$ chef exec ruby -e "require 'openssl'; File.binwrite('.chef/validator.pem', OpenSSL::PKey::RSA.new(2048).to_pem)"
```
The stackforge OpenStack cookbooks by default use databags for configuring passwords. There are four

View File

@ -26,23 +26,31 @@ task :berks_vendor do
run_command('berks vendor cookbooks')
end
desc "Create Chef Key"
task :create_key do
if not File.exist?('.chef/validator.pem')
require 'openssl'
File.binwrite('.chef/validator.pem', OpenSSL::PKey::RSA.new(2048).to_pem)
end
end
desc "All-in-One Neutron build"
task :aio_neutron do
task :aio_neutron => :create_key do
run_command('chef-client -z vagrant_linux.rb aio-neutron.rb')
end
desc "All-in-One Nova-networking build"
task :aio_nova do
task :aio_nova => :create_key do
run_command('chef-client -z vagrant_linux.rb aio-nova.rb')
end
desc "Multi-Neutron build"
task :multi_neutron do
task :multi_neutron => :create_key do
run_command('chef-client -z vagrant_linux.rb multi-neutron.rb')
end
desc "Multi-Nova-networking build"
task :multi_nova do
task :multi_nova => :create_key do
run_command('chef-client -z vagrant_linux.rb multi-nova.rb')
end