From ab96e4a51eaf260dc2ec6050afded536ac81007f Mon Sep 17 00:00:00 2001 From: digambar Date: Fri, 3 Jul 2015 15:21:57 +0530 Subject: [PATCH] Add config-internal/config-external to Zaqar containers Partially Implements: Blueprint standard-start Co-Authored-By: Swapnil Kulkarni Change-Id: I4623f2495365e3178d3cd7f453683c2ceaf16b02 --- docker/centos/binary/zaqar/Dockerfile | 2 + docker/centos/binary/zaqar/config-external.sh | 1 + docker/centos/binary/zaqar/config-internal.sh | 1 + docker/common/zaqar/config-external.sh | 10 +++ docker/common/zaqar/config-internal.sh | 64 ++++++++++++++++ docker/common/zaqar/start.sh | 73 ++++--------------- docs/minimal-environment-vars.md | 6 +- 7 files changed, 94 insertions(+), 63 deletions(-) create mode 100644 docker/centos/binary/zaqar/config-external.sh create mode 100644 docker/centos/binary/zaqar/config-internal.sh create mode 100644 docker/common/zaqar/config-external.sh create mode 100644 docker/common/zaqar/config-internal.sh diff --git a/docker/centos/binary/zaqar/Dockerfile b/docker/centos/binary/zaqar/Dockerfile index 956f908254..ddb198fe39 100644 --- a/docker/centos/binary/zaqar/Dockerfile +++ b/docker/centos/binary/zaqar/Dockerfile @@ -6,4 +6,6 @@ RUN yum -y install openstack-zaqar && yum clean all ADD ./start.sh /start.sh ADD ./check.sh /check.sh +COPY config-internal.sh config-external.sh /opt/kolla/ + CMD ["/start.sh"] diff --git a/docker/centos/binary/zaqar/config-external.sh b/docker/centos/binary/zaqar/config-external.sh new file mode 100644 index 0000000000..3459a6f72e --- /dev/null +++ b/docker/centos/binary/zaqar/config-external.sh @@ -0,0 +1 @@ +../../../../common/zaqar/config-external.sh diff --git a/docker/centos/binary/zaqar/config-internal.sh b/docker/centos/binary/zaqar/config-internal.sh new file mode 100644 index 0000000000..10b7affb76 --- /dev/null +++ b/docker/centos/binary/zaqar/config-internal.sh @@ -0,0 +1 @@ +../../../../common/zaqar/config-internal.sh diff --git a/docker/common/zaqar/config-external.sh b/docker/common/zaqar/config-external.sh new file mode 100644 index 0000000000..7ed6da2eb4 --- /dev/null +++ b/docker/common/zaqar/config-external.sh @@ -0,0 +1,10 @@ +#!/bin/bash +SOURCE="/opt/kolla/zaqar/zaqar.conf" +TARGET="/etc/zaqar/zaqar.conf" +OWNER="zaqar" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/common/zaqar/config-internal.sh b/docker/common/zaqar/config-internal.sh new file mode 100644 index 0000000000..6c68fccf22 --- /dev/null +++ b/docker/common/zaqar/config-internal.sh @@ -0,0 +1,64 @@ +#!/bin/sh + +set -e + +. /opt/kolla/kolla-common.sh + +: ${ADMIN_TENANT_NAME:=admin} +: ${ZAQAR_KEYSTONE_USER:=zaqar} +: ${KEYSTONE_AUTH_PROTOCOL:=http} + +check_required_vars ZAQAR_KEYSTONE_PASSWORD ZAQAR_SERVER_SERVICE_HOST \ + KEYSTONE_ADMIN_SERVICE_HOST KEYSTONE_ADMIN_TOKEN \ + PUBLIC_IP +dump_vars + +#check_for_mongodb +check_for_keystone + +cat > /openrc < /openrc <