summaryrefslogtreecommitdiffstats
path: root/pike/run.sh
diff options
context:
space:
mode:
authorHaibin Huang <haibin.huang@intel.com>2019-04-01 09:43:16 +0800
committerHaibin Huang <haibin.huang@intel.com>2019-04-01 09:53:27 +0800
commit4caaeebda638befff570568313aa58135b6f91f3 (patch)
tree1ae2caf534f3d764fdb08f45688af7fb101f0eb5 /pike/run.sh
parent31a6b223d123ff9fb26a6d0fa43ad327440cd5ca (diff)
Add https support for multicloud pike plugin
The https endpoint can be enabled by setting env: SSL_ENABLED=true Change-Id: Iae636bda8fa8ae9c77907e7171e1d93cb54795bc Issue-ID: MULTICLOUD-535 Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Diffstat (limited to 'pike/run.sh')
-rwxr-xr-xpike/run.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/pike/run.sh b/pike/run.sh
index e3df3b3c..043ff4c0 100755
--- a/pike/run.sh
+++ b/pike/run.sh
@@ -15,4 +15,22 @@
memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid
export PYTHONPATH=lib/share
-uwsgi --http :9007 --module pike.wsgi --master --processes 4
+
+#nohup python manage.py runserver 0.0.0.0:9007 2>&1 &
+
+if [ ${SSL_ENABLED} = "true" ]; then
+ nohup uwsgi --https :9007,pike/pub/ssl/cert/cert.crt,pike/pub/ssl/cert/cert.key --module pike.wsgi --master --processes 4 &
+
+else
+ nohup uwsgi --http :9007 --module pike.wsgi --master --processes 4 &
+fi
+
+logDir="/var/log/onap/multicloud/openstack/pike"
+if [ ! -x $logDir ]; then
+ mkdir -p $logDir
+fi
+while [ ! -f $logDir/pike.log ]; do
+ sleep 1
+done
+
+tail -F $logDir/pike.log