Add swift-dispersion support
* Add dispersion.conf into /etc/swift * Add dispersion keystone user * Give swiftoperator role to dispersion user Change-Id: Ieb41c9a9902c30240b106b462ba83d151708491e Closes-Bug: 1398808
This commit is contained in:
parent
6389c643ee
commit
93a9cbdbd4
@ -162,3 +162,6 @@ swift_hash_path_suffix:
|
||||
swift_hash_path_prefix:
|
||||
# This will allow all users to create containers and upload to swift if set to True
|
||||
swift_allow_all_users: False
|
||||
# The dispersion user is for swift-dispersion-report
|
||||
swift_dispersion_user: dispersion
|
||||
swift_dispersion_password:
|
||||
|
@ -30,5 +30,6 @@
|
||||
roles:
|
||||
- keystone_add_service
|
||||
- swiftoperator_role_create
|
||||
- swift_dispersion_user
|
||||
vars_files:
|
||||
- vars/openstack_service_vars/swift_proxy_endpoint.yml
|
||||
|
@ -14,10 +14,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
- include: log_setup.yml
|
||||
- include: swift_dispersion.yml
|
||||
|
||||
- name: "Drop swift.conf template"
|
||||
template: >
|
||||
src="swift.conf.j2"
|
||||
dest="/etc/swift/swift.conf"
|
||||
owner={{ system_user }}
|
||||
mode=0644
|
||||
template:
|
||||
src: "swift.conf.j2"
|
||||
dest: "/etc/swift/swift.conf"
|
||||
owner: "{{ system_user }}"
|
||||
mode: "0644"
|
||||
|
21
rpc_deployment/roles/swift_common/tasks/swift_dispersion.yml
Normal file
21
rpc_deployment/roles/swift_common/tasks/swift_dispersion.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
- name: "Place dispersion.conf in swift dir"
|
||||
template:
|
||||
src: "swift-dispersion.conf.j2"
|
||||
dest: "/etc/swift/dispersion.conf"
|
||||
owner: "{{ system_user }}"
|
||||
mode: "0644"
|
@ -0,0 +1,27 @@
|
||||
[dispersion]
|
||||
# Please create a new account solely for using dispersion tools, which is
|
||||
# helpful for keep your own data clean.
|
||||
# auth_url = http://localhost:8080/auth/v1.0
|
||||
# auth_user = test:tester
|
||||
# auth_key = testing
|
||||
# auth_version = 1.0
|
||||
#
|
||||
# NOTE: If you want to use keystone (auth version 2.0), then its configuration
|
||||
# would look something like:
|
||||
auth_url = {{ auth_identity_uri }}
|
||||
auth_user = {{ auth_admin_tenant }}:{{ swift_dispersion_user }}
|
||||
auth_key = {{ swift_dispersion_password }}
|
||||
auth_version = 2.0
|
||||
#
|
||||
endpoint_type = internalURL
|
||||
# keystone_api_insecure = no
|
||||
#
|
||||
# swift_dir = /etc/swift
|
||||
# dispersion_coverage = 1.0
|
||||
# retries = 5
|
||||
# concurrency = 25
|
||||
# container_populate = yes
|
||||
# object_populate = yes
|
||||
# container_report = yes
|
||||
# object_report = yes
|
||||
# dump_json = no
|
32
rpc_deployment/roles/swift_dispersion_user/tasks/main.yml
Normal file
32
rpc_deployment/roles/swift_dispersion_user/tasks/main.yml
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
- name: "Create keystone user for swift-dispersion"
|
||||
keystone:
|
||||
command: "ensure_user"
|
||||
token: "{{ auth_admin_token }}"
|
||||
endpoint: "{{ auth_admin_uri }}"
|
||||
user_name: "{{ swift_dispersion_user }}"
|
||||
tenant_name: "{{ auth_admin_tenant }}"
|
||||
password: "{{ swift_dispersion_password }}"
|
||||
|
||||
- name: "Add swiftoperator role to swift-dispersion user"
|
||||
keystone:
|
||||
command: "ensure_user_role"
|
||||
token: "{{ auth_admin_token }}"
|
||||
endpoint: "{{ auth_admin_uri }}"
|
||||
user_name: "{{ swift_dispersion_user }}"
|
||||
tenant_name: "{{ auth_admin_tenant }}"
|
||||
role_name: "swiftoperator"
|
Loading…
x
Reference in New Issue
Block a user