Files
training-labs/labs/osbash/scripts/ubuntu/install_rabbitmq.sh
Roger Luethi 4c8598389e Replace apt-get with apt
The install-guide has replaced apt-get with apt. Follow this move.

Change-Id: Icea4bff568d6e40a949f69d3f1b0659327352ccd
2017-02-05 14:16:25 +01:00

43 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd "$(dirname "$0")/.." && pwd)
source "$TOP_DIR/config/paths"
source "$CONFIG_DIR/credentials"
source "$LIB_DIR/functions.guest.sh"
exec_logfile
indicate_current_auto
#-------------------------------------------------------------------------------
# Install the message broker service (RabbitMQ).
# http://docs.openstack.org/newton/install-guide-ubuntu/environment-messaging.html
#-------------------------------------------------------------------------------
echo "Installing RabbitMQ."
sudo apt install -y rabbitmq-server
echo -n "Waiting for RabbitMQ to start."
while ! sudo rabbitmqctl status >/dev/null; do
sleep 1
echo -n .
done
echo
echo ---------------------------------------------------------------
echo "sudo rabbitmqctl status"
sudo rabbitmqctl status
echo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "sudo rabbitmqctl report"
sudo rabbitmqctl report
echo ---------------------------------------------------------------
echo "Adding openstack user to messaging service."
sudo rabbitmqctl add_user openstack "$RABBIT_PASS"
echo "Permitting configuration, write and read access for the openstack user."
sudo rabbitmqctl set_permissions openstack ".*" ".*" ".*"