diff --git a/ansible/roles/keystone/tasks/bootstrap.yml b/ansible/roles/keystone/tasks/bootstrap.yml index d1b9fcfa19..f23bcd09a8 100644 --- a/ansible/roles/keystone/tasks/bootstrap.yml +++ b/ansible/roles/keystone/tasks/bootstrap.yml @@ -52,8 +52,8 @@ PUBLIC_URL: "http://{{ kolla_external_address }}:{{ keystone_public_port }}/v2.0" INTERNAL_URL: "http://{{ kolla_internal_address }}:{{ keystone_public_port }}/v2.0" ADMIN_URL: "http://{{ kolla_internal_address }}:{{ keystone_admin_port }}/v2.0" - OS_SERVICE_TOKEN: "{{ keystone_admin_token }}" - OS_SERVICE_ENDPOINT: "http://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_admin_port }}/v2.0" + OS_TOKEN: "{{ keystone_admin_token }}" + OS_URL: "http://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_admin_port }}/v2.0" run_once: True when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed diff --git a/docker/keystone/start.sh b/docker/keystone/start.sh index d964b0303c..0f1dc7db02 100755 --- a/docker/keystone/start.sh +++ b/docker/keystone/start.sh @@ -29,19 +29,16 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then $CMD sleep 5 - keystone service-create --name keystone --type identity \ - --description "OpenStack Identity" - keystone endpoint-create --region "${REGION_NAME}" \ + openstack service create --name keystone --description "OpenStack Identity" identity + openstack endpoint create --region "${REGION_NAME}" \ --publicurl "${PUBLIC_URL}" \ --internalurl "${INTERNAL_URL}" \ --adminurl "${ADMIN_URL}" \ - --service-id $(keystone service-list | awk '/ identity / {print $2}') - - keystone tenant-create --description "Admin Project" --name admin - keystone user-create --pass "${KEYSTONE_ADMIN_PASSWORD}" --name admin - keystone role-create --name admin - keystone user-role-add --user admin --tenant admin --role admin - + identity + openstack project create --description "Admin Project" admin + openstack user create --password "${KEYSTONE_ADMIN_PASSWORD}" admin + openstack role create admin + openstack role add --project admin --user admin admin exit 0 fi