Browse Source

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: Ic2733d94e776eaa50ad8e4a39e6d2a8c18a45d89
Implements: blueprint simplify-identity-endpoint
changes/86/574986/2
Samuel Cassiba 1 year ago
parent
commit
a5d4ce3bd2

+ 2
- 6
recipes/common.rb View File

@@ -63,12 +63,8 @@ node.default['openstack']['telemetry']['conf_secrets'].tap do |conf_secrets|
63 63
     get_password 'service', 'openstack-telemetry'
64 64
 end
65 65
 
66
-identity_public_endpoint = public_endpoint 'identity'
67
-auth_url =
68
-  auth_uri_transform(
69
-    identity_public_endpoint.to_s,
70
-    node['openstack']['telemetry']['identity-api']['auth']['version']
71
-  )
66
+identity_endpoint = public_endpoint 'identity'
67
+auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
72 68
 
73 69
 node.default['openstack']['telemetry']['conf'].tap do |conf|
74 70
   conf['api']['host'] = bind_service_address

+ 2
- 6
recipes/gnocchi_configure.rb View File

@@ -34,12 +34,8 @@ node.default['openstack']['telemetry-metric']['conf_secrets'].tap do |conf_secre
34 34
     get_password 'service', 'openstack-telemetry-metric'
35 35
 end
36 36
 
37
-identity_public_endpoint = public_endpoint 'identity'
38
-auth_url =
39
-  auth_uri_transform(
40
-    identity_public_endpoint.to_s,
41
-    node['openstack']['telemetry-metric']['identity-api']['auth']['version']
42
-  )
37
+identity_endpoint = public_endpoint 'identity'
38
+auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
43 39
 
44 40
 node.default['openstack']['telemetry-metric']['conf'].tap do |conf|
45 41
   conf['api']['host'] = bind_service_address

+ 2
- 2
recipes/identity_registration.rb View File

@@ -25,9 +25,9 @@ class ::Chef::Recipe
25 25
   include ::Openstack
26 26
 end
27 27
 
28
-identity_admin_endpoint = admin_endpoint 'identity'
28
+identity_endpoint = public_endpoint 'identity'
29 29
 
30
-auth_url = ::URI.decode identity_admin_endpoint.to_s
30
+auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
31 31
 admin_user = node['openstack']['identity']['admin_user']
32 32
 admin_pass = get_password 'user', node['openstack']['identity']['admin_user']
33 33
 admin_project = node['openstack']['identity']['admin_project']

+ 1
- 1
spec/identity_registration_spec.rb View File

@@ -25,7 +25,7 @@ describe 'openstack-telemetry::identity_registration' do
25 25
       end
26 26
 
27 27
       connection_params = {
28
-        openstack_auth_url: 'http://127.0.0.1:35357/v3/auth/tokens',
28
+        openstack_auth_url: 'http://127.0.0.1:5000/v3/auth/tokens',
29 29
         openstack_username: 'admin',
30 30
         openstack_api_key: 'admin-pass',
31 31
         openstack_project_name: 'admin',

+ 7
- 4
spec/spec_helper.rb View File

@@ -6,16 +6,19 @@ ChefSpec::Coverage.start! { add_filter 'openstack-telemetry' }
6 6
 
7 7
 require 'chef/application'
8 8
 
9
-LOG_LEVEL = :fatal
9
+RSpec.configure do |config|
10
+  config.color = true
11
+  config.formatter = :documentation
12
+  config.log_level = :fatal
13
+end
14
+
10 15
 REDHAT_OPTS = {
11 16
   platform: 'redhat',
12
-  version: '7.3',
13
-  log_level: ::LOG_LEVEL,
17
+  version: '7.4',
14 18
 }.freeze
15 19
 UBUNTU_OPTS = {
16 20
   platform: 'ubuntu',
17 21
   version: '16.04',
18
-  log_level: ::LOG_LEVEL,
19 22
 }.freeze
20 23
 
21 24
 shared_context 'telemetry-stubs' do

Loading…
Cancel
Save