Merge "Allow binding locally to different IP than endpoint IP"
This commit is contained in:
commit
adff102479
12
README.md
12
README.md
|
@ -152,6 +152,18 @@ MQ attributes
|
|||
* `openstack['image']['mq']['qpid']['protocol']` - Protocol to use. Default tcp.
|
||||
* `openstack['image']['mq']['qpid']['tcp_nodelay']` - Disable the Nagle algorithm. default disabled.
|
||||
|
||||
The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance:
|
||||
|
||||
* `openstack['endpoints']['image-api-bind']['host']` - The IP address to bind the api service to
|
||||
* `openstack['endpoints']['image-api-bind']['port']` - The port to bind the api service to
|
||||
* `openstack['endpoints']['image-api-bind']['bind_interface']` - The interface name to bind the api service to
|
||||
|
||||
* `openstack['endpoints']['image-registry-bind']['host']` - The IP address to bind the registry service to
|
||||
* `openstack['endpoints']['image-registry-bind']['port']` - The port to bind the registry service to
|
||||
* `openstack['endpoints']['image-registry-bind']['bind_interface']` - The interface name to bind the registry service to
|
||||
|
||||
If the value of the 'bind_interface' attribute is non-nil, then the image service will be bound to the first IP address on that interface. If the value of the 'bind_interface' attribute is nil, then the image service will be bound to the IP address specified in the host attribute.
|
||||
|
||||
Testing
|
||||
=====
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ elsif mq_service_type == 'qpid'
|
|||
end
|
||||
|
||||
registry_endpoint = endpoint 'image-registry'
|
||||
api_endpoint = endpoint 'image-api'
|
||||
api_bind = endpoint 'image-api-bind'
|
||||
|
||||
# Possible combinations of options here
|
||||
# - default_store=file
|
||||
|
@ -172,8 +172,8 @@ template '/etc/glance/glance-api.conf' do
|
|||
group node['openstack']['image']['group']
|
||||
mode 00644
|
||||
variables(
|
||||
api_bind_address: api_endpoint.host,
|
||||
api_bind_port: api_endpoint.port,
|
||||
api_bind_address: api_bind.host,
|
||||
api_bind_port: api_bind.port,
|
||||
registry_ip_address: registry_endpoint.host,
|
||||
registry_port: registry_endpoint.port,
|
||||
sql_connection: sql_connection,
|
||||
|
|
|
@ -39,7 +39,7 @@ sql_connection = db_uri('image', db_user, db_pass)
|
|||
|
||||
identity_endpoint = endpoint 'identity-api'
|
||||
identity_admin_endpoint = endpoint 'identity-admin'
|
||||
registry_endpoint = endpoint 'image-registry'
|
||||
registry_bind = endpoint 'image-registry-bind'
|
||||
service_pass = get_password 'service', 'openstack-image'
|
||||
|
||||
auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['image']['registry']['auth']['version']
|
||||
|
@ -95,8 +95,8 @@ template '/etc/glance/glance-registry.conf' do
|
|||
group 'root'
|
||||
mode 00644
|
||||
variables(
|
||||
:registry_bind_address => registry_endpoint.host,
|
||||
:registry_port => registry_endpoint.port,
|
||||
:registry_bind_address => registry_bind.host,
|
||||
:registry_bind_port => registry_bind.port,
|
||||
:sql_connection => sql_connection,
|
||||
:auth_uri => auth_uri,
|
||||
'identity_admin_endpoint' => identity_admin_endpoint,
|
||||
|
|
|
@ -119,7 +119,7 @@ describe 'openstack-image::api' do
|
|||
end
|
||||
|
||||
it 'has bind host when bind_interface specified' do
|
||||
node.set['openstack']['endpoints']['image-api']['bind_interface'] = 'lo'
|
||||
node.set['openstack']['endpoints']['image-api-bind']['bind_interface'] = 'lo'
|
||||
|
||||
match = 'bind_host = 127.0.1.1'
|
||||
expect(chef_run).to render_file(file.name).with_content(match)
|
||||
|
|
|
@ -95,7 +95,7 @@ describe 'openstack-image::registry' do
|
|||
end
|
||||
|
||||
it 'has bind host when bind_interface specified' do
|
||||
node.set['openstack']['endpoints']['image-registry']['bind_interface'] = 'lo'
|
||||
node.set['openstack']['endpoints']['image-registry-bind']['bind_interface'] = 'lo'
|
||||
|
||||
match = 'bind_host = 127.0.1.1'
|
||||
expect(chef_run).to render_file(file.name).with_content(match)
|
||||
|
|
|
@ -11,7 +11,7 @@ debug = <%= node["openstack"]["image"]["debug"] %>
|
|||
bind_host = <%= @registry_bind_address %>
|
||||
|
||||
# Port the bind the registry server to
|
||||
bind_port = <%= @registry_port %>
|
||||
bind_port = <%= @registry_bind_port %>
|
||||
|
||||
# Backlog requests when creating socket
|
||||
backlog = 4096
|
||||
|
|
Loading…
Reference in New Issue