Make swift bashate compliant

The containers don't work, but alteast they will pass the gate ;)

Change-Id: Ic921f982122889d354cfee47772421d147d9ec57
Partially-implements: blueprint bashate-gate
This commit is contained in:
Steven Dake 2015-06-07 17:09:55 -07:00
parent 502aff36cd
commit 035d14ff98
4 changed files with 12 additions and 23 deletions

View File

@ -12,17 +12,16 @@ fail_unless_db
fail_unless_os_service_running keystone fail_unless_os_service_running keystone
if ! [ "$SWIFT_DB_PASSWORD" ]; then if ! [ "$SWIFT_DB_PASSWORD" ]; then
SWIFT_DB_PASSWORD=$(openssl rand -hex 15) SWIFT_DB_PASSWORD=$(openssl rand -hex 15)
export SWIFT_DB_PASSWORD export SWIFT_DB_PASSWORD
fi fi
sh /opt/swift/config-swift.sh account-server sh /opt/swift/config-swift.sh account-server
mysql -h ${MARIADB_SERVICE_HOST} -u root \ mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
-p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME}; CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME};
GRANT ALL PRIVILEGES ON swift* TO GRANT ALL PRIVILEGES ON swift* TO
'${SWIFT_DB_USER}'@'%' IDENTIFIED BY '${SWIFT_DB_PASSWORD}' '${SWIFT_DB_USER}'@'%' IDENTIFIED BY '${SWIFT_DB_PASSWORD}'
EOF EOF
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"

View File

@ -1,8 +0,0 @@
FROM fedora-rdo-base
MAINTAINER Steven Dake <sdake@redhat.com>
RUN yum -y install openstack-utils openstack-swift && yum clean all
# These will come after we sort out start time config
RUN mkdir /opt/swift
#COPY config-swift.sh /opt/swift/config-swift.sh

View File

@ -12,17 +12,16 @@ fail_unless_db
fail_unless_os_service_running keystone fail_unless_os_service_running keystone
if ! [ "$SWIFT_DB_PASSWORD" ]; then if ! [ "$SWIFT_DB_PASSWORD" ]; then
SWIFT_DB_PASSWORD=$(openssl rand -hex 15) SWIFT_DB_PASSWORD=$(openssl rand -hex 15)
export SWIFT_DB_PASSWORD export SWIFT_DB_PASSWORD
fi fi
sh /opt/swift/config-swift.sh container sh /opt/swift/config-swift.sh container
mysql -h ${MARIADB_SERVICE_HOST} -u root \ mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
-p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME}; CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME};
GRANT ALL PRIVILEGES ON swift* TO GRANT ALL PRIVILEGES ON swift* TO
'${SWIFT_DB_USER}'@'%' IDENTIFIED BY '${SWIFT_DB_PASSWORD}' '${SWIFT_DB_USER}'@'%' IDENTIFIED BY '${SWIFT_DB_PASSWORD}'
EOF EOF
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"

View File

@ -12,17 +12,16 @@ fail_unless_db
fail_unless_os_service_running keystone fail_unless_os_service_running keystone
if ! [ "$SWIFT_DB_PASSWORD" ]; then if ! [ "$SWIFT_DB_PASSWORD" ]; then
SWIFT_DB_PASSWORD=$(openssl rand -hex 15) SWIFT_DB_PASSWORD=$(openssl rand -hex 15)
export SWIFT_DB_PASSWORD export SWIFT_DB_PASSWORD
fi fi
sh /opt/swift/config-swift.sh engine sh /opt/swift/config-swift.sh engine
mysql -h ${MARIADB_SERVICE_HOST} -u root \ mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
-p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME}; CREATE DATABASE IF NOT EXISTS ${SWIFT_DB_NAME};
GRANT ALL PRIVILEGES ON swift* TO GRANT ALL PRIVILEGES ON swift* TO
'${SWIFT_DB_USER}'@'%' IDENTIFIED BY '${SWIFT_DB_PASSWORD}' '${SWIFT_DB_USER}'@'%' IDENTIFIED BY '${SWIFT_DB_PASSWORD}'
EOF EOF
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"