Simplify identity endpoint
Per the Keystone Install Guide[1] the admin endpoint is superseded in favor of a single public endpoint. As a result, the admin endpoint is no longer deployed by default. [1] https://docs.openstack.org/keystone/queens/install/keystone-install-ubuntu.html#install-and-configure-components Change-Id: I833cc80421be375aed202c208cf93a0165761226 Implements: blueprint simplify-identity-endpoint
This commit is contained in:
parent
3abbcabe46
commit
c6195859d9
@ -77,8 +77,8 @@ if node['openstack']['mq']['service_type'] == 'rabbit'
|
|||||||
node.default['openstack']['network']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'network'
|
node.default['openstack']['network']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'network'
|
||||||
end
|
end
|
||||||
|
|
||||||
identity_public_endpoint = public_endpoint 'identity'
|
identity_endpoint = public_endpoint 'identity'
|
||||||
auth_url = identity_public_endpoint.to_s
|
auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
|
||||||
|
|
||||||
db_user = node['openstack']['db']['network']['username']
|
db_user = node['openstack']['db']['network']['username']
|
||||||
db_pass = get_password 'db', 'neutron'
|
db_pass = get_password 'db', 'neutron'
|
||||||
@ -88,12 +88,8 @@ bind_service_address = bind_address bind_service
|
|||||||
# The auth_url in nova section follows auth_type
|
# The auth_url in nova section follows auth_type
|
||||||
nova_auth_url = nil
|
nova_auth_url = nil
|
||||||
case node['openstack']['network']['conf']['nova']['auth_type']
|
case node['openstack']['network']['conf']['nova']['auth_type']
|
||||||
when 'password'
|
|
||||||
nova_auth_url = auth_uri
|
|
||||||
when 'v2password'
|
|
||||||
nova_auth_url = auth_uri_transform(identity_public_endpoint.to_s, 'v2.0')
|
|
||||||
when 'v3password'
|
when 'v3password'
|
||||||
nova_auth_url = auth_uri_transform(identity_public_endpoint.to_s, 'v3.0')
|
nova_auth_url = auth_url
|
||||||
end
|
end
|
||||||
|
|
||||||
node.default['openstack']['network']['conf'].tap do |conf|
|
node.default['openstack']['network']['conf'].tap do |conf|
|
||||||
|
@ -26,9 +26,8 @@ class ::Chef::Recipe
|
|||||||
include ::Openstack
|
include ::Openstack
|
||||||
end
|
end
|
||||||
|
|
||||||
identity_admin_endpoint = admin_endpoint 'identity'
|
identity_endpoint = public_endpoint 'identity'
|
||||||
|
auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
|
||||||
auth_url = ::URI.decode identity_admin_endpoint.to_s
|
|
||||||
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
public: { url: public_endpoint('network') },
|
public: { url: public_endpoint('network') },
|
||||||
|
@ -92,7 +92,6 @@ describe 'openstack-network' do
|
|||||||
/^username = neutron$/,
|
/^username = neutron$/,
|
||||||
/^user_domain_name = Default/,
|
/^user_domain_name = Default/,
|
||||||
/^project_domain_name = Default/,
|
/^project_domain_name = Default/,
|
||||||
%r{^auth_url = http://127\.0\.0\.1:5000/v3$},
|
|
||||||
/^password = neutron-pass$/,
|
/^password = neutron-pass$/,
|
||||||
/^auth_type = v3password$/,
|
/^auth_type = v3password$/,
|
||||||
].each do |line|
|
].each do |line|
|
||||||
@ -104,7 +103,6 @@ describe 'openstack-network' do
|
|||||||
[
|
[
|
||||||
/^region_name = RegionOne$/,
|
/^region_name = RegionOne$/,
|
||||||
/^auth_type = v3password$/,
|
/^auth_type = v3password$/,
|
||||||
%r{^auth_url = http://127\.0\.0\.1:5000/v3$},
|
|
||||||
/^username = nova$/,
|
/^username = nova$/,
|
||||||
/^user_domain_name = Default/,
|
/^user_domain_name = Default/,
|
||||||
/^project_domain_name = Default/,
|
/^project_domain_name = Default/,
|
||||||
|
@ -14,7 +14,7 @@ describe 'openstack-network::identity_registration' do
|
|||||||
include_context 'neutron-stubs'
|
include_context 'neutron-stubs'
|
||||||
|
|
||||||
connection_params = {
|
connection_params = {
|
||||||
openstack_auth_url: 'http://127.0.0.1:35357/v3/auth/tokens',
|
openstack_auth_url: 'http://127.0.0.1:5000/v3/auth/tokens',
|
||||||
openstack_username: 'admin',
|
openstack_username: 'admin',
|
||||||
openstack_api_key: 'admin-pass',
|
openstack_api_key: 'admin-pass',
|
||||||
openstack_project_name: 'admin',
|
openstack_project_name: 'admin',
|
||||||
|
@ -7,21 +7,23 @@ ChefSpec::Coverage.start! { add_filter 'openstack-network' }
|
|||||||
|
|
||||||
require 'chef/application'
|
require 'chef/application'
|
||||||
|
|
||||||
LOG_LEVEL = :fatal
|
RSpec.configure do |config|
|
||||||
|
config.color = true
|
||||||
|
config.formatter = :documentation
|
||||||
|
config.log_level = :fatal
|
||||||
|
end
|
||||||
|
|
||||||
REDHAT_OPTS = {
|
REDHAT_OPTS = {
|
||||||
platform: 'redhat',
|
platform: 'redhat',
|
||||||
version: '7.3',
|
version: '7.4',
|
||||||
log_level: LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
UBUNTU_OPTS = {
|
UBUNTU_OPTS = {
|
||||||
platform: 'ubuntu',
|
platform: 'ubuntu',
|
||||||
version: '16.04',
|
version: '16.04',
|
||||||
log_level: LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
CENTOS_OPTS = {
|
CENTOS_OPTS = {
|
||||||
platform: 'centos',
|
platform: 'centos',
|
||||||
version: '7.3.1611',
|
version: '7.4.1708',
|
||||||
log_level: LOG_LEVEL,
|
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
shared_context 'neutron-stubs' do
|
shared_context 'neutron-stubs' do
|
||||||
|
Loading…
Reference in New Issue
Block a user