From 1581874da634676ae403d30ed063e71dc52c9801 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Fri, 7 Aug 2015 18:29:38 +0000 Subject: [PATCH] Remove config-internal for Magnum Change-Id: I766a434c736eb712818a31ae86a346706e8627d8 Partially-implements: blueprint remove-config-internal --- .../binary/magnum/magnum-api/Dockerfile | 6 +-- .../centos/binary/magnum/magnum-api/check.sh | 1 - .../magnum/magnum-api/config-internal.sh | 1 - .../binary/magnum/magnum-base/Dockerfile | 2 - .../magnum/magnum-base/config-magnum.sh | 1 - .../binary/magnum/magnum-conductor/Dockerfile | 5 +- .../magnum-conductor/config-internal.sh | 1 - .../source/magnum/magnum-api/Dockerfile | 6 +-- .../centos/source/magnum/magnum-api/check.sh | 1 - .../magnum/magnum-api/config-internal.sh | 1 - .../source/magnum/magnum-base/Dockerfile | 2 - .../magnum/magnum-base/config-magnum.sh | 1 - .../source/magnum/magnum-conductor/Dockerfile | 5 +- .../magnum-conductor/config-internal.sh | 1 - docker/common/magnum/magnum-api/check.sh | 16 ------ .../magnum/magnum-api/config-internal.sh | 31 ----------- docker/common/magnum/magnum-api/start.sh | 2 +- .../magnum/magnum-base/config-magnum.sh | 52 ------------------- .../magnum-conductor/config-internal.sh | 20 ------- .../common/magnum/magnum-conductor/start.sh | 2 +- docs/minimal-environment-vars.md | 27 ++-------- 21 files changed, 13 insertions(+), 171 deletions(-) delete mode 120000 docker/centos/binary/magnum/magnum-api/check.sh delete mode 120000 docker/centos/binary/magnum/magnum-api/config-internal.sh delete mode 120000 docker/centos/binary/magnum/magnum-base/config-magnum.sh delete mode 120000 docker/centos/binary/magnum/magnum-conductor/config-internal.sh delete mode 120000 docker/centos/source/magnum/magnum-api/check.sh delete mode 120000 docker/centos/source/magnum/magnum-api/config-internal.sh delete mode 120000 docker/centos/source/magnum/magnum-base/config-magnum.sh delete mode 120000 docker/centos/source/magnum/magnum-conductor/config-internal.sh delete mode 100755 docker/common/magnum/magnum-api/check.sh delete mode 100755 docker/common/magnum/magnum-api/config-internal.sh delete mode 100755 docker/common/magnum/magnum-base/config-magnum.sh delete mode 100755 docker/common/magnum/magnum-conductor/config-internal.sh diff --git a/docker/centos/binary/magnum/magnum-api/Dockerfile b/docker/centos/binary/magnum/magnum-api/Dockerfile index 244ca3da16..580ceacc8f 100644 --- a/docker/centos/binary/magnum/magnum-api/Dockerfile +++ b/docker/centos/binary/magnum/magnum-api/Dockerfile @@ -5,9 +5,7 @@ RUN yum -y install \ openstack-magnum-api \ && yum clean all -COPY ./start.sh /start.sh -COPY ./check.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/binary/magnum/magnum-api/check.sh b/docker/centos/binary/magnum/magnum-api/check.sh deleted file mode 120000 index 7464ba2960..0000000000 --- a/docker/centos/binary/magnum/magnum-api/check.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-api/check.sh \ No newline at end of file diff --git a/docker/centos/binary/magnum/magnum-api/config-internal.sh b/docker/centos/binary/magnum/magnum-api/config-internal.sh deleted file mode 120000 index 7f9cace393..0000000000 --- a/docker/centos/binary/magnum/magnum-api/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-api/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/magnum/magnum-base/Dockerfile b/docker/centos/binary/magnum/magnum-base/Dockerfile index 16a8a83c58..9928bec888 100644 --- a/docker/centos/binary/magnum/magnum-base/Dockerfile +++ b/docker/centos/binary/magnum/magnum-base/Dockerfile @@ -4,5 +4,3 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) # Magnum is not yet in upstream RDO packaging RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo - -COPY config-magnum.sh /opt/kolla/ diff --git a/docker/centos/binary/magnum/magnum-base/config-magnum.sh b/docker/centos/binary/magnum/magnum-base/config-magnum.sh deleted file mode 120000 index 473c0be8e2..0000000000 --- a/docker/centos/binary/magnum/magnum-base/config-magnum.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-base/config-magnum.sh \ No newline at end of file diff --git a/docker/centos/binary/magnum/magnum-conductor/Dockerfile b/docker/centos/binary/magnum/magnum-conductor/Dockerfile index dd19a9d080..093ca50033 100644 --- a/docker/centos/binary/magnum/magnum-conductor/Dockerfile +++ b/docker/centos/binary/magnum/magnum-conductor/Dockerfile @@ -9,8 +9,7 @@ RUN yum -y install \ # Install kubectl binary (ugh) RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes -COPY ./start.sh /start.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/binary/magnum/magnum-conductor/config-internal.sh b/docker/centos/binary/magnum/magnum-conductor/config-internal.sh deleted file mode 120000 index 1d8f73aa92..0000000000 --- a/docker/centos/binary/magnum/magnum-conductor/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-conductor/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-api/Dockerfile b/docker/centos/source/magnum/magnum-api/Dockerfile index 2173a7b426..aa39615e77 100644 --- a/docker/centos/source/magnum/magnum-api/Dockerfile +++ b/docker/centos/source/magnum/magnum-api/Dockerfile @@ -1,9 +1,7 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%magnum-base:%%KOLLA_TAG%% 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 start.sh / +COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/source/magnum/magnum-api/check.sh b/docker/centos/source/magnum/magnum-api/check.sh deleted file mode 120000 index 7464ba2960..0000000000 --- a/docker/centos/source/magnum/magnum-api/check.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-api/check.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-api/config-internal.sh b/docker/centos/source/magnum/magnum-api/config-internal.sh deleted file mode 120000 index 7f9cace393..0000000000 --- a/docker/centos/source/magnum/magnum-api/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-api/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-base/Dockerfile b/docker/centos/source/magnum/magnum-base/Dockerfile index 6c44530430..ffcee610f9 100644 --- a/docker/centos/source/magnum/magnum-base/Dockerfile +++ b/docker/centos/source/magnum/magnum-base/Dockerfile @@ -11,5 +11,3 @@ RUN cd /magnum \ && mkdir /etc/magnum /var/log/magnum \ && cp -r /magnum/etc/* /etc/magnum/ \ && rm -rf /root/.cache - -COPY config-magnum.sh /opt/kolla/ diff --git a/docker/centos/source/magnum/magnum-base/config-magnum.sh b/docker/centos/source/magnum/magnum-base/config-magnum.sh deleted file mode 120000 index 473c0be8e2..0000000000 --- a/docker/centos/source/magnum/magnum-base/config-magnum.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-base/config-magnum.sh \ No newline at end of file diff --git a/docker/centos/source/magnum/magnum-conductor/Dockerfile b/docker/centos/source/magnum/magnum-conductor/Dockerfile index 72de638883..6790aeeff0 100644 --- a/docker/centos/source/magnum/magnum-conductor/Dockerfile +++ b/docker/centos/source/magnum/magnum-conductor/Dockerfile @@ -4,8 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) # Install kubectl binary (ugh) RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes -COPY ./start.sh /start.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/magnum/magnum-conductor/config-internal.sh b/docker/centos/source/magnum/magnum-conductor/config-internal.sh deleted file mode 120000 index 1d8f73aa92..0000000000 --- a/docker/centos/source/magnum/magnum-conductor/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/magnum/magnum-conductor/config-internal.sh \ No newline at end of file diff --git a/docker/common/magnum/magnum-api/check.sh b/docker/common/magnum/magnum-api/check.sh deleted file mode 100755 index ee03dc6d23..0000000000 --- a/docker/common/magnum/magnum-api/check.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -RES=0 - -. /openrc -if ! keystone token-get > /dev/null; then - echo "ERROR: keystone token-get failed" >&2 - RES=1 -else - if ! heat stack-list > /dev/null; then - echo "ERROR: heat stack-list failed" >&2 - RES=1 - fi -fi - -exit $RES diff --git a/docker/common/magnum/magnum-api/config-internal.sh b/docker/common/magnum/magnum-api/config-internal.sh deleted file mode 100755 index 1267c3e55f..0000000000 --- a/docker/common/magnum/magnum-api/config-internal.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-magnum.sh - -check_required_vars ADMIN_TENANT_NAME \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_SERVICE_PORT \ - KEYSTONE_ADMIN_TOKEN \ - KEYSTONE_AUTH_PROTOCOL \ - MAGNUM_API_SERVICE_HOST \ - MAGNUM_API_SERVICE_PORT \ - MAGNUM_KEYSTONE_PASSWORD \ - MAGNUM_KEYSTONE_USER - -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 -n ${MAGNUM_KEYSTONE_USER} \ - -p ${MAGNUM_KEYSTONE_PASSWORD} \ - -t ${ADMIN_TENANT_NAME} \ - -r admin - -crux endpoint-create --remove-all -n ${MAGNUM_KEYSTONE_USER} -t container \ - -I "${KEYSTONE_AUTH_PROTOCOL}://${MAGNUM_API_SERVICE_HOST}:${MAGNUM_API_SERVICE_PORT}/v1" \ - -P "${KEYSTONE_AUTH_PROTOCOL}://${MAGNUM_API_SERVICE_HOST}:${MAGNUM_API_SERVICE_PORT}/v1" \ - -A "${KEYSTONE_AUTH_PROTOCOL}://${MAGNUM_API_SERVICE_HOST}:${MAGNUM_API_SERVICE_PORT}/v1" - -exec /usr/bin/magnum-api diff --git a/docker/common/magnum/magnum-api/start.sh b/docker/common/magnum/magnum-api/start.sh index 5a47fdf89d..ed154e29a2 100755 --- a/docker/common/magnum/magnum-api/start.sh +++ b/docker/common/magnum/magnum-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/magnum/magnum-base/config-magnum.sh b/docker/common/magnum/magnum-base/config-magnum.sh deleted file mode 100755 index 279bd11536..0000000000 --- a/docker/common/magnum/magnum-base/config-magnum.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh - -check_required_vars ADMIN_TENANT_NAME \ - DEBUG_LOGGING \ - KEYSTONE_AUTH_PROTOCOL \ - KEYSTONE_PUBLIC_SERVICE_HOST \ - KEYSTONE_PUBLIC_SERVICE_PORT \ - MAGNUM_DB_NAME \ - MAGNUM_DB_PASSWORD \ - MAGNUM_DB_USER \ - MAGNUM_KEYSTONE_PASSWORD \ - MAGNUM_KEYSTONE_USER \ - RABBITMQ_SERVICE_HOST \ - VERBOSE_LOGGING - -fail_unless_db -dump_vars - -cat > /openrc <