aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-09 17:19:12 +0000
committerGerrit Code Review <review@openstack.org>2015-08-09 17:19:12 +0000
commit8e5d76e60a1c6e59d13f0510a454977cb807efaf (patch)
tree990d0e680d580e9ce048bf9c0fd2ad6f0d253166
parent271486d4dab285077b5f4f904b5cb67c44bd392f (diff)
parentb471aa42d282d502617ed9e215d238e32013e85b (diff)
downloadkolla-8e5d76e60a1c6e59d13f0510a454977cb807efaf.tar.gz
kolla-8e5d76e60a1c6e59d13f0510a454977cb807efaf.zip
Merge "Remove config-internal from glance"
-rw-r--r--docker/centos/binary/glance/glance-api/Dockerfile2
l---------docker/centos/binary/glance/glance-api/config-internal.sh1
l---------docker/centos/binary/glance/glance-base/config-glance.sh1
-rw-r--r--docker/centos/binary/glance/glance-registry/Dockerfile2
l---------docker/centos/binary/glance/glance-registry/config-internal.sh1
-rw-r--r--docker/centos/source/glance/glance-api/Dockerfile2
l---------docker/centos/source/glance/glance-api/config-internal.sh1
l---------docker/centos/source/glance/glance-base/config-glance.sh1
-rw-r--r--docker/centos/source/glance/glance-registry/Dockerfile2
l---------docker/centos/source/glance/glance-registry/config-internal.sh1
-rwxr-xr-xdocker/common/glance/glance-api/config-internal.sh58
-rwxr-xr-xdocker/common/glance/glance-api/start.sh2
-rw-r--r--docker/common/glance/glance-base/config-glance.sh62
-rwxr-xr-xdocker/common/glance/glance-registry/config-internal.sh28
-rwxr-xr-xdocker/common/glance/glance-registry/start.sh2
15 files changed, 6 insertions, 160 deletions
diff --git a/docker/centos/binary/glance/glance-api/Dockerfile b/docker/centos/binary/glance/glance-api/Dockerfile
index dc123fc1b..34de0690e 100644
--- a/docker/centos/binary/glance/glance-api/Dockerfile
+++ b/docker/centos/binary/glance/glance-api/Dockerfile
@@ -4,6 +4,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
COPY ./start.sh /start.sh
COPY ./check.sh /check.sh
-COPY config-internal.sh config-external.sh /opt/kolla/
+COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
diff --git a/docker/centos/binary/glance/glance-api/config-internal.sh b/docker/centos/binary/glance/glance-api/config-internal.sh
deleted file mode 120000
index 112e6557c..000000000
--- a/docker/centos/binary/glance/glance-api/config-internal.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../common/glance/glance-api/config-internal.sh \ No newline at end of file
diff --git a/docker/centos/binary/glance/glance-base/config-glance.sh b/docker/centos/binary/glance/glance-base/config-glance.sh
deleted file mode 120000
index d5c26f0b8..000000000
--- a/docker/centos/binary/glance/glance-base/config-glance.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../common/glance/glance-base/config-glance.sh \ No newline at end of file
diff --git a/docker/centos/binary/glance/glance-registry/Dockerfile b/docker/centos/binary/glance/glance-registry/Dockerfile
index 5ff660923..11b584eed 100644
--- a/docker/centos/binary/glance/glance-registry/Dockerfile
+++ b/docker/centos/binary/glance/glance-registry/Dockerfile
@@ -1,7 +1,7 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%glance-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
-COPY config-internal.sh config-external.sh /opt/kolla/
+COPY config-external.sh /opt/kolla/
COPY ./start.sh /start.sh
CMD ["/start.sh"]
diff --git a/docker/centos/binary/glance/glance-registry/config-internal.sh b/docker/centos/binary/glance/glance-registry/config-internal.sh
deleted file mode 120000
index c3d48cfc0..000000000
--- a/docker/centos/binary/glance/glance-registry/config-internal.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../common/glance/glance-registry/config-internal.sh \ No newline at end of file
diff --git a/docker/centos/source/glance/glance-api/Dockerfile b/docker/centos/source/glance/glance-api/Dockerfile
index 8b870b0ae..727feb0b7 100644
--- a/docker/centos/source/glance/glance-api/Dockerfile
+++ b/docker/centos/source/glance/glance-api/Dockerfile
@@ -3,6 +3,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
COPY start.sh check.sh /
-COPY config-internal.sh config-external.sh /opt/kolla/
+COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]
diff --git a/docker/centos/source/glance/glance-api/config-internal.sh b/docker/centos/source/glance/glance-api/config-internal.sh
deleted file mode 120000
index 112e6557c..000000000
--- a/docker/centos/source/glance/glance-api/config-internal.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../common/glance/glance-api/config-internal.sh \ No newline at end of file
diff --git a/docker/centos/source/glance/glance-base/config-glance.sh b/docker/centos/source/glance/glance-base/config-glance.sh
deleted file mode 120000
index d5c26f0b8..000000000
--- a/docker/centos/source/glance/glance-base/config-glance.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../common/glance/glance-base/config-glance.sh \ No newline at end of file
diff --git a/docker/centos/source/glance/glance-registry/Dockerfile b/docker/centos/source/glance/glance-registry/Dockerfile
index 03eb22f4a..22e3fcb10 100644
--- a/docker/centos/source/glance/glance-registry/Dockerfile
+++ b/docker/centos/source/glance/glance-registry/Dockerfile
@@ -1,7 +1,7 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%glance-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
-COPY config-internal.sh config-external.sh /opt/kolla/
+COPY config-external.sh /opt/kolla/
COPY start.sh /
CMD ["/start.sh"]
diff --git a/docker/centos/source/glance/glance-registry/config-internal.sh b/docker/centos/source/glance/glance-registry/config-internal.sh
deleted file mode 120000
index c3d48cfc0..000000000
--- a/docker/centos/source/glance/glance-registry/config-internal.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../common/glance/glance-registry/config-internal.sh \ No newline at end of file
diff --git a/docker/common/glance/glance-api/config-internal.sh b/docker/common/glance/glance-api/config-internal.sh
deleted file mode 100755
index 45af8d7ec..000000000
--- a/docker/common/glance/glance-api/config-internal.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-set -e
-
-. /opt/kolla/kolla-common.sh
-. /opt/kolla/config-glance.sh
-
-check_required_vars ADMIN_TENANT_NAME \
- GLANCE_API_SERVICE_HOST \
- GLANCE_KEYSTONE_PASSWORD \
- GLANCE_KEYSTONE_USER \
- GLANCE_REGISTRY_SERVICE_HOST \
- KEYSTONE_ADMIN_SERVICE_HOST \
- KEYSTONE_ADMIN_SERVICE_PORT \
- KEYSTONE_ADMIN_TOKEN \
- KEYSTONE_AUTH_PROTOCOL \
- PUBLIC_IP \
- RABBITMQ_SERVICE_HOST
-
-fail_unless_os_service_running keystone
-
-export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
-export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
-
-crux user-create --update \
- -n "${GLANCE_KEYSTONE_USER}" \
- -p "${GLANCE_KEYSTONE_PASSWORD}" \
- -t "${ADMIN_TENANT_NAME}" \
- -r admin
-
-crux endpoint-create --remove-all \
- -n glance -t image \
- -I "http://${GLANCE_API_SERVICE_HOST}:9292" \
- -P "http://${PUBLIC_IP}:9292" \
- -A "http://${GLANCE_API_SERVICE_HOST}:9292"
-
-# turn on notification sending by glance
-crudini --set /etc/glance/glance-api.conf \
- DEFAULT \
- notification_driver \
- "messaging"
-
-crudini --set /etc/glance/glance-api.conf \
- DEFAULT \
- rabbit_host \
- "${RABBITMQ_SERVICE_HOST}"
-
-crudini --set /etc/glance/glance-api.conf \
- DEFAULT \
- registry_host \
- "${GLANCE_REGISTRY_SERVICE_HOST}"
-
-crudini --set /etc/glance/glance-api.conf \
- DEFAULT \
- debug \
- "True"
-
-exec /usr/bin/glance-api
diff --git a/docker/common/glance/glance-api/start.sh b/docker/common/glance/glance-api/start.sh
index 26db7fc1c..ce3cb6d8b 100755
--- a/docker/common/glance/glance-api/start.sh
+++ b/docker/common/glance/glance-api/start.sh
@@ -7,7 +7,7 @@ ARGS=""
# 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/common/glance/glance-base/config-glance.sh b/docker/common/glance/glance-base/config-glance.sh
deleted file mode 100644
index 2823af314..000000000
--- a/docker/common/glance/glance-base/config-glance.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-set -e
-
-. /opt/kolla/kolla-common.sh
-
-check_required_vars ADMIN_TENANT_NAME \
- GLANCE_DB_NAME \
- GLANCE_DB_PASSWORD \
- GLANCE_DB_USER \
- GLANCE_KEYSTONE_PASSWORD \
- GLANCE_KEYSTONE_USER \
- KEYSTONE_PUBLIC_SERVICE_HOST \
- MARIADB_SERVICE_HOST
-dump_vars
-
-cat > /openrc <<EOF
-export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
-export OS_USERNAME="${GLANCE_KEYSTONE_USER}"
-export OS_PASSWORD="${GLANCE_KEYSTONE_PASSWORD}"
-export OS_TENANT_NAME="${ADMIN_TENANT_NAME}"
-EOF
-
-for cfg in /etc/glance/glance-api.conf /etc/glance/glance-registry.conf; do
- crudini --set $cfg \
- DEFAULT \
- log_file \
- ""
-
- for option in auth_protocol auth_host auth_port; do
- crudini --del $cfg \
- keystone_authtoken \
- $option
- done
-
- crudini --set $cfg \
- keystone_authtoken \
- auth_uri \
- "http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/"
- crudini --set $cfg \
- keystone_authtoken \
- admin_tenant_name \
- "${ADMIN_TENANT_NAME}"
- crudini --set $cfg \
- keystone_authtoken \
- admin_user \
- "${GLANCE_KEYSTONE_USER}"
- crudini --set $cfg \
- keystone_authtoken \
- admin_password \
- "${GLANCE_KEYSTONE_PASSWORD}"
-
- crudini --set $cfg \
- paste_deploy \
- flavor \
- keystone
-
- crudini --set $cfg \
- database \
- connection \
- "mysql://${GLANCE_DB_USER}:${GLANCE_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${GLANCE_DB_NAME}"
-done
diff --git a/docker/common/glance/glance-registry/config-internal.sh b/docker/common/glance/glance-registry/config-internal.sh
deleted file mode 100755
index c0ce4df5c..000000000
--- a/docker/common/glance/glance-registry/config-internal.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-set -e
-
-. /opt/kolla/kolla-common.sh
-. /opt/kolla/config-glance.sh
-
-
-check_required_vars DB_ROOT_PASSWORD \
- GLANCE_DB_NAME \
- GLANCE_DB_PASSWORD \
- GLANCE_DB_USER \
- MARIADB_SERVICE_HOST
-# lets wait for the DB to be available
-wait_for 25 1 check_for_db
-
-if [ "${INIT_GLANCE_DB}" == "true" ]; then
- mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
-CREATE DATABASE IF NOT EXISTS ${GLANCE_DB_NAME} DEFAULT CHARACTER SET utf8;
-GRANT ALL PRIVILEGES ON ${GLANCE_DB_NAME}.* TO
- '${GLANCE_DB_USER}'@'%' IDENTIFIED BY '${GLANCE_DB_PASSWORD}'
-
-EOF
-
- /usr/bin/glance-manage db_sync
-fi
-
-exec /usr/bin/glance-registry
diff --git a/docker/common/glance/glance-registry/start.sh b/docker/common/glance/glance-registry/start.sh
index 70899985e..1d8265f80 100755
--- a/docker/common/glance/glance-registry/start.sh
+++ b/docker/common/glance/glance-registry/start.sh
@@ -7,7 +7,7 @@ ARGS=""
# 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
exec $CMD $ARGS