Drop support for a templated catalog

This was only half-working anyway since we moved to keystone V3, so we
should just drop it. If someone wants to configure their deployment with
it, they can easily set up a wrapper for it.

Change-Id: Ifdf96502d18895e3b79dfa235fd102b42a0f4bc3
This commit is contained in:
Jens Harbott 2019-04-04 12:47:44 +00:00
parent af1d3b1485
commit 4313c5711f
5 changed files with 0 additions and 107 deletions

View File

@ -44,8 +44,6 @@ default['openstack']['bind_service']['public']['identity']['host'] = '127.0.0.1'
# port for openstack identity service main endpoint to bind to
default['openstack']['bind_service']['public']['identity']['port'] = 5000
# identity service catalog backend for service endpoints
default['openstack']['identity']['catalog']['backend'] = 'sql'
# identity service token backend for user and service tokens
default['openstack']['identity']['token']['backend'] = 'sql'

View File

@ -22,9 +22,6 @@ default['openstack']['identity']['conf'].tap do |conf|
conf['cache']['enabled'] = true
conf['cache']['backend'] = 'oslo_cache.memcache_pool'
# [catalog] option in keystone.conf to set catalog driver
conf['catalog']['driver'] = 'sql'
# [policy] option in keystone.conf to set policy backend driver
conf['policy']['driver'] = 'sql'
end

View File

@ -197,44 +197,6 @@ ruby_block "delete all attributes in node['openstack']['identity']['conf_secrets
end
end
# TODO: (jklare) needs to be refactored and filled by the service cookbooks, to
# avoid dependencies on unused cookbooks
# configure the endpoints in keystone_catalog.templates if the catalog backend
# is templated
if node['openstack']['identity']['catalog']['backend'] == 'templated'
# These values are going into the templated catalog and
# since they're the endpoints being used by the clients,
# we should put in the public endpoints for each service.
compute_public_endpoint = public_endpoint 'compute'
ec2_public_endpoint = public_endpoint 'compute-ec2'
image_public_endpoint = public_endpoint 'image'
network_public_endpoint = public_endpoint 'network'
volume_public_endpoint = public_endpoint 'block-storage'
# populate the templated catalog
# TODO: (jklare) this should be done in a helper method
uris = {
'identity-admin' => identity_internal_endpoint.to_s.gsub('%25', '%'),
'identity' => identity_endpoint.to_s.gsub('%25', '%'),
'image' => image_public_endpoint.to_s.gsub('%25', '%'),
'compute' => compute_public_endpoint.to_s.gsub('%25', '%'),
'ec2' => ec2_public_endpoint.to_s.gsub('%25', '%'),
'network' => network_public_endpoint.to_s.gsub('%25', '%'),
'volume' => volume_public_endpoint.to_s.gsub('%25', '%'),
}
template '/etc/keystone/default_catalog.templates' do
source 'default_catalog.templates.erb'
owner keystone_user
group keystone_group
mode 0o0644
variables(
uris: uris
)
end
end
# sync db after keystone.conf is generated
execute 'keystone-manage db_sync' do
user 'root'

View File

@ -212,22 +212,6 @@ describe 'openstack-identity::server-apache' do
end
end
describe '[catalog] section' do
# use let() to access Helpers#line_regexp method
let(:templated) do
str = 'driver = keystone.catalog.backends.templated.TemplatedCatalog'
line_regexp(str)
end
let(:sql) do
line_regexp('driver = sql')
end
it 'configures driver' do
expect(chef_run).to render_config_file(path).with_content(sql)
expect(chef_run).not_to render_config_file(path).with_section_content('catalog', templated)
end
end
describe '[policy] section' do
it 'configures driver' do
r = line_regexp('driver = sql')
@ -236,16 +220,6 @@ describe 'openstack-identity::server-apache' do
end
end
describe 'default_catalog.templates' do
let(:file) { '/etc/keystone/default_catalog.templates' }
describe 'without templated backend' do
it 'does not create' do
expect(chef_run).not_to render_file(file)
end
end
end
describe 'db_sync' do
let(:cmd) { 'keystone-manage db_sync' }
@ -265,15 +239,6 @@ describe 'openstack-identity::server-apache' do
describe 'keystone-paste.ini as template' do
let(:path) { '/etc/keystone/keystone-paste.ini' }
let(:template) { chef_run.template(path) }
it 'creates /etc/keystone/default_catalog.templates' do
expect(chef_run).to create_template(template.name).with(
user: 'keystone',
group: 'keystone',
mode: 0o644
)
end
it 'has default api pipeline values' do
expect(chef_run).to render_config_file(path).with_section_content(

View File

@ -1,29 +0,0 @@
catalog.<%= node['openstack']['identity']['region'] %>.identity.publicURL = <%= @uris['identity'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.identity.adminURL = <%= @uris['identity-admin'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.identity.internalURL = <%= @uris['identity-admin'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.identity.name = Identity Service
catalog.<%= node['openstack']['identity']['region'] %>.compute.publicURL = <%= @uris['compute'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.compute.adminURL = <%= @uris['compute'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.compute.internalURL = <%= @uris['compute'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.compute.name = Compute Service
catalog.<%= node['openstack']['identity']['region'] %>.volume.publicURL = <%= @uris['volume'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.volume.adminURL = <%= @uris['volume'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.volume.internalURL = <%= @uris['volume'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.volume.name = Volume Service
catalog.<%= node['openstack']['identity']['region'] %>.ec2.publicURL = <%= @uris['ec2'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.ec2.adminURL = <%= @uris['ec2'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.ec2.internalURL = <%= @uris['ec2'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.ec2.name = EC2 Service
catalog.<%= node['openstack']['identity']['region'] %>.image.publicURL = <%= @uris['image'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.image.adminURL = <%= @uris['image'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.image.internalURL = <%= @uris['image'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.image.name = Image Service
catalog.<%= node['openstack']['identity']['region'] %>.network.publicURL = <%= @uris['network'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.network.adminURL = <%= @uris['network'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.network.internalURL = <%= @uris['network'].to_s %>
catalog.<%= node['openstack']['identity']['region'] %>.network.name = Network Service