microstack/snap-overlay/bin/setup-rabbit
Dmitrii Shcherbakov 32ad5af7f4 Generate random passwords instead of hard-coding
* The prototype stage hard-coding of passwords is replaced by random
  generation of passwords for:
  * all API services;
  * RabbitMQ;
  * MySQL;
  * OpenStack admin user;
  * OpenStack service users;
* Passwords are not replaced upon successive microstack.init calls to
  preserve idempotency.

Change-Id: Ic3d6108a81d09bdd09e986f80b3040b030605178
2020-10-08 11:25:25 +03:00

11 lines
272 B
Bash
Executable File

#!/bin/bash
set -ex
export HOME=$SNAP_COMMON/lib/rabbitmq
rabbitmq_password=`snapctl get config.credentials.rabbitmq-password`
$SNAP/usr/sbin/rabbitmqctl add_user openstack $rabbitmq_password || true
$SNAP/usr/sbin/rabbitmqctl set_permissions openstack ".*" ".*" ".*"