Merge "Deprecate swift3, use s3api in Swift repo"
This commit is contained in:
commit
fdbe849d95
@ -627,8 +627,8 @@ used when adding nodes to the Swift rings.
|
||||
Swift S3
|
||||
++++++++
|
||||
|
||||
If you are enabling ``swift3`` in ``ENABLED_SERVICES`` DevStack will
|
||||
install the swift3 middleware emulation. Swift will be configured to
|
||||
If you are enabling ``s3api`` in ``ENABLED_SERVICES`` DevStack will
|
||||
install the s3api middleware emulation. Swift will be configured to
|
||||
act as a S3 endpoint for Keystone so effectively replacing the
|
||||
``nova-objectstore``.
|
||||
|
||||
|
2
lib/nova
2
lib/nova
@ -403,7 +403,7 @@ function create_nova_accounts {
|
||||
fi
|
||||
|
||||
# S3
|
||||
if is_service_enabled swift3; then
|
||||
if is_service_enabled s3api; then
|
||||
get_or_create_service "s3" "s3" "S3"
|
||||
get_or_create_endpoint \
|
||||
"s3" \
|
||||
|
32
lib/swift
32
lib/swift
@ -49,7 +49,6 @@ fi
|
||||
|
||||
SWIFT_AUTH_CACHE_DIR=${SWIFT_AUTH_CACHE_DIR:-/var/cache/swift}
|
||||
SWIFT_APACHE_WSGI_DIR=${SWIFT_APACHE_WSGI_DIR:-/var/www/swift}
|
||||
SWIFT3_DIR=$DEST/swift3
|
||||
|
||||
SWIFT_SERVICE_PROTOCOL=${SWIFT_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||
SWIFT_DEFAULT_BIND_PORT=${SWIFT_DEFAULT_BIND_PORT:-8080}
|
||||
@ -68,8 +67,8 @@ SWIFT_DISK_IMAGE=${SWIFT_DATA_DIR}/drives/images/swift.img
|
||||
# Default is ``/etc/swift``.
|
||||
SWIFT_CONF_DIR=${SWIFT_CONF_DIR:-/etc/swift}
|
||||
|
||||
if is_service_enabled s-proxy && is_service_enabled swift3; then
|
||||
# If we are using ``swift3``, we can default the S3 port to swift instead
|
||||
if is_service_enabled s-proxy && is_service_enabled s3api; then
|
||||
# If we are using ``s3api``, we can default the S3 port to swift instead
|
||||
# of nova-objectstore
|
||||
S3_SERVICE_PORT=${S3_SERVICE_PORT:-$SWIFT_DEFAULT_BIND_PORT}
|
||||
fi
|
||||
@ -423,16 +422,19 @@ function configure_swift {
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:proxy-logging reveal_sensitive_prefix ${SWIFT_LOG_TOKEN_LENGTH}
|
||||
|
||||
# By default Swift will be installed with Keystone and tempauth middleware
|
||||
# and add the swift3 middleware if its configured for it. The token for
|
||||
# and add the s3api middleware if its configured for it. The token for
|
||||
# tempauth would be prefixed with the reseller_prefix setting `TEMPAUTH_` the
|
||||
# token for keystoneauth would have the standard reseller_prefix `AUTH_`
|
||||
if is_service_enabled swift3;then
|
||||
swift_pipeline+=" swift3 s3token "
|
||||
if is_service_enabled s3api;then
|
||||
swift_pipeline+=" s3api"
|
||||
fi
|
||||
|
||||
if is_service_enabled keystone; then
|
||||
if is_service_enabled s3api;then
|
||||
swift_pipeline+=" s3token"
|
||||
fi
|
||||
swift_pipeline+=" authtoken keystoneauth"
|
||||
fi
|
||||
|
||||
swift_pipeline+=" tempauth "
|
||||
|
||||
sed -i "/^pipeline/ { s/tempauth/${swift_pipeline} ${SWIFT_EXTRAS_MIDDLEWARE}/ ;}" ${SWIFT_CONFIG_PROXY_SERVER}
|
||||
@ -467,22 +469,6 @@ function configure_swift {
|
||||
# Allow both reseller prefixes to be used with domain_remap
|
||||
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:domain_remap reseller_prefixes "AUTH, TEMPAUTH"
|
||||
|
||||
if is_service_enabled swift3; then
|
||||
cat <<EOF >>${SWIFT_CONFIG_PROXY_SERVER}
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystonemiddleware.s3_token:filter_factory
|
||||
auth_uri = ${KEYSTONE_AUTH_URI}
|
||||
cafile = ${SSL_BUNDLE_FILE}
|
||||
admin_user = swift
|
||||
admin_tenant_name = ${SERVICE_PROJECT_NAME}
|
||||
admin_password = ${SERVICE_PASSWORD}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
location = ${REGION_NAME}
|
||||
EOF
|
||||
fi
|
||||
|
||||
cp ${SWIFT_DIR}/etc/swift.conf-sample ${SWIFT_CONF_DIR}/swift.conf
|
||||
iniset ${SWIFT_CONF_DIR}/swift.conf swift-hash swift_hash_path_suffix ${SWIFT_HASH}
|
||||
iniset ${SWIFT_CONF_DIR}/swift.conf swift-constraints max_header_size ${SWIFT_MAX_HEADER_SIZE}
|
||||
|
6
stack.sh
6
stack.sh
@ -889,12 +889,10 @@ if is_service_enabled swift; then
|
||||
stack_install_service swift
|
||||
configure_swift
|
||||
|
||||
# swift3 middleware to provide S3 emulation to Swift
|
||||
if is_service_enabled swift3; then
|
||||
# s3api middleware to provide S3 emulation to Swift
|
||||
if is_service_enabled s3api; then
|
||||
# Replace the nova-objectstore port by the swift port
|
||||
S3_SERVICE_PORT=8080
|
||||
git_clone $SWIFT3_REPO $SWIFT3_DIR $SWIFT3_BRANCH
|
||||
setup_develop $SWIFT3_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
|
4
stackrc
4
stackrc
@ -520,10 +520,6 @@ GITBRANCH["glance_store"]=${GLANCE_STORE_BRANCH:-$TARGET_BRANCH}
|
||||
GITREPO["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_REPO:-${GIT_BASE}/openstack/keystonemiddleware.git}
|
||||
GITBRANCH["keystonemiddleware"]=${KEYSTONEMIDDLEWARE_BRANCH:-$TARGET_BRANCH}
|
||||
|
||||
# s3 support for swift
|
||||
SWIFT3_REPO=${SWIFT3_REPO:-${GIT_BASE}/openstack/swift3.git}
|
||||
SWIFT3_BRANCH=${SWIFT3_BRANCH:-$TARGET_BRANCH}
|
||||
|
||||
# ceilometer middleware
|
||||
GITREPO["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_REPO:-${GIT_BASE}/openstack/ceilometermiddleware.git}
|
||||
GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-$TARGET_BRANCH}
|
||||
|
Loading…
Reference in New Issue
Block a user