Add support for swift3 middleware

This commit adds support for the swift3 middware, which allows S3-compatible
clients to use swift for object storage.

Change-Id: I56cd63057cc771310b69c311d975e06f73c773f7
Related-Bug: 1625053
This commit is contained in:
Charles Farquhar 2016-09-20 21:44:50 +00:00 committed by Jesse Pretorius (odyssey4me)
parent ec7448f57c
commit 14c57dd419
3 changed files with 44 additions and 0 deletions

View File

@ -25,11 +25,19 @@ debug: False
swift_package_state: "latest"
swift_pip_package_state: "latest"
# Git repo details for swift
swift_git_repo: https://git.openstack.org/openstack/swift
swift_git_install_branch: master
# Git repo details for swift3 middleware
swift_swift3_git_repo: https://git.openstack.org/openstack/swift3
swift_swift3_git_install_branch: master
# Developer mode settings
swift_developer_mode: false
swift_developer_constraints:
- "git+{{ swift_git_repo }}@{{ swift_git_install_branch }}#egg=swift"
- "git+{{ swift_swift3_git_repo }}@{{ swift_swift3_git_install_branch }}#egg=swift3"
# Name of the virtual env to deploy into
swift_venv_tag: untagged
@ -59,6 +67,15 @@ swift_syslog_log_perms: "0644"
## Auth token
swift_delay_auth_decision: true
## Swift3 middleware options
swift_swift3_enabled: false
swift_swift3_allow_no_owner: false
swift_swift3_location: US
swift_swift3_max_bucket_listing: 1000
swift_swift3_max_multi_delete_objects: 1000
swift_swift3_s3_acl: false
swift_swift3_storage_domain: ""
## Swift middleware
# NB: The order is important!
swift_middleware_list:
@ -68,6 +85,8 @@ swift_middleware_list:
- proxy-logging
- "{% if swift_ceilometer_enabled | bool %}ceilometer{% endif %}"
- cache
- "{% if swift_swift3_enabled | bool%}swift3{% endif %}"
- "{% if swift_swift3_enabled | bool%}s3token{% endif %}"
- container_sync
- bulk
- tempurl
@ -311,6 +330,7 @@ swift_pip_packages:
- python-memcached
- python-swiftclient
- swift
- swift3
swift_account_replicator_init_overrides: {}
swift_account_replicator_server_init_overrides: {}

View File

@ -0,0 +1,5 @@
---
features:
- The os_swift role now supports the swift3 middleware, allowing access to
swift via the Amazon S3 API. This feature can enabled by setting
``swift_swift3_enabled`` to ``true``.

View File

@ -100,6 +100,25 @@ operator_roles = admin, swiftoperator
reseller_admin_role = {{ swift_reselleradmin_role }}
{% endif %}
{% if 'swift3' in swift_middleware_list %}
[filter:swift3]
use = egg:swift3#swift3
allow_no_owner = {{ swift_swift3_allow_no_owner }}
location = {{ swift_swift3_location }}
max_bucket_listing = {{ swift_swift3_max_bucket_listing }}
max_multi_delete_objects = {{ swift_swift3_max_multi_delete_objects }}
s3_acl = {{ swift_swift3_s3_acl }}
storage_domain = {{ swift_swift3_storage_domain }}
{% endif %}
{% if 's3token' in swift_middleware_list %}
[filter:s3token]
use = egg:swift3#s3token
auth_uri = {{ keystone_service_adminuri }}
{% endif %}
[filter:healthcheck]
use = egg:swift#healthcheck