47df1633e5
Update keystone authentication middleware in glance to support the v3 API in Kilo. Partially implements: blueprint master-kilofication Change-Id: If2427f7e9dc124dc98cf140941623688bde623ed
90 lines
2.6 KiB
YAML
90 lines
2.6 KiB
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
# Create a service
|
|
- name: Ensure glance service
|
|
keystone:
|
|
command: "ensure_service"
|
|
token: "{{ keystone_auth_admin_token }}"
|
|
endpoint: "{{ keystone_service_adminurl }}"
|
|
service_name: "{{ glance_service_name }}"
|
|
service_type: "{{ glance_service_type }}"
|
|
description: "{{ glance_service_description }}"
|
|
register: add_service
|
|
until: add_service|success
|
|
retries: 5
|
|
delay: 2
|
|
tags:
|
|
- glance-api-setup
|
|
- glance-service-add
|
|
- glance-setup
|
|
|
|
# Create an admin user
|
|
- name: Ensure glance user
|
|
keystone:
|
|
command: "ensure_user"
|
|
token: "{{ keystone_auth_admin_token }}"
|
|
endpoint: "{{ keystone_service_adminurl }}"
|
|
user_name: "{{ glance_service_user_name }}"
|
|
tenant_name: "{{ glance_service_project_name }}"
|
|
password: "{{ glance_service_password }}"
|
|
register: add_service
|
|
until: add_service|success
|
|
retries: 5
|
|
delay: 10
|
|
tags:
|
|
- glance-api-setup
|
|
- glance-service-add
|
|
- glance-setup
|
|
|
|
# Add a role to the user
|
|
- name: Ensure glance user to admin role
|
|
keystone:
|
|
command: "ensure_user_role"
|
|
token: "{{ keystone_auth_admin_token }}"
|
|
endpoint: "{{ keystone_service_adminurl }}"
|
|
user_name: "{{ glance_service_user_name }}"
|
|
tenant_name: "{{ glance_service_project_name }}"
|
|
role_name: "{{ glance_role_name }}"
|
|
register: add_service
|
|
until: add_service|success
|
|
retries: 5
|
|
delay: 10
|
|
tags:
|
|
- glance-api-setup
|
|
- glance-service-add
|
|
- glance-setup
|
|
|
|
# Create an endpoint
|
|
- name: Ensure glance endpoint
|
|
keystone:
|
|
command: "ensure_endpoint"
|
|
token: "{{ keystone_auth_admin_token }}"
|
|
endpoint: "{{ keystone_service_adminurl }}"
|
|
region_name: "{{ glance_service_region }}"
|
|
service_name: "{{ glance_service_name }}"
|
|
service_type: "{{ glance_service_type }}"
|
|
publicurl: "{{ glance_service_publicurl }}"
|
|
adminurl: "{{ glance_service_internalurl }}"
|
|
internalurl: "{{ glance_service_adminurl }}"
|
|
register: add_service
|
|
until: add_service|success
|
|
retries: 5
|
|
delay: 10
|
|
tags:
|
|
- glance-api-setup
|
|
- glance-service-add
|
|
- glance-setup
|