Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
# encoding: UTF-8
|
|
|
|
#
|
|
|
|
# Cookbook Name:: openstack-common
|
|
|
|
# Attributes:: messaging
|
|
|
|
#
|
|
|
|
# Copyright 2012-2013, AT&T Services, Inc.
|
|
|
|
# Copyright 2013, SUSE Linux GmbH
|
2014-02-13 10:51:40 -08:00
|
|
|
# Copyright 2013-2014, Rackspace US, Inc.
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
# The rabbitmq 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.
|
|
|
|
#
|
|
|
|
|
2014-02-13 10:51:40 -08:00
|
|
|
###################################################################
|
|
|
|
# Services to assign mq attributes for
|
|
|
|
###################################################################
|
|
|
|
services = %w{block-storage compute image metering network orchestration}
|
|
|
|
|
|
|
|
###################################################################
|
|
|
|
# Generic default attributes
|
|
|
|
###################################################################
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
default['openstack']['mq']['server_role'] = 'os-ops-messaging'
|
|
|
|
default['openstack']['mq']['service_type'] = 'rabbitmq'
|
|
|
|
default['openstack']['mq']['host'] = '127.0.0.1'
|
|
|
|
default['openstack']['mq']['port'] = '5672'
|
|
|
|
default['openstack']['mq']['user'] = 'guest'
|
|
|
|
default['openstack']['mq']['vhost'] = '/'
|
|
|
|
|
2014-02-13 10:51:40 -08:00
|
|
|
###################################################################
|
|
|
|
# Default qpid and rabbit values (for attribute assignment below)
|
|
|
|
###################################################################
|
|
|
|
qpid_defaults = {
|
|
|
|
username: '',
|
|
|
|
password: '',
|
|
|
|
sasl_mechanisms: '',
|
|
|
|
reconnect: true,
|
|
|
|
reconnect_timeout: 0,
|
|
|
|
reconnect_limit: 0,
|
|
|
|
reconnect_interval_min: 0,
|
|
|
|
reconnect_interval_max: 0,
|
|
|
|
reconnect_interval: 0,
|
|
|
|
heartbeat: 60,
|
|
|
|
protocol: 'tcp',
|
|
|
|
tcp_nodelay: true,
|
|
|
|
host: node['openstack']['mq']['host'],
|
|
|
|
port: node['openstack']['mq']['port'],
|
|
|
|
qpid_hosts: ["#{node['openstack']['mq']['host']}:#{node['openstack']['mq']['port']}"]
|
|
|
|
}
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
|
2014-02-13 10:51:40 -08:00
|
|
|
rabbit_defaults = {
|
|
|
|
userid: node['openstack']['mq']['user'],
|
|
|
|
vhost: node['openstack']['mq']['vhost'],
|
|
|
|
port: node['openstack']['mq']['port'],
|
|
|
|
host: node['openstack']['mq']['host'],
|
|
|
|
ha: false,
|
|
|
|
use_ssl: false
|
|
|
|
}
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
|
2014-02-13 10:51:40 -08:00
|
|
|
###################################################################
|
|
|
|
# Assign default mq attributes for every service
|
|
|
|
###################################################################
|
|
|
|
services.each do |svc|
|
|
|
|
default['openstack']['mq'][svc]['service_type'] = node['openstack']['mq']['service_type']
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
|
2014-02-20 11:42:49 +00:00
|
|
|
case node['openstack']['mq'][svc]['service_type']
|
2014-02-13 10:51:40 -08:00
|
|
|
when 'qpid'
|
|
|
|
qpid_defaults.each do |key, val|
|
|
|
|
default['openstack']['mq'][svc]['qpid'][key.to_s] = val
|
|
|
|
end
|
|
|
|
when 'rabbitmq'
|
|
|
|
rabbit_defaults.each do |key, val|
|
|
|
|
default['openstack']['mq'][svc]['rabbit'][key.to_s] = val
|
|
|
|
end
|
|
|
|
end
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
end
|
|
|
|
|
2014-02-13 10:51:40 -08:00
|
|
|
###################################################################
|
|
|
|
# Overrides and additional attributes for individual services
|
|
|
|
###################################################################
|
|
|
|
# block-storage
|
|
|
|
default['openstack']['mq']['block-storage']['notification_topic'] = 'notifications'
|
|
|
|
default['openstack']['mq']['block-storage']['qpid']['notification_topic'] =
|
|
|
|
node['openstack']['mq']['block-storage']['notification_topic']
|
|
|
|
default['openstack']['mq']['block-storage']['rabbit']['notification_topic'] =
|
|
|
|
node['openstack']['mq']['block-storage']['notification_topic']
|
Initial step to clean up db and mq attributes
Here we move db and mq attributes already present in default.rb
attributes into new files (database.rb,messaging.rb). Additionally, we
pull in rabbit/mq attributes from
openstack-{block-storage,compute,image,metering,network} while
transforming namespace from openstack.SERVICE.mq and
openstack.SERVICE.rabbit to openstack.mq.SERVICE
and openstack.mq.SERVICE.rabbit. Lastly, we copy
openstack.SERVICE.db.username attribute from
openstack-{compute,dashboard,identity,image,metering,network} while
transforming namespace to openstack.db.SERVICE.username.
Change-Id: I50c900aa2ba92ce53f4a6ad05aeabd59e701b514
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-15 15:11:58 +00:00
|
|
|
|
2014-02-13 10:51:40 -08:00
|
|
|
# image
|
|
|
|
default['openstack']['mq']['image']['notifier_strategy'] = 'noop'
|
|
|
|
default['openstack']['mq']['image']['notification_topic'] = 'glance_notifications'
|
|
|
|
default['openstack']['mq']['image']['qpid']['notification_topic'] =
|
|
|
|
node['openstack']['mq']['image']['notification_topic']
|
|
|
|
default['openstack']['mq']['image']['rabbit']['notification_topic'] =
|
|
|
|
node['openstack']['mq']['image']['notification_topic']
|