summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Cassiba <s@cassiba.com>2018-02-16 11:09:28 -0800
committerSamuel Cassiba <s@cassiba.com>2018-02-16 11:09:28 -0800
commit15d2af9791c2f87e4d7f69676356e5ab52a4df0f (patch)
tree8b665a7e4c5a4e2a1c339e2c8a0c0fe29881422d
parente80a078fae76d9734c285c22fa6ca817bbf33166 (diff)
update recipes for Chef 13
-rw-r--r--recipes/common.rb6
-rw-r--r--recipes/identity_registration.rb15
2 files changed, 8 insertions, 13 deletions
diff --git a/recipes/common.rb b/recipes/common.rb
index bfca7c2..1170d42 100644
--- a/recipes/common.rb
+++ b/recipes/common.rb
@@ -18,7 +18,7 @@
18# limitations under the License. 18# limitations under the License.
19# 19#
20 20
21class ::Chef::Recipe # rubocop:disable Documentation 21class ::Chef::Recipe
22 include ::Openstack 22 include ::Openstack
23end 23end
24 24
@@ -67,7 +67,7 @@ end
67db_user = node['openstack']['db']['dns']['username'] 67db_user = node['openstack']['db']['dns']['username']
68db_pass = get_password 'db', 'designate' 68db_pass = get_password 'db', 'designate'
69 69
70public_identity_endpoint = identity_uri_transform(public_endpoint 'identity') 70public_identity_endpoint = identity_uri_transform(public_endpoint('identity'))
71identity_endpoint = internal_endpoint 'identity' 71identity_endpoint = internal_endpoint 'identity'
72 72
73bind_services = node['openstack']['bind_service']['all'] 73bind_services = node['openstack']['bind_service']['all']
@@ -78,7 +78,7 @@ auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['dns']['
78# define attributes that are needed in designate.conf 78# define attributes that are needed in designate.conf
79node.default['openstack']['dns']['conf'].tap do |conf| 79node.default['openstack']['dns']['conf'].tap do |conf|
80 conf['service:api']['api_host'] = bind_address api_bind 80 conf['service:api']['api_host'] = bind_address api_bind
81 conf['service:api']['api_port'] = api_bind.port 81 conf['service:api']['api_port'] = api_bind['port']
82 conf['keystone_authtoken']['auth_uri'] = public_identity_endpoint 82 conf['keystone_authtoken']['auth_uri'] = public_identity_endpoint
83 conf['keystone_authtoken']['auth_url'] = auth_url 83 conf['keystone_authtoken']['auth_url'] = auth_url
84end 84end
diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb
index a803fee..71c45ea 100644
--- a/recipes/identity_registration.rb
+++ b/recipes/identity_registration.rb
@@ -20,7 +20,7 @@
20 20
21require 'uri' 21require 'uri'
22 22
23class ::Chef::Recipe # rubocop:disable Documentation 23class ::Chef::Recipe
24 include ::Openstack 24 include ::Openstack
25end 25end
26 26
@@ -49,7 +49,7 @@ connection_params = {
49 openstack_username: admin_user, 49 openstack_username: admin_user,
50 openstack_api_key: admin_pass, 50 openstack_api_key: admin_pass,
51 openstack_project_name: admin_project, 51 openstack_project_name: admin_project,
52 openstack_domain_name: admin_domain 52 openstack_domain_name: admin_domain,
53} 53}
54 54
55# Register DNS Service 55# Register DNS Service
@@ -70,6 +70,7 @@ end
70# Register DNS Internal-Endpoint 70# Register DNS Internal-Endpoint
71openstack_endpoint service_type do 71openstack_endpoint service_type do
72 service_name service_name 72 service_name service_name
73 interface 'internal'
73 url internal_designate_endpoint.to_s 74 url internal_designate_endpoint.to_s
74 region region 75 region region
75 connection_params connection_params 76 connection_params connection_params
@@ -82,16 +83,10 @@ end
82 83
83# Register Service User 84# Register Service User
84openstack_user service_user do 85openstack_user service_user do
86 role_name service_role
85 project_name service_project_name 87 project_name service_project_name
86 domain_name service_domain_name 88 domain_name service_domain_name
87 password service_pass 89 password service_pass
88 connection_params connection_params 90 connection_params connection_params
89end 91 action [:create, :grant_role]
90
91## Grant Service role to Service User for Service Project ##
92openstack_user service_user do
93 role_name service_role
94 project_name service_project_name
95 connection_params connection_params
96 action :grant_role
97end 92end