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 <