Merge "Add ability to specify IP for service"

This commit is contained in:
Jenkins 2014-03-14 16:17:34 +00:00 committed by Gerrit Code Review
commit 8579522b78
4 changed files with 14 additions and 7 deletions

View File

@ -69,9 +69,18 @@ None
# Attributes #
* `openstack["db"]["bind_interface"]` - bind to interfaces IPv4 address
* `openstack["db"]["platform"]["mysql_python_packages"]` - platform-specific mysql python packages to install
The following attributes are defined in attributes/database.rb of the common cookbook, but are documented here due to their relevance:
* `openstack["endpoints"]["db"]["host"]` - The IP address to bind the database service to
* `openstack["endpoints"]["db"]["scheme"]` - Unused at this time
* `openstack["endpoints"]["db"]["port"]` - The port to bind the database service to
* `openstack["endpoints"]["db"]["path"]` - Unused at this time
* `openstack["endpoints"]["db"]["bind_interface"]` - The interface name to bind the database service to
If the value of the "bind_interface" attribute is non-nil, then the database service will be bound to the first IP address on that interface. If the value of the "bind_interface" attribute is nil, then the database service will be bound to the IP address specified in the host attribute.
Testing
=====

View File

@ -18,8 +18,6 @@
# limitations under the License.
#
default['openstack']['db']['bind_interface'] = 'lo'
# Platform defaults
case platform
when 'fedora', 'redhat', 'centos' # :pragma-foodcritic: ~FC024 - won't fix this

View File

@ -24,9 +24,9 @@ class ::Chef::Recipe # rubocop:disable Documentation
include ::Openstack
end
listen_address = address_for node['openstack']['db']['bind_interface']
db_endpoint = endpoint 'db'
node.override['mysql']['bind_address'] = listen_address
node.override['mysql']['bind_address'] = db_endpoint.host
node.override['mysql']['tunable']['innodb_thread_concurrency'] = '0'
node.override['mysql']['tunable']['innodb_commit_concurrency'] = '0'
node.override['mysql']['tunable']['innodb_read_io_threads'] = '4'

View File

@ -25,9 +25,9 @@ class ::Chef::Recipe # rubocop:disable Documentation
include ::Openstack
end
listen_address = address_for node['openstack']['db']['bind_interface']
db_endpoint = endpoint 'db'
node.override['postgresql']['config']['listen_addresses'] = listen_address
node.override['postgresql']['config']['listen_addresses'] = db_endpoint.host
include_recipe 'openstack-ops-database::postgresql-client'
include_recipe 'postgresql::server'