aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/centos/binary/keystone/Dockerfile4
l---------docker/centos/binary/keystone/check.sh1
l---------docker/centos/binary/keystone/config-internal.sh1
-rw-r--r--docker/centos/source/keystone/Dockerfile4
l---------docker/centos/source/keystone/check.sh1
l---------docker/centos/source/keystone/config-internal.sh1
-rwxr-xr-xdocker/common/keystone/check.sh12
-rwxr-xr-xdocker/common/keystone/config-internal.sh138
-rwxr-xr-xdocker/common/keystone/start.sh2
-rw-r--r--docker/ubuntu/binary/keystone/Dockerfile2
l---------docker/ubuntu/binary/keystone/check.sh1
-rw-r--r--docs/minimal-environment-vars.md9
12 files changed, 7 insertions, 169 deletions
diff --git a/docker/centos/binary/keystone/Dockerfile b/docker/centos/binary/keystone/Dockerfile
index ae03df97e..11cef4d8f 100644
--- a/docker/centos/binary/keystone/Dockerfile
+++ b/docker/centos/binary/keystone/Dockerfile
@@ -18,8 +18,8 @@ RUN chown -R keystone: /var/www/cgi-bin/keystone
RUN chmod 755 /var/www/cgi-bin/keystone/*
# Add start-up and check scripts
-COPY start.sh check.sh /
-COPY config-internal.sh config-external.sh /opt/kolla/
+COPY start.sh /
+COPY config-external.sh /opt/kolla/
# Run the Keystone start script
CMD ["/start.sh"]
diff --git a/docker/centos/binary/keystone/check.sh b/docker/centos/binary/keystone/check.sh
deleted file mode 120000
index fe8e7608c..000000000
--- a/docker/centos/binary/keystone/check.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../common/keystone/check.sh \ No newline at end of file
diff --git a/docker/centos/binary/keystone/config-internal.sh b/docker/centos/binary/keystone/config-internal.sh
deleted file mode 120000
index fe8d98c1f..000000000
--- a/docker/centos/binary/keystone/config-internal.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../common/keystone/config-internal.sh \ No newline at end of file
diff --git a/docker/centos/source/keystone/Dockerfile b/docker/centos/source/keystone/Dockerfile
index 995004c14..f83321591 100644
--- a/docker/centos/source/keystone/Dockerfile
+++ b/docker/centos/source/keystone/Dockerfile
@@ -24,7 +24,7 @@ RUN cd /keystone \
&& chown -R keystone: /var/www/cgi-bin/keystone /var/log/keystone \
&& chmod 755 /var/www/cgi-bin/keystone/*
-COPY start.sh check.sh /
-COPY config-internal.sh config-external.sh /opt/kolla/
+COPY start.sh /
+COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
diff --git a/docker/centos/source/keystone/check.sh b/docker/centos/source/keystone/check.sh
deleted file mode 120000
index fe8e7608c..000000000
--- a/docker/centos/source/keystone/check.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../common/keystone/check.sh \ No newline at end of file
diff --git a/docker/centos/source/keystone/config-internal.sh b/docker/centos/source/keystone/config-internal.sh
deleted file mode 120000
index fe8d98c1f..000000000
--- a/docker/centos/source/keystone/config-internal.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../common/keystone/config-internal.sh \ No newline at end of file
diff --git a/docker/common/keystone/check.sh b/docker/common/keystone/check.sh
deleted file mode 100755
index ca4844784..000000000
--- a/docker/common/keystone/check.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-RES=0
-
-. /openrc
-if ! keystone token-get > /dev/null; then
- echo "ERROR: keystone token-get failed" >&2
- RES=1
-fi
-
-exit $RES
-
diff --git a/docker/common/keystone/config-internal.sh b/docker/common/keystone/config-internal.sh
deleted file mode 100755
index d2e959655..000000000
--- a/docker/common/keystone/config-internal.sh
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Run Kolla common script
-echo "Running the kolla-common script"
-. /opt/kolla/kolla-common.sh
-
-## Check DB connectivity and required variables
-echo "Checking connectivity to the DB"
-fail_unless_db
-echo "Checking for required variables"
-check_required_vars ADMIN_TENANT_NAME \
- INIT_KEYSTONE_DB \
- KEYSTONE_ADMIN_PASSWORD \
- KEYSTONE_ADMIN_SERVICE_HOST \
- KEYSTONE_ADMIN_TOKEN \
- KEYSTONE_DB_PASSWORD \
- KEYSTONE_PUBLIC_SERVICE_HOST \
- PUBLIC_IP
-
-dump_vars
-
-# Setup the Keystone DB
-echo "Setting up Keystone DB"
-mysql -h ${MARIADB_SERVICE_HOST} -u root -p"${DB_ROOT_PASSWORD}" mysql <<EOF
-CREATE DATABASE IF NOT EXISTS ${KEYSTONE_DB_NAME};
-GRANT ALL PRIVILEGES ON ${KEYSTONE_DB_NAME}.* TO
- '${KEYSTONE_DB_USER}'@'%' IDENTIFIED BY '${KEYSTONE_DB_PASSWORD}'
-EOF
-
-# File path and name used by crudini tool
-cfg=/etc/keystone/keystone.conf
-
-# Token Configuration
-echo "Configuring keystone.conf"
-crudini --set $cfg \
- DEFAULT \
- admin_token \
- "${KEYSTONE_ADMIN_TOKEN}"
-
-# Database Configuration
-crudini --set $cfg \
- database \
- connection \
- "mysql://${KEYSTONE_DB_USER}:${KEYSTONE_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${KEYSTONE_DB_NAME}"
-
-# Logging
-crudini --del $cfg \
- DEFAULT \
- log_dir
-crudini --set $cfg \
- DEFAULT \
- log_file \
- ${LOG_FILE}
-crudini --set $cfg \
- DEFAULT \
- verbose \
- ${VERBOSE_LOGGING}
-crudini --set $cfg \
- DEFAULT \
- debug \
- ${DEBUG_LOGGING}
-crudini --set $cfg \
- DEFAULT \
- use_stderr \
- ${USE_STDERR}
-
-# Token Management
-crudini --set $cfg \
- token \
- provider \
- keystone.token.providers."${TOKEN_PROVIDER}".Provider
-crudini --set $cfg \
- token \
- driver \
- keystone.token.persistence.backends."${TOKEN_DRIVER}".Token
-crudini --set $cfg \
- revoke \
- driver \
- keystone.contrib.revoke.backends."${TOKEN_DRIVER}".Revoke
-
-# Setup the openrc auth file
-cat > /openrc <<EOF
-export OS_AUTH_URL=http://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v${KEYSTONE_API_VERSION}
-export OS_USERNAME=${KEYSTONE_USER}
-export OS_PASSWORD=${KEYSTONE_ADMIN_PASSWORD}
-export OS_TENANT_NAME=${ADMIN_TENANT_NAME}
-EOF
-
-# Run PKI Setup script
-echo "Setting up PKI"
-/usr/bin/keystone-manage pki_setup --keystone-user keystone --keystone-group keystone
-
-# Fix permissions
-chown -R keystone:keystone /var/log/keystone
-chown -R keystone:keystone /etc/keystone/ssl
-chmod -R o-rwx /etc/keystone/ssl
-
-# Initialize the Keystone DB
-echo "Initializing Keystone DB"
-if [ "${INIT_KEYSTONE_DB}" == "true" ] ; then
- su -s /bin/bash -c "keystone-manage db_sync" keystone
-fi
-
-# Start Keystone
-echo "Starting Keystone"
-/usr/sbin/httpd -DFOREGROUND &
-PID=$!
-
-# Export Keystone service environment variables
-export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
-export SERVICE_ENDPOINT="http://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v${KEYSTONE_API_VERSION}"
-
-# Check to make sure the service is running
-echo "Verifying Keystone is running"
-while ! curl -o /dev/null -s --fail ${SERVICE_ENDPOINT}; do
- echo "waiting for Keystone @ ${SERVICE_ENDPOINT}"
- sleep 1;
-done
-echo "keystone is active @ ${SERVICE_ENDPOINT}"
-
-# Create Keystone tenant, user, role, service and endpoints
-echo "Creating Keystone tenant, user, role, service and endpoints"
-crux user-create --update \
- -n ${ADMIN_USER} -p "${ADMIN_USER_PASSWORD}" \
- -t ${ADMIN_TENANT_NAME} -r admin
-crux user-create --update \
- -n ${KEYSTONE_USER} -p "${KEYSTONE_ADMIN_PASSWORD}" \
- -t ${ADMIN_TENANT_NAME} -r admin
-crux endpoint-create --remove-all \
- -n keystone -t identity \
- -I "http://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v${KEYSTONE_API_VERSION}" \
- -A "http://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v${KEYSTONE_API_VERSION}" \
- -P "http://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v${KEYSTONE_API_VERSION}"
-
-# Wait on all jobs to exit before proceeding (see man wait)
-wait
diff --git a/docker/common/keystone/start.sh b/docker/common/keystone/start.sh
index a05be17ae..a68995f81 100755
--- a/docker/common/keystone/start.sh
+++ b/docker/common/keystone/start.sh
@@ -8,7 +8,7 @@ ARGS="-DFOREGROUND"
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Config-internal script exec out of this function, it does not return here.
+# Execute config strategy
set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
diff --git a/docker/ubuntu/binary/keystone/Dockerfile b/docker/ubuntu/binary/keystone/Dockerfile
index af362252d..9ce96618e 100644
--- a/docker/ubuntu/binary/keystone/Dockerfile
+++ b/docker/ubuntu/binary/keystone/Dockerfile
@@ -17,6 +17,6 @@ RUN cp -a /usr/share/keystone/wsgi.py /var/www/cgi-bin/keystone/admin
RUN chown -R keystone:keystone /var/www/cgi-bin/keystone
RUN chmod 755 /var/www/cgi-bin/keystone/*
-COPY start.sh check.sh /
+COPY start.sh /
CMD ["/start.sh"]
diff --git a/docker/ubuntu/binary/keystone/check.sh b/docker/ubuntu/binary/keystone/check.sh
deleted file mode 120000
index fe8e7608c..000000000
--- a/docker/ubuntu/binary/keystone/check.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../common/keystone/check.sh \ No newline at end of file
diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md
index f33e5a3c4..f8fe79292 100644
--- a/docs/minimal-environment-vars.md
+++ b/docs/minimal-environment-vars.md
@@ -320,14 +320,7 @@ In order for each service to function, there is a minimum set of required variab
# Keystone
- ADMIN_TENANT_NAME
- INIT_KEYSTONE_DB
- KEYSTONE_ADMIN_PASSWORD
- KEYSTONE_ADMIN_SERVICE_HOST
- KEYSTONE_ADMIN_TOKEN
- KEYSTONE_DB_PASSWORD
- KEYSTONE_PUBLIC_SERVICE_HOST
- PUBLIC_IP
+ None
# Kolla-ansible