Clean up cookbook for bp/clean-up-attr-for-mq-and-db

This change removes the attributes we'll be moving to openstack-common
and changes reference of those attributes to reflect new (more
consistent) namespace.

Also remove Berksfile.lock so that updated version of common cookbook is
used.

Change-Id: I6d6b3849671d56d337aced0f8288b6a201f80ac0
Implements: blueprint clean-up-attr-for-mq-and-db
This commit is contained in:
Matt Thompson 2014-01-21 12:34:30 +00:00 committed by Hugh Saunders
parent d58dc99367
commit 10a3aa27fd
6 changed files with 28 additions and 98 deletions

View File

@ -1,41 +0,0 @@
{
"sources": {
"openstack-orchestration": {
"path": "."
},
"openstack-identity": {
"locked_version": "8.0.0",
"git": "git://github.com/stackforge/cookbook-openstack-identity.git",
"ref": "309b8040a03d4bde97ca443644125e16c242edd8"
},
"openstack-common": {
"locked_version": "8.0.0",
"git": "git://github.com/stackforge/cookbook-openstack-common.git",
"ref": "3ca576b8e6dfca3b39ab4ccd7327a40c78379985"
},
"apt": {
"locked_version": "2.3.4"
},
"database": {
"locked_version": "1.6.0"
},
"mysql": {
"locked_version": "4.0.14"
},
"openssl": {
"locked_version": "1.1.0"
},
"build-essential": {
"locked_version": "1.4.2"
},
"postgresql": {
"locked_version": "3.3.4"
},
"aws": {
"locked_version": "1.0.0"
},
"xfs": {
"locked_version": "1.1.0"
}
}
}

View File

@ -36,36 +36,6 @@ default['openstack']['orchestration']['region'] = 'RegionOne'
# that Heat uses
default['openstack']['orchestration']['rabbit_server_chef_role'] = 'os-ops-messaging'
default['openstack']['orchestration']['db']['username'] = 'heat'
# This user's password is stored in an encrypted databag
# and accessed with openstack-common cookbook library's
# user_password routine. You are expected to create
# the user, pass, vhost in a wrapper rabbitmq cookbook.
default['openstack']['orchestration']['rabbit']['ha'] = false
default['openstack']['orchestration']['rabbit']['username'] = 'guest'
default['openstack']['orchestration']['rabbit']['vhost'] = '/'
default['openstack']['orchestration']['rabbit']['port'] = 5672
default['openstack']['orchestration']['rabbit']['host'] = '127.0.0.1'
# MQ options
default['openstack']['orchestration']['mq']['service_type'] = node['openstack']['mq']['service_type']
default['openstack']['orchestration']['mq']['qpid']['host'] = '127.0.0.1'
default['openstack']['orchestration']['mq']['qpid']['port'] = '5672'
default['openstack']['orchestration']['mq']['qpid']['qpid_hosts'] = ['127.0.0.1:5672']
default['openstack']['orchestration']['mq']['qpid']['username'] = ''
default['openstack']['orchestration']['mq']['qpid']['password'] = ''
default['openstack']['orchestration']['mq']['qpid']['sasl_mechanisms'] = ''
default['openstack']['orchestration']['mq']['qpid']['reconnect_timeout'] = 0
default['openstack']['orchestration']['mq']['qpid']['reconnect_limit'] = 0
default['openstack']['orchestration']['mq']['qpid']['reconnect_interval_min'] = 0
default['openstack']['orchestration']['mq']['qpid']['reconnect_interval_max'] = 0
default['openstack']['orchestration']['mq']['qpid']['reconnect_interval'] = 0
default['openstack']['orchestration']['mq']['qpid']['heartbeat'] = 60
default['openstack']['orchestration']['mq']['qpid']['protocol'] = 'tcp'
default['openstack']['orchestration']['mq']['qpid']['tcp_nodelay'] = true
default['openstack']['orchestration']['service_tenant_name'] = 'service'
default['openstack']['orchestration']['service_user'] = 'heat'
default['openstack']['orchestration']['service_role'] = 'admin'

View File

@ -39,14 +39,14 @@ platform_options["heat_common_packages"].each do |pkg|
end
end
db_type = node['openstack']['db']['orchestration']['db_type']
db_type = node['openstack']['db']['orchestration']['service_type']
platform_options["#{db_type}_python_packages"].each do |pkg|
package pkg do
action :upgrade
end
end
db_user = node["openstack"]["orchestration"]["db"]["username"]
db_user = node["openstack"]["db"]["orchestration"]["username"]
db_pass = db_password "heat"
sql_connection = db_uri("orchestration", db_user, db_pass)
@ -70,11 +70,11 @@ if node["openstack"]["orchestration"]["api"]["auth"]["version"] != "v2.0"
auth_uri = auth_uri.gsub('/v2.0', '')
end
if node["openstack"]["orchestration"]["mq"]["service_type"] == "rabbitmq"
if node["openstack"]["orchestration"]["rabbit"]["ha"]
if node["openstack"]["mq"]["orchestration"]["service_type"] == "rabbitmq"
if node["openstack"]["mq"]["orchestration"]["rabbit"]["ha"]
rabbit_hosts = rabbit_servers
end
rabbit_pass = user_password node["openstack"]["orchestration"]["rabbit"]["username"]
rabbit_pass = user_password node["openstack"]["mq"]["orchestration"]["rabbit"]["userid"]
end
directory "/etc/heat" do

View File

@ -22,7 +22,7 @@ describe "openstack-orchestration::common" do
it "installs postgresql python packages if explicitly told" do
chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS
node = chef_run.node
node.set["openstack"]["db"]["orchestration"]["db_type"] = "postgresql"
node.set["openstack"]["db"]["orchestration"]["service_type"] = "postgresql"
chef_run.converge "openstack-orchestration::common"
expect(chef_run).to upgrade_package "python-psycopg2"

View File

@ -1,4 +1,5 @@
require "chefspec"
require "chefspec/berkshelf"
require "chef/application"
::LOG_LEVEL = :fatal

View File

@ -357,8 +357,8 @@ rpc_response_timeout=<%= node["openstack"]["orchestration"]["rpc_response_timeou
# SSL certification authority file (valid only if SSL enabled)
# (string value)
#kombu_ssl_ca_certs=
<% if node["openstack"]["orchestration"]["mq"]["service_type"] == "rabbitmq" %>
<% if node["openstack"]["orchestration"]["rabbit"]["ha"] -%>
<% if node["openstack"]["mq"]["orchestration"]["service_type"] == "rabbitmq" %>
<% if node["openstack"]["mq"]["orchestration"]["rabbit"]["ha"] -%>
rabbit_hosts=<%= @rabbit_hosts %>
#### (ListOpt) RabbitMQ HA cluster host:port pairs
@ -369,23 +369,23 @@ rabbit_ha_queues=True
#### (BoolOpt) use H/A queues in RabbitMQ (x-ha-policy: all).You need to
#### wipe RabbitMQ database when changing this option.
<% else -%>
rabbit_host=<%= node["openstack"]["orchestration"]["rabbit"]["host"] %>
rabbit_host=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["host"] %>
#### (StrOpt) The RabbitMQ broker address where a single node is used
rabbit_port=<%= node["openstack"]["orchestration"]["rabbit"]["port"] %>
rabbit_port=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["port"] %>
#### (IntOpt) The RabbitMQ broker port where a single node is used
<% end -%>
# connect over SSL for RabbitMQ (boolean value)
#rabbit_use_ssl=false
rabbit_use_ssl=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["use_ssl"] %>
rabbit_userid=<%= node["openstack"]["orchestration"]["rabbit"]["username"] %>
rabbit_userid=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["userid"] %>
#### (StrOpt) the RabbitMQ userid
rabbit_password=<%= @rabbit_password %>
#### (StrOpt) the RabbitMQ password
rabbit_virtual_host=<%= node["openstack"]["orchestration"]["rabbit"]["vhost"] %>
rabbit_virtual_host=<%= node["openstack"]["mq"]["orchestration"]["rabbit"]["vhost"] %>
#### (StrOpt) the RabbitMQ virtual host
# how frequently to retry connecting with RabbitMQ (integer
@ -410,38 +410,38 @@ rabbit_virtual_host=<%= node["openstack"]["orchestration"]["rabbit"]["vhost"] %>
#
# Options defined in heat.openstack.common.rpc.impl_qpid
#
<% if node["openstack"]["orchestration"]["mq"]["service_type"] == "qpid" %>
<% if node["openstack"]["mq"]["orchestration"]["service_type"] == "qpid" %>
rpc_backend=heat.openstack.common.rpc.impl_qpid
# Qpid broker hostname (string value)
qpid_hostname=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["host"] %>
qpid_hostname=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["host"] %>
# Qpid broker port (integer value)
qpid_port=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["port"] %>
qpid_port=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["port"] %>
# Qpid HA cluster host:port pairs (list value)
#qpid_hosts=$qpid_hostname:$qpid_port
# Username for qpid connection (string value)
qpid_username=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["username"] %>
qpid_username=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["username"] %>
# Password for qpid connection (string value)
qpid_password=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["password"] %>
qpid_password=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["password"] %>
# Space separated list of SASL mechanisms to use for auth
# (string value)
qpid_sasl_mechanisms=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["sasl_mechanisms"] %>
qpid_sasl_mechanisms=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["sasl_mechanisms"] %>
# Seconds between connection keepalive heartbeats (integer
# value)
qpid_heartbeat=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["heartbeat"] %>
qpid_heartbeat=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["heartbeat"] %>
# Transport to use, either 'tcp' or 'ssl' (string value)
qpid_protocol=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["protocol"] %>
qpid_protocol=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["protocol"] %>
# Disable Nagle algorithm (boolean value)
qpid_tcp_nodelay=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["tcp_nodelay"] %>
qpid_tcp_nodelay=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["tcp_nodelay"] %>
# The qpid topology version to use. Version 1 is what was
# originally used by impl_qpid. Version 2 includes some
@ -451,11 +451,11 @@ qpid_tcp_nodelay=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["tcp_nodel
# (integer value)
#qpid_topology_version=1
qpid_reconnect_timeout=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["reconnect_timeout"] %>
qpid_reconnect_limit=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["reconnect_limit"] %>
qpid_reconnect_interval_min=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["reconnect_interval_min"] %>
qpid_reconnect_interval_max=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["reconnect_interval_max"] %>
qpid_reconnect_interval=<%= node["openstack"]["orchestration"]["mq"]["qpid"]["reconnect_interval"] %>
qpid_reconnect_timeout=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["reconnect_timeout"] %>
qpid_reconnect_limit=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["reconnect_limit"] %>
qpid_reconnect_interval_min=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["reconnect_interval_min"] %>
qpid_reconnect_interval_max=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["reconnect_interval_max"] %>
qpid_reconnect_interval=<%= node["openstack"]["mq"]["orchestration"]["qpid"]["reconnect_interval"] %>
<% end -%>
#