summaryrefslogtreecommitdiffstats
path: root/docker/supervisor.sh
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-07-24 04:13:56 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-07-27 04:02:50 +0000
commitedbe3568a052da8afd24b6877c4c6fdcc7627ba3 (patch)
tree54e1870ad8171471a97c1e07bd9a0f4146e07bb1 /docker/supervisor.sh
parent869d5fdb0b7a6070a78b4ec21d6b6c1cba14da6c (diff)
Yardstick GUI & GUI deployment
JIRA: YARDSTICK-758 As E release plan, we have the need of yardstick GUI. This patch is GUI front end code and deployment. The backend code is yardstick API. Change-Id: Ib15f78bcc50168c7828beff97256e9939c6da809 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'docker/supervisor.sh')
-rwxr-xr-xdocker/supervisor.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/docker/supervisor.sh b/docker/supervisor.sh
new file mode 100755
index 000000000..b67de2212
--- /dev/null
+++ b/docker/supervisor.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# nginx service start when boot
+supervisor_config='/etc/supervisor/conf.d/yardstick.conf'
+
+if [[ ! -e "${supervisor_config}" ]];then
+ cat << EOF > "${supervisor_config}"
+[supervisord]
+nodaemon = true
+
+[program:nginx]
+command = service nginx restart
+
+[program:yardstick_uwsgi]
+directory = /etc/yardstick
+command = uwsgi -i yardstick.ini
+EOF
+fi