Merge "Deprecate swift3, use s3api in Swift repo"
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 022e6ba..9ca8441 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -627,8 +627,8 @@
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``.
diff --git a/lib/nova b/lib/nova
index 6af281b..6ce1dcc 100644
--- a/lib/nova
+++ b/lib/nova
@@ -403,7 +403,7 @@
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" \
diff --git a/lib/swift b/lib/swift
index e2ee0cb..d9a7878 100644
--- a/lib/swift
+++ b/lib/swift
@@ -49,7 +49,6 @@
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 @@
# 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 @@
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 @@
# 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}
diff --git a/stack.sh b/stack.sh
index b06f7bd..fa5b43c 100755
--- a/stack.sh
+++ b/stack.sh
@@ -889,12 +889,10 @@
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
diff --git a/stackrc b/stackrc
index 2924d39..2291e3c 100644
--- a/stackrc
+++ b/stackrc
@@ -520,10 +520,6 @@
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}