Move uwsgi.log and yardstick.sock to proper location 31/26331/1
authorchenjiankun <chenjiankun1@huawei.com>
Wed, 21 Dec 2016 11:14:02 +0000 (11:14 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Wed, 21 Dec 2016 11:17:26 +0000 (11:17 +0000)
JIRA: YARDSTICK-504

Now yardstick.sock and uwsgi.log is in yardstick/api directory.
But it is not standard for they should not be put in the code path.
So I move yardstick.sock to /var/run/yardstick.sock
and move uwsgi.log to /var/log/yardstick/uwsgi.log

Change-Id: I526ab011c0222255dfbae037f494edb5d8a88add
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
api/api-prepare.sh
api/yardstick.ini
api/yardstick.sock [deleted file]

index fade8cc..5cc65c9 100755 (executable)
@@ -20,7 +20,7 @@ server {
     index  index.htm index.html;
     location / {
         include uwsgi_params;
-        uwsgi_pass unix:///home/opnfv/repos/yardstick/api/yardstick.sock;
+        uwsgi_pass unix:///var/run/yardstick.sock;
     }
 }
 EOF
@@ -47,3 +47,9 @@ command = uwsgi -i yardstick.ini
 autorestart = true
 EOF
 fi
+
+# create api log directory
+mkdir -p /var/log/yardstick
+
+# create yardstick.sock for communicating
+touch /var/run/yardstick.sock
index 01025c2..2ba881f 100644 (file)
@@ -12,5 +12,5 @@ chmod-socket = 666
 callable = app
 enable-threads = true
 close-on-exec = 1
-daemonize=/home/opnfv/repos/yardstick/api/uwsgi.log
-socket = /home/opnfv/repos/yardstick/api/yardstick.sock
+daemonize= /var/log/yardstick/uwsgi.log
+socket = /var/run/yardstick.sock
diff --git a/api/yardstick.sock b/api/yardstick.sock
deleted file mode 100644 (file)
index e69de29..0000000