From aa01cbb34bec7f7f4ec5f14dc25ac1155758c0f8 Mon Sep 17 00:00:00 2001 From: Sergey Reshetnyak Date: Mon, 13 Feb 2017 17:25:43 +0300 Subject: [PATCH] Use keystone_authtoken macros for auth Change-Id: I57c9c80d31753ee08f5fc349df42f29cec3eb285 Depends-on: Icd3a2276097a52e77a31cb7eeeffb2d5bca8492b --- service/files/sahara.conf.j2 | 11 +---------- service/sahara-api.yaml | 6 +++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/service/files/sahara.conf.j2 b/service/files/sahara.conf.j2 index 22180c1..0c2b2a5 100644 --- a/service/files/sahara.conf.j2 +++ b/service/files/sahara.conf.j2 @@ -19,16 +19,7 @@ heat_enable_wait_condition = {{ sahara.enable_wait_condition }} connection = mysql+pymysql://{{ sahara.db.username }}:{{ sahara.db.password }}@{{ address(service.database) }}/{{ sahara.db.name }} max_retries = -1 -[keystone_authtoken] -auth_uri = {{ address("keystone", keystone.public_port, with_scheme=True) }} -auth_url = {{ address("keystone", keystone.admin_port, with_scheme=True) }} -auth_type = password -project_domain_id = default -user_domain_id = default -project_name = {{ openstack.project_name }} -username = {{ sahara.auth.user }} -password = {{ sahara.auth.password }} -memcached_servers = {{ address("memcached", memcached.port) }} +{{ keystone_authtoken.keystone_authtoken(sahara.auth.user, sahara.auth.password) }} # sahara trustor user admin_password = {{ sahara.auth.password }} diff --git a/service/sahara-api.yaml b/service/sahara-api.yaml index 86c0fdd..27eac88 100644 --- a/service/sahara-api.yaml +++ b/service/sahara-api.yaml @@ -24,14 +24,14 @@ service: command: sahara-db-manage --config-file /etc/sahara/sahara.conf upgrade head - name: sahara-user-create dependencies: - - keystone + - keystone-create-domain type: single - command: openstack user create --domain default --password {{ sahara.auth.password }} {{ sahara.auth.user }} + command: openstack user create --domain {{ service_account.domain }} --password {{ sahara.auth.password }} {{ sahara.auth.user }} - name: sahara-role-add dependencies: - sahara-user-create type: single - command: openstack role add --project {{ openstack.project_name }} --user {{ sahara.auth.user }} admin + command: openstack role add --domain {{ service_account.domain }} --user {{ sahara.auth.user }} admin - name: sahara-service-create dependencies: - keystone