summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorStepan Andrushko <stepanx.andrushko@intel.com>2018-11-15 23:14:33 +0200
committerStepan Andrushko <stepanx.andrushko@intel.com>2018-12-13 18:34:53 +0200
commit0d6c251582f2fd19980c5d73d6a412a3b8fede64 (patch)
tree1fb88c9641447a4ca35446c3051f89d9766ebf3d /docker
parent24700ec3606ca422708646d60fb346d2e0d103cc (diff)
Update#2: Trex KPI not collected no rabbitmq user
Changed the way how rabbitmq user is created. For baremetal it is done using NSB installation script. For Yardstick installed in container supervisor is updated with user name/password. JIRA: YARDSTICK-1479 Change-Id: I4f42ab8d5ef1735b0416ed26d04e259efa155543 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Diffstat (limited to 'docker')
-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