summaryrefslogtreecommitdiffstats
path: root/docker/supervisor.sh
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2018-12-17 08:38:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-12-17 08:38:40 +0000
commit686525d589afae49751fe56a2a90d67db5a70f95 (patch)
treecb697405e52b03af11303b2aeadde57410533627 /docker/supervisor.sh
parent97851fc3e05ef4513f65f9ca9ead95f07bcb0c99 (diff)
parent0d6c251582f2fd19980c5d73d6a412a3b8fede64 (diff)
Merge "Update#2: Trex KPI not collected no rabbitmq user"
Diffstat (limited to 'docker/supervisor.sh')
-rwxr-xr-xdocker/supervisor.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/docker/supervisor.sh b/docker/supervisor.sh
index 44e34fb38..bd17cfbc4 100755
--- a/docker/supervisor.sh
+++ b/docker/supervisor.sh
@@ -10,8 +10,10 @@
# nginx service start when boot
supervisor_config='/etc/supervisor/conf.d/yardstick.conf'
+rabbitmq_config='/etc/supervisor/conf.d/rabbitmq.conf'
if [[ ! -e "${supervisor_config}" ]]; then
+
cat << EOF > "${supervisor_config}"
[supervisord]
nodaemon = true
@@ -22,8 +24,18 @@ command = service nginx restart
[program:yardstick_uwsgi]
directory = /etc/yardstick
command = uwsgi -i yardstick.ini
+EOF
+
+fi
+
+if [[ ! -e "${rabbitmq_config}" ]]; then
+ cat << EOF > "${rabbitmq_config}"
[program:rabbitmq]
-command = service rabbitmq-server restart
+command = /bin/bash -c "service rabbitmq-server restart
+ rabbitmqctl start_app
+ rabbitmqctl add_user yardstick yardstick
+ rabbitmqctl set_permissions -p / yardstick '.*' '.*'"
EOF
+
fi