upgrade to Havana

also upgrade gems:
- berkshelf, ~> 2.0.10
- chefspec, ~> 3.0.2
- foodcritic, ~> 3.0.3

Change-Id: I501d329d0da7d540cbd7ec229f031700d9ced1ac
This commit is contained in:
Ionuț Arțăriși 2013-12-11 12:18:35 +01:00
parent 3ff43e644f
commit d21a7107a5
10 changed files with 104 additions and 120 deletions

View File

@ -1,38 +1,31 @@
{ {
"sha": "45e1bf81e0dd550088ee5794e167786e616570ea",
"sources": { "sources": {
"openstack-ops-messaging": { "openstack-ops-messaging": {
"path": "." "path": "."
}, },
"openstack-common": { "openstack-common": {
"locked_version": "0.3.0", "locked_version": "8.0.0",
"git": "git://github.com/stackforge/cookbook-openstack-common.git", "git": "git://github.com/stackforge/cookbook-openstack-common.git",
"ref": "25b183f2362fa501cfee4db331491b3d984a5c05" "ref": "2201bd113ffe1742c19811aa4df59a5790af71e3"
}, },
"rabbitmq": { "rabbitmq": {
"locked_version": "2.1.2" "locked_version": "2.1.2"
}, },
"erlang": {
"locked_version": "1.3.0"
},
"apt": { "apt": {
"locked_version": "2.0.0" "locked_version": "2.0.0"
}, },
"yum": {
"locked_version": "2.3.0"
},
"build-essential": {
"locked_version": "1.4.0"
},
"database": { "database": {
"locked_version": "1.4.0" "locked_version": "1.4.0"
}, },
"mysql": { "mysql": {
"locked_version": "3.0.2" "locked_version": "3.0.0"
}, },
"openssl": { "openssl": {
"locked_version": "1.0.2" "locked_version": "1.0.2"
}, },
"build-essential": {
"locked_version": "1.4.0"
},
"postgresql": { "postgresql": {
"locked_version": "3.0.2" "locked_version": "3.0.2"
}, },
@ -41,6 +34,12 @@
}, },
"xfs": { "xfs": {
"locked_version": "1.1.0" "locked_version": "1.1.0"
},
"erlang": {
"locked_version": "1.3.0"
},
"yum": {
"locked_version": "2.3.0"
} }
} }
} }

View File

@ -2,6 +2,9 @@
This file is used to list changes made in each version of cookbook-openstack-ops-messaging. This file is used to list changes made in each version of cookbook-openstack-ops-messaging.
## 8.0.0
* upgrade to Havana
## 7.0.1: ## 7.0.1:
* default the node['openstack'][*]['rabbit'] attributes for all the services * default the node['openstack'][*]['rabbit'] attributes for all the services

View File

@ -2,8 +2,8 @@ source "https://rubygems.org"
gem "chef", "~> 11.4.4" gem "chef", "~> 11.4.4"
gem "json", "<= 1.7.7" # chef 11 dependency gem "json", "<= 1.7.7" # chef 11 dependency
gem "berkshelf", "~> 2.0.3" gem "berkshelf", "~> 2.0.10"
gem "chefspec", "~> 1.3.0" gem "chefspec", "~> 3.0.2"
gem "foodcritic" gem "foodcritic", "~> 3.0.3"
gem "strainer" gem "strainer"
gem "tailor" gem "tailor"

View File

@ -1,34 +1,34 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
activesupport (4.0.0) activesupport (3.2.16)
i18n (~> 0.6, >= 0.6.4) i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2) multi_json (~> 1.0)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.3.5) addressable (2.3.5)
akami (1.2.0) akami (1.2.0)
gyoku (>= 0.4.0) gyoku (>= 0.4.0)
nokogiri (>= 1.4.0) nokogiri (>= 1.4.0)
atomic (1.1.10) berkshelf (2.0.10)
berkshelf (2.0.5) activesupport (~> 3.2.0)
activesupport (>= 3.2.0)
addressable (~> 2.3.4) addressable (~> 2.3.4)
buff-shell_out (~> 0.1) buff-shell_out (~> 0.1)
celluloid (>= 0.14.0)
chozo (>= 0.6.1) chozo (>= 0.6.1)
faraday (>= 0.8.5) faraday (>= 0.8.5)
hashie (>= 2.0.2) hashie (>= 2.0.2)
minitar (~> 0.5.4) minitar (~> 0.5.4)
rbzip2 (~> 0.2.0) rbzip2 (~> 0.2.0)
retryable (~> 1.3.3) retryable (~> 1.3.3)
ridley (~> 1.2.1) ridley (~> 1.5.0)
solve (>= 0.5.0) solve (>= 0.5.0)
thor (~> 0.18.0) thor (~> 0.18.0)
buff-config (0.4.0)
buff-extensions (~> 0.3)
varia_model (~> 0.1)
buff-extensions (0.5.0) buff-extensions (0.5.0)
buff-ignore (1.1.1)
buff-platform (0.1.0)
buff-ruby_engine (0.1.0) buff-ruby_engine (0.1.0)
buff-shell_out (0.1.0) buff-shell_out (0.1.1)
buff-ruby_engine (~> 0.1.0) buff-ruby_engine (~> 0.1.0)
builder (3.2.2) builder (3.2.2)
celluloid (0.14.1) celluloid (0.14.1)
@ -50,99 +50,88 @@ GEM
ohai (>= 0.6.0) ohai (>= 0.6.0)
rest-client (>= 1.0.4, < 1.7.0) rest-client (>= 1.0.4, < 1.7.0)
yajl-ruby (~> 1.1) yajl-ruby (~> 1.1)
chefspec (1.3.1) chefspec (3.0.2)
chef (>= 10.0) chef (~> 11.0)
erubis fauxhai (~> 2.0)
fauxhai (>= 0.1.1, < 2.0) rspec (~> 2.14)
minitest-chef-handler (>= 0.6.0)
rspec (~> 2.0)
chozo (0.6.1) chozo (0.6.1)
activesupport (>= 3.2.0) activesupport (>= 3.2.0)
hashie (>= 2.0.2) hashie (>= 2.0.2)
multi_json (>= 1.3.0) multi_json (>= 1.3.0)
ci_reporter (1.8.4) diff-lcs (1.2.5)
builder (>= 2.1.2)
diff-lcs (1.2.4)
erubis (2.7.0) erubis (2.7.0)
faraday (0.8.7) faraday (0.8.8)
multipart-post (~> 1.1) multipart-post (~> 1.2.0)
fauxhai (1.1.1) fauxhai (2.0.0)
httparty
net-ssh net-ssh
ohai ohai
ffi (1.9.0) ffi (1.9.3)
foodcritic (2.1.0) foodcritic (3.0.3)
erubis erubis
gherkin (~> 2.11.7) gherkin (~> 2.11.7)
nokogiri (~> 1.5.4) nokogiri (~> 1.5.4)
rak (~> 1.4) rake
treetop (~> 1.4.10) treetop (~> 1.4.10)
yajl-ruby (~> 1.1.0) yajl-ruby (~> 1.1.0)
gherkin (2.11.8) gherkin (2.11.8)
multi_json (~> 1.3) multi_json (~> 1.3)
gssapi (1.0.3) gssapi (1.0.3)
ffi (>= 1.0.1) ffi (>= 1.0.1)
gyoku (1.0.0) gyoku (1.1.0)
builder (>= 2.1.2) builder (>= 2.1.2)
hashie (2.0.5) hashie (2.0.5)
highline (1.6.19) highline (1.6.20)
httparty (0.11.0) httpclient (2.3.4.1)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
httpclient (2.2.0.2)
httpi (0.9.7) httpi (0.9.7)
rack rack
i18n (0.6.4) i18n (0.6.9)
ipaddress (0.8.0) ipaddress (0.8.0)
json (1.7.7) json (1.7.7)
little-plugger (1.1.3) little-plugger (1.1.3)
log_switch (0.4.0) log_switch (0.4.0)
logging (1.6.2) logging (1.8.1)
little-plugger (>= 1.1.3) little-plugger (>= 1.1.3)
mime-types (1.23) multi_json (>= 1.3.6)
mime-types (2.0)
minitar (0.5.4) minitar (0.5.4)
minitest (4.7.5)
minitest-chef-handler (1.0.1)
chef
ci_reporter
minitest (~> 4.7.3)
mixlib-authentication (1.3.0) mixlib-authentication (1.3.0)
mixlib-log mixlib-log
mixlib-cli (1.3.0) mixlib-cli (1.3.0)
mixlib-config (1.1.2) mixlib-config (2.1.0)
mixlib-log (1.6.0) mixlib-log (1.6.0)
mixlib-shellout (1.1.0) mixlib-shellout (1.3.0)
multi_json (1.7.7) multi_json (1.8.2)
multi_xml (0.5.4)
multipart-post (1.2.0) multipart-post (1.2.0)
net-http-persistent (2.8) net-http-persistent (2.9)
net-ssh (2.6.7) net-ssh (2.7.0)
net-ssh-gateway (1.2.0) net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh-multi (1.1) net-ssh-multi (1.1)
net-ssh (>= 2.1.4) net-ssh (>= 2.1.4)
net-ssh-gateway (>= 0.99.0) net-ssh-gateway (>= 0.99.0)
nio4r (0.4.6) nio4r (0.5.0)
nokogiri (1.5.10) nokogiri (1.5.10)
nori (1.1.5) nori (1.1.5)
ohai (6.16.0) ohai (6.20.0)
ipaddress ipaddress
mixlib-cli mixlib-cli
mixlib-config mixlib-config
mixlib-log mixlib-log
mixlib-shellout mixlib-shellout
systemu systemu (~> 2.5.2)
yajl-ruby yajl-ruby
polyglot (0.3.3) polyglot (0.3.3)
rack (1.5.2) rack (1.5.2)
rak (1.4) rake (10.1.0)
rbzip2 (0.2.0) rbzip2 (0.2.0)
rest-client (1.6.7) rest-client (1.6.7)
mime-types (>= 1.16) mime-types (>= 1.16)
retryable (1.3.3) retryable (1.3.3)
ridley (1.2.3) ridley (1.5.3)
addressable addressable
buff-config (~> 0.2)
buff-extensions (~> 0.3) buff-extensions (~> 0.3)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1) buff-shell_out (~> 0.1)
celluloid (~> 0.14.0) celluloid (~> 0.14.0)
celluloid-io (~> 0.14.0) celluloid-io (~> 0.14.0)
@ -153,18 +142,19 @@ GEM
mixlib-authentication (>= 1.3.0) mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8) net-http-persistent (>= 2.8)
net-ssh net-ssh
nio4r (>= 0.5.0)
retryable retryable
solve (>= 0.4.4) solve (>= 0.4.4)
varia_model (~> 0.1) varia_model (~> 0.1)
winrm (~> 1.1.0) winrm (~> 1.1.0)
rspec (2.13.0) rspec (2.14.1)
rspec-core (~> 2.13.0) rspec-core (~> 2.14.0)
rspec-expectations (~> 2.13.0) rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.13.0) rspec-mocks (~> 2.14.0)
rspec-core (2.13.1) rspec-core (2.14.7)
rspec-expectations (2.13.0) rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1) rspec-mocks (2.14.4)
rubyntlm (0.1.1) rubyntlm (0.1.1)
savon (0.9.5) savon (0.9.5)
akami (~> 1.0) akami (~> 1.0)
@ -174,11 +164,12 @@ GEM
nokogiri (>= 1.4.0) nokogiri (>= 1.4.0)
nori (~> 1.0) nori (~> 1.0)
wasabi (~> 1.0) wasabi (~> 1.0)
solve (0.6.0) solve (0.8.2)
strainer (3.0.3) strainer (3.3.0)
berkshelf (~> 2.0) berkshelf (~> 2.0)
buff-platform (~> 0.1)
systemu (2.5.2) systemu (2.5.2)
tailor (1.2.1) tailor (1.3.1)
log_switch (>= 0.3.0) log_switch (>= 0.3.0)
term-ansicolor (>= 1.0.5) term-ansicolor (>= 1.0.5)
text-table (>= 1.2.2) text-table (>= 1.2.2)
@ -186,25 +177,22 @@ GEM
tins (~> 0.8) tins (~> 0.8)
text-table (1.2.3) text-table (1.2.3)
thor (0.18.1) thor (0.18.1)
thread_safe (0.1.0)
atomic
timers (1.1.0) timers (1.1.0)
tins (0.8.2) tins (0.13.1)
treetop (1.4.14) treetop (1.4.15)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.37)
uuidtools (2.1.4) uuidtools (2.1.4)
varia_model (0.1.0) varia_model (0.2.0)
buff-extensions (~> 0.1) buff-extensions (~> 0.2)
hashie (>= 2.0.2) hashie (>= 2.0.2)
wasabi (1.0.0) wasabi (1.0.0)
nokogiri (>= 1.4.0) nokogiri (>= 1.4.0)
winrm (1.1.2) winrm (1.1.3)
gssapi (~> 1.0.0) gssapi (~> 1.0.0)
httpclient (~> 2.2.0.2) httpclient (~> 2.2, >= 2.2.0.2)
logging (~> 1.6.1) logging (~> 1.6, >= 1.6.1)
nokogiri (~> 1.5.0) nokogiri (~> 1.5)
rubyntlm (~> 0.1.1) rubyntlm (~> 0.1.1)
savon (= 0.9.5) savon (= 0.9.5)
uuidtools (~> 2.1.2) uuidtools (~> 2.1.2)
@ -214,10 +202,10 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
berkshelf (~> 2.0.3) berkshelf (~> 2.0.10)
chef (~> 11.4.4) chef (~> 11.4.4)
chefspec (~> 1.3.0) chefspec (~> 3.0.2)
foodcritic foodcritic (~> 3.0.3)
json (<= 1.7.7) json (<= 1.7.7)
strainer strainer
tailor tailor

View File

@ -1,6 +1,6 @@
# Description # # Description #
This cookbook provides shared message queue configuration for the OpenStack **Grizzly** reference deployment provided by Chef for OpenStack. The http://github.com/mattray/chef-openstack-repo contains documentation for using this cookbook in the context of a full OpenStack deployment. It currently supports RabbitMQ and will soon other queues. This cookbook provides shared message queue configuration for the OpenStack **Havana** reference deployment provided by Chef for OpenStack. The http://github.com/mattray/chef-openstack-repo contains documentation for using this cookbook in the context of a full OpenStack deployment. It currently supports RabbitMQ and will soon other queues.
# Requirements # # Requirements #
@ -65,10 +65,12 @@ License and Author
| **Author** | John Dewey (<john@dewey.ws>) | | **Author** | John Dewey (<john@dewey.ws>) |
| **Author** | Matt Ray (<matt@opscode.com>) | | **Author** | Matt Ray (<matt@opscode.com>) |
| **Author** | Craig Tracey (<craigtracey@gmail.com>) | | **Author** | Craig Tracey (<craigtracey@gmail.com>) |
| **Author** | Ionut Artarisi (<iartarisi@suse.cz>) |
| | | | | |
| **Copyright** | Copyright (c) 2013, Opscode, Inc. | | **Copyright** | Copyright (c) 2013, Opscode, Inc. |
| **Copyright** | Copyright (c) 2013, Craig Tracey | | **Copyright** | Copyright (c) 2013, Craig Tracey |
| **Copyright** | Copyright (c) 2013, AT&T Services, Inc. | | **Copyright** | Copyright (c) 2013, AT&T Services, Inc. |
| **Copyright** | Copyright (c) 2013, SUSE Linux GmbH. |
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -3,14 +3,14 @@ maintainer "Opscode, Inc."
maintainer_email "matt@opscode.com" maintainer_email "matt@opscode.com"
license "Apache 2.0" license "Apache 2.0"
description "Provides the shared messaging configuration for Chef for OpenStack." description "Provides the shared messaging configuration for Chef for OpenStack."
version "7.1.0" version "8.0.0"
recipe "server", "Installs and configures server packages for messaging queue used by the deployment." recipe "server", "Installs and configures server packages for messaging queue used by the deployment."
recipe "rabbitmq-server", "Installs and configures RabbitMQ and is called via the server recipe" recipe "rabbitmq-server", "Installs and configures RabbitMQ and is called via the server recipe"
%w{ fedora ubuntu redhat centos }.each do |os| %w{ fedora ubuntu redhat centos suse }.each do |os|
supports os supports os
end end
depends "openstack-common", "~> 0.4.0" depends "openstack-common", "~> 8.0"
depends "rabbitmq", ">= 2.1.0" depends "rabbitmq", ">= 2.1.0"

View File

@ -4,7 +4,7 @@ describe "openstack-ops-messaging::rabbitmq-server" do
before { ops_messaging_stubs } before { ops_messaging_stubs }
describe "ubuntu" do describe "ubuntu" do
before do before do
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS @chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
@chef_run.converge "openstack-ops-messaging::rabbitmq-server" @chef_run.converge "openstack-ops-messaging::rabbitmq-server"
end end
@ -17,7 +17,7 @@ describe "openstack-ops-messaging::rabbitmq-server" do
end end
it "overrides rabbit and openstack image attributes" do it "overrides rabbit and openstack image attributes" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n| chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS do |n|
n.set['openstack']['mq']['bind_interface'] = 'eth0' n.set['openstack']['mq']['bind_interface'] = 'eth0'
n.set['openstack']['mq']['port'] = '4242' n.set['openstack']['mq']['port'] = '4242'
n.set['openstack']['mq']['user'] = 'foo' n.set['openstack']['mq']['user'] = 'foo'
@ -37,7 +37,7 @@ describe "openstack-ops-messaging::rabbitmq-server" do
describe "cluster" do describe "cluster" do
before do before do
@chef_run = ::ChefSpec::ChefRunner.new(::UBUNTU_OPTS) do |n| @chef_run = ::ChefSpec::Runner.new(::UBUNTU_OPTS) do |n|
n.set["openstack"]["mq"] = { n.set["openstack"]["mq"] = {
"cluster" => true "cluster" => true
} }
@ -68,29 +68,16 @@ describe "openstack-ops-messaging::rabbitmq-server" do
end end
describe "lwrps" do describe "lwrps" do
it "deletes guest user" do it "does not delete the guest user" do
resource = @chef_run.find_resource( expect(@chef_run).not_to delete_rabbitmq_user("remove rabbit guest user")
"rabbitmq_user",
"remove rabbit guest user"
).to_hash
expect(resource).to include(
:user => "guest",
:action => [:delete]
)
end end
it "doesn't delete guest user" do it "deletes a user not called 'guest'" do
opts = ::UBUNTU_OPTS.merge(:evaluate_guards => true) chef_run = ChefSpec::Runner.new(::UBUNTU_OPTS) do |node|
chef_run = ::ChefSpec::ChefRunner.new opts node.node.set["openstack"]["mq"]["user"] = "not-a-guest"
chef_run.converge "openstack-ops-messaging::rabbitmq-server" end.converge("openstack-ops-messaging::rabbitmq-server")
resource = chef_run.find_resource( expect(chef_run).to delete_rabbitmq_user("remove rabbit guest user")
"rabbitmq_user",
"remove rabbit guest user"
)
expect(resource).to be_nil
end end
it "adds user" do it "adds user" do

View File

@ -5,7 +5,7 @@ describe "openstack-ops-messaging::server" do
describe "ubuntu" do describe "ubuntu" do
it "uses proper messaging server recipe" do it "uses proper messaging server recipe" do
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
chef_run.converge "openstack-ops-messaging::server" chef_run.converge "openstack-ops-messaging::server"
expect(chef_run).to include_recipe "openstack-ops-messaging::rabbitmq-server" expect(chef_run).to include_recipe "openstack-ops-messaging::rabbitmq-server"

View File

@ -1,4 +1,5 @@
require "chefspec" require "chefspec"
require_relative "support/matcher"
::LOG_LEVEL = :fatal ::LOG_LEVEL = :fatal
::REDHAT_OPTS = { ::REDHAT_OPTS = {

4
spec/support/matcher.rb Normal file
View File

@ -0,0 +1,4 @@
# TODO(iartarisi) this should be submitted upstream and be a rabbitmq library
def delete_rabbitmq_user(name)
ChefSpec::Matchers::ResourceMatcher.new(:rabbitmq_user, :delete, name)
end