From e7f5813c755fc4009ce056c3a8581914e5c15cbe Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Mon, 16 Jul 2018 12:40:50 -0700 Subject: [PATCH] Use internal identity endpoint for services - uses internal Keystone endpoint for service-level communication - removes use_inline_resources Depends-On: Id74966d9f1279f725bc41c08e434230a7845bbc1 Depends-On: I161af1074cd17f2e3d2d2cf0b37a0c5fa1015fd3 Change-Id: Iabb4f3549fed0d8e0a5da0beb348ca29e5a14557 --- providers/image.rb | 2 -- recipes/api.rb | 4 ++-- recipes/identity_registration.rb | 4 ++-- recipes/image_upload.rb | 2 +- recipes/registry.rb | 4 ++-- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/providers/image.rb b/providers/image.rb index 32d8c59..badd4e0 100644 --- a/providers/image.rb +++ b/providers/image.rb @@ -21,8 +21,6 @@ include ::Openstack -use_inline_resources - action :upload do @user = new_resource.identity_user @pass = new_resource.identity_pass diff --git a/recipes/api.rb b/recipes/api.rb index 410be71..7ffa2fc 100644 --- a/recipes/api.rb +++ b/recipes/api.rb @@ -68,8 +68,8 @@ node.default['openstack']['image_api']['conf_secrets'] .[]('keystone_authtoken')['password'] = get_password 'service', 'openstack-image' -identity_endpoint = public_endpoint 'identity' -auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version'] +identity_endpoint = internal_endpoint 'identity' +auth_url = ::URI.decode identity_endpoint.to_s db_user = node['openstack']['db']['image']['username'] db_pass = get_password 'db', 'glance' diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index ff6d37f..24361d3 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -26,8 +26,8 @@ class ::Chef::Recipe include ::Openstack end -identity_endpoint = public_endpoint 'identity' -auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version'] +identity_endpoint = internal_endpoint 'identity' +auth_url = ::URI.decode identity_endpoint.to_s interfaces = { public: { url: public_endpoint('image_api') }, diff --git a/recipes/image_upload.rb b/recipes/image_upload.rb index 7edfd6b..31ce488 100644 --- a/recipes/image_upload.rb +++ b/recipes/image_upload.rb @@ -33,7 +33,7 @@ package 'curl' do end identity_endpoint = public_endpoint 'identity' -auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version'] +auth_url = ::URI.decode identity_endpoint.to_s # admin_user = node['openstack']['image_api']['conf']['keystone_authtoken']['username'] # admin_pass = get_password admin_user, admin_pass diff --git a/recipes/registry.rb b/recipes/registry.rb index 9a0cd3b..1c258ff 100644 --- a/recipes/registry.rb +++ b/recipes/registry.rb @@ -45,8 +45,8 @@ registry_bind_address = bind_address registry_bind node.default['openstack']['image_registry']['conf_secrets'] .[]('keystone_authtoken')['password'] = get_password 'service', 'openstack-image' -identity_endpoint = public_endpoint 'identity' -auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['api']['auth']['version'] +identity_endpoint = internal_endpoint 'identity' +auth_url = ::URI.decode identity_endpoint.to_s glance_user = node['openstack']['image']['user'] glance_group = node['openstack']['image']['group']