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: Iafb0db54b3589eea0402c0f18687344667d0208a
Implements: blueprint simplify-identity-endpoint
This commit is contained in:
Samuel Cassiba 2018-06-12 21:51:49 -07:00
parent 3abd92ed25
commit 5058033a1a
4 changed files with 10 additions and 15 deletions

View File

@ -30,10 +30,8 @@ end
include_recipe 'openstack-identity'
platform_options = node['openstack']['dashboard']['platform']
identity_admin_endpoint = admin_endpoint 'identity'
auth_admin_uri = auth_uri_transform identity_admin_endpoint.to_s, node['openstack']['dashboard']['api']['auth']['version']
identity_endpoint = public_endpoint 'identity'
auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['dashboard']['api']['auth']['version']
auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
http_bind = node['openstack']['bind_service']['dashboard_http']
http_bind_address = bind_address http_bind
@ -78,8 +76,7 @@ template node['openstack']['dashboard']['local_settings_path'] do
variables(
db_pass: db_pass,
db_info: db_info,
auth_uri: auth_uri,
auth_admin_uri: auth_admin_uri,
auth_url: auth_url,
memcached_servers: memcached,
host: horizon_host
)

View File

@ -367,10 +367,6 @@ describe 'openstack-dashboard::horizon' do
expect(chef_run).to render_file(file.name).with_content(%r{OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000/v3"})
end
it 'has a keystone admin url' do
expect(chef_run).to render_file(file.name).with_content(%r{OPENSTACK_KEYSTONE_ADMIN_URL = "http://127.0.0.1:35357/v3"})
end
it 'has a keystone default role' do
node.set['openstack']['dashboard']['keystone_default_role'] = 'keystone_default_role_value'
expect(chef_run).to render_file(file.name).with_content(/^OPENSTACK_KEYSTONE_DEFAULT_ROLE = "keystone_default_role_value"$/)

View File

@ -4,16 +4,19 @@ require 'chefspec/berkshelf'
ChefSpec::Coverage.start! { add_filter 'openstack-dashboard' }
LOG_LEVEL = :fatal
RSpec.configure do |config|
config.color = true
config.formatter = :documentation
config.log_level = :fatal
end
REDHAT_OPTS = {
platform: 'redhat',
version: '7.3',
log_level: LOG_LEVEL,
version: '7.4',
}.freeze
UBUNTU_OPTS = {
platform: 'ubuntu',
version: '16.04',
log_level: LOG_LEVEL,
}.freeze
# Build a regex for a section of lines

View File

@ -170,8 +170,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# ]
OPENSTACK_HOST = "<%= @host %>"
OPENSTACK_KEYSTONE_URL = "<%= @auth_uri %>"
OPENSTACK_KEYSTONE_ADMIN_URL = "<%= @auth_admin_uri %>"
OPENSTACK_KEYSTONE_URL = "<%= @auth_url %>"
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "<%= node["openstack"]["dashboard"]["keystone_default_role"] %>"
OPENSTACK_KEYSTONE_ADMIN_ROLES = ["admin"]