summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Cassiba <s@cassiba.com>2018-06-12 22:23:55 -0700
committerSamuel Cassiba <s@cassiba.com>2018-06-14 19:15:45 -0700
commita5d4ce3bd20b0e03be3423c195c61317a66645bc (patch)
tree6ac5ff1def8cd5c876c87be432c05ec26f2817f4
parent13fe1087c1c66ab27c49274e6e53db4c341c8f0c (diff)
Simplify identity endpointHEADmaster
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
Notes
Notes (review): Code-Review+2: Jan Klare <j.klare@cloudbau.de> Workflow+1: Christoph Albers <c.albers@x-ion.de> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 28 Jun 2018 18:04:12 +0000 Reviewed-on: https://review.openstack.org/574986 Project: openstack/cookbook-openstack-telemetry Branch: refs/heads/master
-rw-r--r--recipes/common.rb8
-rw-r--r--recipes/gnocchi_configure.rb8
-rw-r--r--recipes/identity_registration.rb4
-rw-r--r--spec/identity_registration_spec.rb2
-rw-r--r--spec/spec_helper.rb11
5 files changed, 14 insertions, 19 deletions
diff --git a/recipes/common.rb b/recipes/common.rb
index 927986d..7f2c299 100644
--- a/recipes/common.rb
+++ b/recipes/common.rb
@@ -63,12 +63,8 @@ node.default['openstack']['telemetry']['conf_secrets'].tap do |conf_secrets|
63 get_password 'service', 'openstack-telemetry' 63 get_password 'service', 'openstack-telemetry'
64end 64end
65 65
66identity_public_endpoint = public_endpoint 'identity' 66identity_endpoint = public_endpoint 'identity'
67auth_url = 67auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
68 auth_uri_transform(
69 identity_public_endpoint.to_s,
70 node['openstack']['telemetry']['identity-api']['auth']['version']
71 )
72 68
73node.default['openstack']['telemetry']['conf'].tap do |conf| 69node.default['openstack']['telemetry']['conf'].tap do |conf|
74 conf['api']['host'] = bind_service_address 70 conf['api']['host'] = bind_service_address
diff --git a/recipes/gnocchi_configure.rb b/recipes/gnocchi_configure.rb
index 81025d8..1d544f4 100644
--- a/recipes/gnocchi_configure.rb
+++ b/recipes/gnocchi_configure.rb
@@ -34,12 +34,8 @@ node.default['openstack']['telemetry-metric']['conf_secrets'].tap do |conf_secre
34 get_password 'service', 'openstack-telemetry-metric' 34 get_password 'service', 'openstack-telemetry-metric'
35end 35end
36 36
37identity_public_endpoint = public_endpoint 'identity' 37identity_endpoint = public_endpoint 'identity'
38auth_url = 38auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
39 auth_uri_transform(
40 identity_public_endpoint.to_s,
41 node['openstack']['telemetry-metric']['identity-api']['auth']['version']
42 )
43 39
44node.default['openstack']['telemetry-metric']['conf'].tap do |conf| 40node.default['openstack']['telemetry-metric']['conf'].tap do |conf|
45 conf['api']['host'] = bind_service_address 41 conf['api']['host'] = bind_service_address
diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb
index 3b1319e..f7d3fcb 100644
--- a/recipes/identity_registration.rb
+++ b/recipes/identity_registration.rb
@@ -25,9 +25,9 @@ class ::Chef::Recipe
25 include ::Openstack 25 include ::Openstack
26end 26end
27 27
28identity_admin_endpoint = admin_endpoint 'identity' 28identity_endpoint = public_endpoint 'identity'
29 29
30auth_url = ::URI.decode identity_admin_endpoint.to_s 30auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version']
31admin_user = node['openstack']['identity']['admin_user'] 31admin_user = node['openstack']['identity']['admin_user']
32admin_pass = get_password 'user', node['openstack']['identity']['admin_user'] 32admin_pass = get_password 'user', node['openstack']['identity']['admin_user']
33admin_project = node['openstack']['identity']['admin_project'] 33admin_project = node['openstack']['identity']['admin_project']
diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb
index d68e76d..08dac5c 100644
--- a/spec/identity_registration_spec.rb
+++ b/spec/identity_registration_spec.rb
@@ -25,7 +25,7 @@ describe 'openstack-telemetry::identity_registration' do
25 end 25 end
26 26
27 connection_params = { 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 openstack_username: 'admin', 29 openstack_username: 'admin',
30 openstack_api_key: 'admin-pass', 30 openstack_api_key: 'admin-pass',
31 openstack_project_name: 'admin', 31 openstack_project_name: 'admin',
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 9071950..bf7574a 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -6,16 +6,19 @@ ChefSpec::Coverage.start! { add_filter 'openstack-telemetry' }
6 6
7require 'chef/application' 7require 'chef/application'
8 8
9LOG_LEVEL = :fatal 9RSpec.configure do |config|
10 config.color = true
11 config.formatter = :documentation
12 config.log_level = :fatal
13end
14
10REDHAT_OPTS = { 15REDHAT_OPTS = {
11 platform: 'redhat', 16 platform: 'redhat',
12 version: '7.3', 17 version: '7.4',
13 log_level: ::LOG_LEVEL,
14}.freeze 18}.freeze
15UBUNTU_OPTS = { 19UBUNTU_OPTS = {
16 platform: 'ubuntu', 20 platform: 'ubuntu',
17 version: '16.04', 21 version: '16.04',
18 log_level: ::LOG_LEVEL,
19}.freeze 22}.freeze
20 23
21shared_context 'telemetry-stubs' do 24shared_context 'telemetry-stubs' do