diff --git a/docker/centos/binary/designate/designate-api/Dockerfile b/docker/centos/binary/designate/designate-api/Dockerfile index 926d88e9af..34011aca22 100644 --- a/docker/centos/binary/designate/designate-api/Dockerfile +++ b/docker/centos/binary/designate/designate-api/Dockerfile @@ -6,6 +6,6 @@ RUN yum install -y \ && yum clean all COPY start.sh /start.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/designate/designate-api/config-internal.sh b/docker/centos/binary/designate/designate-api/config-internal.sh deleted file mode 120000 index 438a6fd752..0000000000 --- a/docker/centos/binary/designate/designate-api/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-api/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/designate/designate-backend-bind9/Dockerfile b/docker/centos/binary/designate/designate-backend-bind9/Dockerfile index 0c9baca2a4..172645f8c3 100644 --- a/docker/centos/binary/designate/designate-backend-bind9/Dockerfile +++ b/docker/centos/binary/designate/designate-backend-bind9/Dockerfile @@ -6,6 +6,6 @@ RUN yum install -y bind \ && cp -pr /var/named /opt/kolla/var-named COPY start.sh /start.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/designate/designate-backend-bind9/config-internal.sh b/docker/centos/binary/designate/designate-backend-bind9/config-internal.sh deleted file mode 120000 index 7d7c0d0e4d..0000000000 --- a/docker/centos/binary/designate/designate-backend-bind9/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-backend-bind9/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/designate/designate-base/Dockerfile b/docker/centos/binary/designate/designate-base/Dockerfile index 35bf76467f..1b4ebe9ec0 100644 --- a/docker/centos/binary/designate/designate-base/Dockerfile +++ b/docker/centos/binary/designate/designate-base/Dockerfile @@ -14,5 +14,3 @@ RUN yum install -y \ && cp /etc/designate/policy.json /tmp/ \ && rpm -e openstack-designate-api \ && mv /tmp/policy.json /etc/designate/ - -COPY config-designate.sh /opt/kolla/config-designate.sh diff --git a/docker/centos/binary/designate/designate-base/config-designate.sh b/docker/centos/binary/designate/designate-base/config-designate.sh deleted file mode 120000 index 77aa738de2..0000000000 --- a/docker/centos/binary/designate/designate-base/config-designate.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-base/config-designate.sh \ No newline at end of file diff --git a/docker/centos/binary/designate/designate-central/Dockerfile b/docker/centos/binary/designate/designate-central/Dockerfile index 4b7cca5006..480f60513d 100644 --- a/docker/centos/binary/designate/designate-central/Dockerfile +++ b/docker/centos/binary/designate/designate-central/Dockerfile @@ -6,6 +6,6 @@ RUN yum install -y \ && yum clean all COPY start.sh /start.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/designate/designate-central/config-internal.sh b/docker/centos/binary/designate/designate-central/config-internal.sh deleted file mode 120000 index 94fcafd40c..0000000000 --- a/docker/centos/binary/designate/designate-central/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-central/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/designate/designate-mdns/Dockerfile b/docker/centos/binary/designate/designate-mdns/Dockerfile index 3aa77d14f3..befdc14e65 100644 --- a/docker/centos/binary/designate/designate-mdns/Dockerfile +++ b/docker/centos/binary/designate/designate-mdns/Dockerfile @@ -5,6 +5,6 @@ RUN yum install -y openstack-designate-mdns \ && yum clean all COPY start.sh /start.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/designate/designate-mdns/config-internal.sh b/docker/centos/binary/designate/designate-mdns/config-internal.sh deleted file mode 120000 index c838250c92..0000000000 --- a/docker/centos/binary/designate/designate-mdns/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-mdns/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/designate/designate-poolmanager/Dockerfile b/docker/centos/binary/designate/designate-poolmanager/Dockerfile index a69a3acac9..2a18510604 100644 --- a/docker/centos/binary/designate/designate-poolmanager/Dockerfile +++ b/docker/centos/binary/designate/designate-poolmanager/Dockerfile @@ -8,6 +8,6 @@ RUN yum install -y \ && yum clean all COPY start.sh /start.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/designate/designate-poolmanager/config-internal.sh b/docker/centos/binary/designate/designate-poolmanager/config-internal.sh deleted file mode 120000 index 6b43b0dddd..0000000000 --- a/docker/centos/binary/designate/designate-poolmanager/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-poolmanager/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/designate/designate-sink/Dockerfile b/docker/centos/binary/designate/designate-sink/Dockerfile index dffb6384a1..e2f3b60266 100644 --- a/docker/centos/binary/designate/designate-sink/Dockerfile +++ b/docker/centos/binary/designate/designate-sink/Dockerfile @@ -7,6 +7,6 @@ RUN yum install -y \ && yum clean all COPY start.sh /start.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/designate/designate-sink/config-internal.sh b/docker/centos/binary/designate/designate-sink/config-internal.sh deleted file mode 120000 index 713fc1b22c..0000000000 --- a/docker/centos/binary/designate/designate-sink/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-sink/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-api/Dockerfile b/docker/centos/source/designate/designate-api/Dockerfile index ab724493f8..eac73ff523 100644 --- a/docker/centos/source/designate/designate-api/Dockerfile +++ b/docker/centos/source/designate/designate-api/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%designate-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY start.sh /start.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/designate/designate-api/config-internal.sh b/docker/centos/source/designate/designate-api/config-internal.sh deleted file mode 120000 index 438a6fd752..0000000000 --- a/docker/centos/source/designate/designate-api/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-api/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-backend-bind9/Dockerfile b/docker/centos/source/designate/designate-backend-bind9/Dockerfile index ab724493f8..eac73ff523 100644 --- a/docker/centos/source/designate/designate-backend-bind9/Dockerfile +++ b/docker/centos/source/designate/designate-backend-bind9/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%designate-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY start.sh /start.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/designate/designate-backend-bind9/config-internal.sh b/docker/centos/source/designate/designate-backend-bind9/config-internal.sh deleted file mode 120000 index 7d7c0d0e4d..0000000000 --- a/docker/centos/source/designate/designate-backend-bind9/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-backend-bind9/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-base/Dockerfile b/docker/centos/source/designate/designate-base/Dockerfile index 97c1ef941e..92f04c37ff 100644 --- a/docker/centos/source/designate/designate-base/Dockerfile +++ b/docker/centos/source/designate/designate-base/Dockerfile @@ -12,6 +12,4 @@ RUN cd /designate \ && cp -r /designate/etc/* /etc/designate/ \ && rm -rf /root/.cache -COPY config-designate.sh /opt/kolla/ - CMD ["/start.sh"] diff --git a/docker/centos/source/designate/designate-base/config-designate.sh b/docker/centos/source/designate/designate-base/config-designate.sh deleted file mode 120000 index 77aa738de2..0000000000 --- a/docker/centos/source/designate/designate-base/config-designate.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-base/config-designate.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-central/Dockerfile b/docker/centos/source/designate/designate-central/Dockerfile index ab724493f8..eac73ff523 100644 --- a/docker/centos/source/designate/designate-central/Dockerfile +++ b/docker/centos/source/designate/designate-central/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%designate-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY start.sh /start.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/designate/designate-central/config-internal.sh b/docker/centos/source/designate/designate-central/config-internal.sh deleted file mode 120000 index 94fcafd40c..0000000000 --- a/docker/centos/source/designate/designate-central/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-central/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-mdns/Dockerfile b/docker/centos/source/designate/designate-mdns/Dockerfile index ab724493f8..eac73ff523 100644 --- a/docker/centos/source/designate/designate-mdns/Dockerfile +++ b/docker/centos/source/designate/designate-mdns/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%designate-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY start.sh /start.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/designate/designate-mdns/config-internal.sh b/docker/centos/source/designate/designate-mdns/config-internal.sh deleted file mode 120000 index c838250c92..0000000000 --- a/docker/centos/source/designate/designate-mdns/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-mdns/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-poolmanager/Dockerfile b/docker/centos/source/designate/designate-poolmanager/Dockerfile index ab724493f8..eac73ff523 100644 --- a/docker/centos/source/designate/designate-poolmanager/Dockerfile +++ b/docker/centos/source/designate/designate-poolmanager/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%designate-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY start.sh /start.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/designate/designate-poolmanager/config-internal.sh b/docker/centos/source/designate/designate-poolmanager/config-internal.sh deleted file mode 120000 index 6b43b0dddd..0000000000 --- a/docker/centos/source/designate/designate-poolmanager/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-poolmanager/config-internal.sh \ No newline at end of file diff --git a/docker/centos/source/designate/designate-sink/Dockerfile b/docker/centos/source/designate/designate-sink/Dockerfile index ab724493f8..eac73ff523 100644 --- a/docker/centos/source/designate/designate-sink/Dockerfile +++ b/docker/centos/source/designate/designate-sink/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%designate-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY start.sh /start.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/designate/designate-sink/config-internal.sh b/docker/centos/source/designate/designate-sink/config-internal.sh deleted file mode 120000 index 713fc1b22c..0000000000 --- a/docker/centos/source/designate/designate-sink/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/designate/designate-sink/config-internal.sh \ No newline at end of file diff --git a/docker/common/designate/designate-api/config-internal.sh b/docker/common/designate/designate-api/config-internal.sh deleted file mode 100755 index c7eb42c165..0000000000 --- a/docker/common/designate/designate-api/config-internal.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-designate.sh - -CONF=/etc/designate/designate.conf - -check_required_vars ADMIN_TENANT_NAME \ - DESIGNATE_API_SERVICE_HOST \ - DESIGNATE_API_SERVICE_PORT \ - DESIGNATE_KEYSTONE_PASSWORD \ - DESIGNATE_KEYSTONE_USER \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_SERVICE_PORT \ - KEYSTONE_AUTH_PROTOCOL \ - KEYSTONE_ADMIN_TOKEN - -export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" -export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0" - -fail_unless_os_service_running keystone - -crux user-create \ - -n ${DESIGNATE_KEYSTONE_USER} \ - -p ${DESIGNATE_KEYSTONE_PASSWORD} \ - -t ${ADMIN_TENANT_NAME} \ - -r admin - -crux endpoint-create \ - --remove-all \ - -n ${DESIGNATE_KEYSTONE_USER} \ - -t dns \ - -I "${KEYSTONE_AUTH_PROTOCOL}://${DESIGNATE_API_SERVICE_HOST}:${DESIGNATE_API_SERVICE_PORT}/v1" \ - -P "${KEYSTONE_AUTH_PROTOCOL}://${DESIGNATE_API_SERVICE_HOST}:${DESIGNATE_API_SERVICE_PORT}/v1" \ - -A "${KEYSTONE_AUTH_PROTOCOL}://${DESIGNATE_API_SERVICE_HOST}:${DESIGNATE_API_SERVICE_PORT}/v1" - -crudini --set $CONF service:api api_paste_config "/usr/share/designate/api-paste.ini" -crudini --set $CONF service:api api_port "${DESIGNATE_API_SERVICE_PORT}" - -exec /usr/bin/designate-api diff --git a/docker/common/designate/designate-api/start.sh b/docker/common/designate/designate-api/start.sh index 90d17bb530..fe556225bb 100755 --- a/docker/common/designate/designate-api/start.sh +++ b/docker/common/designate/designate-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/designate/designate-backend-bind9/config-internal.sh b/docker/common/designate/designate-backend-bind9/config-internal.sh deleted file mode 100755 index 45a127fdd8..0000000000 --- a/docker/common/designate/designate-backend-bind9/config-internal.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -set -e - -. /opt/kolla/kolla-common.sh - -check_required_vars DESIGNATE_ALLOW_RECURSION \ - DESIGNATE_BIND9_RNDC_KEY \ - DESIGNATE_MASTERNS \ - DESIGNATE_SLAVENS - -NAMEDCFG=/etc/named.conf - -# /var/named is coming from a VOLUME definition but at first boot it needs to -# be populated from the original container since else it would be missing some -# Bind9 core files. These files have been saved during the build phase. - -if [ ! -f /var/named/named.ca ]; then - cp -pr /opt/kolla/var-named/* /var/named/ -fi - -# When rndc adds a new domain, bind adds the call in an nzf file in this -# directory. -chmod 770 /var/named -chown root:named /var/named - -# Default Bind9 behavior is to enable recursion, disable if wanted. -if [ "${DESIGNATE_ALLOW_RECURSION}" == "false" ]; then - sed -i -r "s/(recursion) yes/\1 no/" $NAMEDCFG -fi - -sed -i -r "/listen-on port 53/d" $NAMEDCFG -sed -i -r "/listen-on-v6/d" $NAMEDCFG -sed -i -r "s,/\* Path to ISC DLV key \*/,allow-new-zones yes;," $NAMEDCFG -sed -i -r "/allow-query .+;/d" $NAMEDCFG - -if ! grep -q rndc-key /etc/named.conf; then - cat >> /etc/named.conf < /etc/rndc.key < /etc/rndc.conf <> /etc/rndc.conf -chown named /etc/rndc.key - -# Launch and keep in the foreground. -exec /usr/sbin/named -u named -g diff --git a/docker/common/designate/designate-backend-bind9/start.sh b/docker/common/designate/designate-backend-bind9/start.sh index 180cb4f25e..11922974a1 100755 --- a/docker/common/designate/designate-backend-bind9/start.sh +++ b/docker/common/designate/designate-backend-bind9/start.sh @@ -4,10 +4,10 @@ set -o errexit CMD="/usr/sbin/named" ARGS="-u named -g" -# Loading common functions. +# Execute config strategy 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 diff --git a/docker/common/designate/designate-base/config-designate.sh b/docker/common/designate/designate-base/config-designate.sh deleted file mode 100755 index 8d433b0111..0000000000 --- a/docker/common/designate/designate-base/config-designate.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh - -get_or_create_domain() { - local DOMAIN_NAME=$1 - - DOMAIN_ID=$(designate domain-create --name $DOMAIN_NAME | awk '/id/ { print $4; }') - # Searching domain if not created - if [ -z $DOMAIN_ID ]; then - DOMAIN_ID=$(designate domain-list | awk "/$DOMAIN_NAME/ { print \$2; }") - fi - # Fail if domain still don't exist - if [ -z $DOMAIN_ID ]; then - echo "Creating domain failed" 1>&2 - exit 1 - fi - - echo $DOMAIN_ID -} - -check_required_vars DEBUG_LOGGING \ - DESIGNATE_BACKEND \ - DESIGNATE_BIND9_RNDC_KEY \ - DESIGNATE_DB_NAME \ - DESIGNATE_DB_PASSWORD \ - DESIGNATE_DB_USER \ - DESIGNATE_KEYSTONE_PASSWORD \ - DESIGNATE_KEYSTONE_USER \ - DESIGNATE_POOLMAN_POOLID \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_SERVICE_PORT \ - KEYSTONE_AUTH_PROTOCOL \ - KEYSTONE_PUBLIC_SERVICE_HOST \ - KEYSTONE_PUBLIC_SERVICE_PORT \ - RABBITMQ_SERVICE_HOST \ - RABBIT_PASSWORD \ - RABBIT_USERID - -fail_unless_db -dump_vars - -cat > /openrc < /etc/rndc.key <&2 - exit 1 -fi - -if [ -n "$DESIGNATE_SINK_NOVA_DOMAIN_NAME" ]; then - NOVA_DOMAIN_ID=$(get_or_create_domain $DESIGNATE_SINK_NOVA_DOMAIN_NAME) - configure_nova_handler $NOVA_DOMAIN_ID - HANDLERS="nova_fixed" -fi - -if [ -n "$DESIGNATE_SINK_NEUTRON_DOMAIN_NAME" ]; then - NEUTRON_DOMAIN_ID=$(get_or_create_domain $DESIGNATE_SINK_NEUTRON_DOMAIN_NAME) - configure_neutron_handler $NEUTRON_DOMAIN_ID - [ -n "$HANDLERS" ] && HANDLERS+="," - HANDLERS+="neutron_floatingip" -fi - -crudini --set $CONF service:sink enabled_notification_handlers "$HANDLERS" - -exec /usr/bin/designate-sink diff --git a/docker/common/designate/designate-sink/start.sh b/docker/common/designate/designate-sink/start.sh index 41637a5f62..d2f93e26fc 100755 --- a/docker/common/designate/designate-sink/start.sh +++ b/docker/common/designate/designate-sink/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