openstack-helm/rabbitmq/templates/bin/_rabbitmq-start.sh.tpl
Tomasz Paszkowski e3f1389f60 Add rabbitmq deployment with HA. (#123)
This works is based on http://github.com/openstack-fuel-ccp-rabbitmq and it mostly adjusts this solution
to a helm based deployment.
2017-02-17 10:49:32 -08:00

13 lines
611 B
Smarty

#!/bin/bash
set -eux
set -o pipefail
cp /etc/rabbitmq/erlang.cookie /var/lib/rabbitmq/.erlang.cookie
chmod 600 /var/lib/rabbitmq/.erlang.cookie
# This should be called after rabbitmq-server is started but in current design we don't have
# any other way of doing this. PreStart could not be used here as it's:
# - executed just after container creation (not after entrypoint)
# - Currently, there are (hopefully rare) scenarios where PostStart hooks may not be delivered.
# Startup marker is used by liveness and readiness probes.
date +%s > /tmp/rabbit-startup-marker
exec /usr/lib/rabbitmq/bin/rabbitmq-server