first pass at minimum Grizzly RabbitMQ settings
This commit is contained in:
parent
902add1ca8
commit
93551e4e98
17
README.md
17
README.md
@ -24,10 +24,22 @@ None
|
|||||||
|
|
||||||
## default ##
|
## default ##
|
||||||
|
|
||||||
- configures the messaging service selected by attributes
|
Selects the messaging service selected by the attribute `['openstack']['messaging']['service']`.
|
||||||
|
|
||||||
|
## rabbitmq ##
|
||||||
|
|
||||||
|
Currently the only supported messaging service. Defaults to using the latest release from RabbitMQ.org. Override any attributes from the [rabbitmq cookbook](https://github.com/opscode-cookbooks/rabbitmq) to change behavior.
|
||||||
|
|
||||||
# Attributes #
|
# Attributes #
|
||||||
|
|
||||||
|
* `default['openstack']['role']['messaging']` - which role should other nodes search on to find the messaging service, defaults to 'os-ops-messaging'
|
||||||
|
* `default['openstack']['messaging']['service']` - which service to use, defaults to 'rabbitmq'
|
||||||
|
* `default['openstack']['messaging']['host']` - messaging host
|
||||||
|
* `default['openstack']['messaging']['port']` - messaging port
|
||||||
|
* `default['openstack']['messaging']['user']` - messaging user, default is 'rabbit'
|
||||||
|
* `default['openstack']['messaging']['password']` - password, default is 'password'
|
||||||
|
* `default['openstack']['messaging']['vhost']` - messaging vhost, defaults to '/nova'
|
||||||
|
|
||||||
# Templates #
|
# Templates #
|
||||||
|
|
||||||
None
|
None
|
||||||
@ -37,6 +49,7 @@ License and Author
|
|||||||
|
|
||||||
| | |
|
| | |
|
||||||
|:---------------------|:---------------------------------------------------|
|
|:---------------------|:---------------------------------------------------|
|
||||||
|
| **Author** | John Dewey (<john@dewey.ws>) |
|
||||||
| **Author** | Justin Shepherd (<justin.shepherd@rackspace.com>) |
|
| **Author** | Justin Shepherd (<justin.shepherd@rackspace.com>) |
|
||||||
| **Author** | Jason Cannavale (<jason.cannavale@rackspace.com>) |
|
| **Author** | Jason Cannavale (<jason.cannavale@rackspace.com>) |
|
||||||
| **Author** | Ron Pedde (<ron.pedde@rackspace.com>) |
|
| **Author** | Ron Pedde (<ron.pedde@rackspace.com>) |
|
||||||
@ -46,10 +59,10 @@ License and Author
|
|||||||
| **Author** | Evan Callicoat (<evan.callicoat@rackspace.com>) |
|
| **Author** | Evan Callicoat (<evan.callicoat@rackspace.com>) |
|
||||||
| **Author** | Matt Ray (<matt@opscode.com>) |
|
| **Author** | Matt Ray (<matt@opscode.com>) |
|
||||||
| | |
|
| | |
|
||||||
|
| **Copyright** | Copyright 2012, John Dewey |
|
||||||
| **Copyright** | Copyright (c) 2012-2013, Rackspace US, Inc. |
|
| **Copyright** | Copyright (c) 2012-2013, Rackspace US, Inc. |
|
||||||
| **Copyright** | Copyright (c) 2012-2013, Opscode, Inc. |
|
| **Copyright** | Copyright (c) 2012-2013, Opscode, Inc. |
|
||||||
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
13
attributes/default.rb
Normal file
13
attributes/default.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
default['openstack']['role']['messaging'] = 'os-ops-messaging'
|
||||||
|
|
||||||
|
default['openstack']['messaging']['service'] = 'rabbitmq'
|
||||||
|
|
||||||
|
# default['rabbitmq']['port'] = 5672
|
||||||
|
# default['rabbitmq']['address'] = '0.0.0.0'
|
||||||
|
|
||||||
|
default['openstack']['messaging']['host'] = node['rabbitmq']['address']
|
||||||
|
default['openstack']['messaging']['port'] = node['rabbitmq']['port']
|
||||||
|
default['openstack']['messaging']['user'] = 'rabbit'
|
||||||
|
default['openstack']['messaging']['password'] = 'password'
|
||||||
|
default['openstack']['messaging']['vhost'] = '/nova'
|
||||||
|
|
15
metadata.rb
Normal file
15
metadata.rb
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name "openstack-ops-messaging"
|
||||||
|
maintainer "Opscode, Inc."
|
||||||
|
maintainer_email "matt@opscode.com"
|
||||||
|
license "Apache 2.0"
|
||||||
|
description "Provides the shared messaging configuration for Chef for OpenStack."
|
||||||
|
version "0.1.0"
|
||||||
|
|
||||||
|
recipe "default", "Selects messaging service."
|
||||||
|
recipe "rabbitmq", "Configures RabbitMQ."
|
||||||
|
|
||||||
|
%w{ ubuntu }.each do |os|
|
||||||
|
supports os
|
||||||
|
end
|
||||||
|
|
||||||
|
depends "rabbitmq", ">= 2.0.0"
|
20
recipes/default.rb
Normal file
20
recipes/default.rb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#
|
||||||
|
# Cookbook Name:: openstack-ops-messaging
|
||||||
|
# Recipe:: default
|
||||||
|
#
|
||||||
|
# Copyright 2013, Opscode, Inc.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
include_recipe "openstack-ops-messaging::#{node['openstack']['messaging']['service']}"
|
52
recipes/rabbitmq.rb
Normal file
52
recipes/rabbitmq.rb
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#
|
||||||
|
# Cookbook Name:: openstack-ops-messaging
|
||||||
|
# Recipe:: rabbitmq
|
||||||
|
#
|
||||||
|
# Copyright 2013, Opscode, Inc.
|
||||||
|
# Copyright 2012, John Dewey
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
include_recipe "rabbitmq"
|
||||||
|
include_recipe "rabbitmq::mgmt_console"
|
||||||
|
|
||||||
|
user = node['openstack']['messaging']['user']
|
||||||
|
vhost = node['openstack']['messaging']['vhost']
|
||||||
|
|
||||||
|
# remove the guest user
|
||||||
|
rabbitmq_user 'guest' do
|
||||||
|
action :delete
|
||||||
|
not_if { user.eql?('guest') }
|
||||||
|
end
|
||||||
|
|
||||||
|
rabbitmq_user user do
|
||||||
|
password node['openstack']['messaging']['password']
|
||||||
|
action :add
|
||||||
|
end
|
||||||
|
|
||||||
|
rabbitmq_vhost vhost do
|
||||||
|
action :add
|
||||||
|
end
|
||||||
|
|
||||||
|
rabbitmq_user user do
|
||||||
|
vhost vhost
|
||||||
|
permissions ".* .* .*"
|
||||||
|
action :set_permissions
|
||||||
|
end
|
||||||
|
|
||||||
|
# Necessary for graphing.
|
||||||
|
rabbitmq_user user do
|
||||||
|
tag "administrator"
|
||||||
|
action :set_tags
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user