Readd Zaqar for Juno series since that was where it was introduced

Change-Id: I379844bb46d9ac1b933124b1736b7594700f88a8
Partially-implements: blueprint port-kilo
This commit is contained in:
Steven Dake 2015-05-06 05:19:56 -07:00
parent 68594d873f
commit d19adb6a6b
6 changed files with 88 additions and 0 deletions

View File

@ -44,6 +44,7 @@ services:
* Mongodb
* Ceilometer
* Horizon
* Zaqar
```
$ sudo docker search kollaglue

View File

@ -40,3 +40,6 @@
: ${NOVA_METADATA_API_SERVICE_PORT:=8775}
: ${RABBITMQ_SERVICE_HOST:=$RABBITMQ_PORT_5672_TCP_ADDR}
: ${RABBITMQ_SERVICE_PORT:=5672}
: ${ZAQAR_SERVER_SERVICE_HOST:=$ZAQAR_SERVER_PORT_8888_TCP_ADDR}
: ${ZAQAR_SERVER_SERVICE_PORT:=8888}

9
docker/zaqar/Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install openstack-zaqar && yum clean all
ADD ./start.sh /start.sh
ADD ./check.sh /check.sh
CMD ["/start.sh"]

1
docker/zaqar/build Symbolic link
View File

@ -0,0 +1 @@
../../tools/build-docker-image

10
docker/zaqar/check.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
status=$(curl -s -w "%{http_code}" -o /dev/null http://localhost:8888/v1/queues)
if [[ $status -ne 200 && $status -ne 204 ]]; then
echo "ERROR($status): queue list failed"
exit $status
fi
exit 0

64
docker/zaqar/start.sh Executable file
View File

@ -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 <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
export OS_USERNAME="${ZAQAR_KEYSTONE_USER}"
export OS_PASSWORD="${ZAQAR_KEYSTONE_PASSWORD}"
export OS_TENANT_NAME="${ADMIN_TENANT_NAME}"
EOF
cfg=/etc/zaqar/zaqar.conf
crudini --set $cfg DEFAULT log_file \
""
crudini --set $cfg DEFAULT use_stderr \
true
crudini --set $cfg drivers storage \
sqlite
crudini --set $cfg keystone_authtoken admin_password \
"${ZAQAR_KEYSTONE_PASSWORD}"
crudini --set $cfg keystone_authtoken admin_user \
"${ZAQAR_KEYSTONE_USER}"
crudini --set $cfg keystone_authtoken admin_tenant_name \
"${ADMIN_TENANT_NAME}"
crudini --set $cfg keystone_authtoken auth_uri \
"${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
crudini --set $cfg keystone_authtoken auth_protocol \
"${KEYSTONE_AUTH_PROTOCOL}"
crudini --set $cfg keystone_authtoken auth_host \
"${KEYSTONE_PUBLIC_SERVICE_HOST}"
crudini --set $cfg keystone_authtoken auth_port \
5000
export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0"
crux user-create -n ${ZAQAR_KEYSTONE_USER} \
-p ${ZAQAR_KEYSTONE_PASSWORD} \
-t ${ADMIN_TENANT_NAME} \
-r admin
crux endpoint-create --remove-all -n ${ZAQAR_KEYSTONE_USER} -t messaging \
-I "${KEYSTONE_AUTH_PROTOCOL}://${ZAQAR_SERVER_SERVICE_HOST}:8888" \
-P "${KEYSTONE_AUTH_PROTOCOL}://${PUBLIC_IP}:8888" \
-A "${KEYSTONE_AUTH_PROTOCOL}://${ZAQAR_SERVER_SERVICE_HOST}:8888"
exec /usr/bin/zaqar-server