diff --git a/service/files/sahara.conf.j2 b/service/files/sahara.conf.j2 index 1680b0d..0dae9f0 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 }}{% if percona.tls.enabled %}?ssl_ca=/opt/ccp/etc/tls/ca.pem{% endif %} 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 9afd68c..77f46a7 100644 --- a/service/sahara-api.yaml +++ b/service/sahara-api.yaml @@ -27,14 +27,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