diff options
author | Haibin Huang <haibin.huang@intel.com> | 2019-04-01 09:51:56 +0800 |
---|---|---|
committer | Haibin Huang <haibin.huang@intel.com> | 2019-04-01 09:53:28 +0800 |
commit | 59edc5d9b0f578e0b799c0350b39a08f9b040ab3 (patch) | |
tree | 50029061e74aa5d2d51a61bd1f9bed196f068fcd /ocata/run.sh | |
parent | 4caaeebda638befff570568313aa58135b6f91f3 (diff) |
Add https support for multicloud ocata plugin
The https endpoint can be enabled by setting env: SSL_ENABLED=true
Change-Id: Ibc651851edb1dd2e143ba28c784f82562c0c9d30
Issue-ID: MULTICLOUD-535
Signed-off-by: Haibin Huang <haibin.huang@intel.com>
Diffstat (limited to 'ocata/run.sh')
-rwxr-xr-x | ocata/run.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ocata/run.sh b/ocata/run.sh index 5cf7e748..027b98c8 100755 --- a/ocata/run.sh +++ b/ocata/run.sh @@ -16,4 +16,22 @@ memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid export PYTHONPATH=lib/share -uwsgi --http :9006 --module ocata.wsgi --master --processes 4 + +#nohup python manage.py runserver 0.0.0.0:9006 2>&1 & + +if [ ${SSL_ENABLED} = "true" ]; then + nohup uwsgi --https :9006,ocata/pub/ssl/cert/cert.crt,ocata/pub/ssl/cert/cert.key --module ocata.wsgi --master --processes 4 & + +else + nohup uwsgi --http :9006 --module ocata.wsgi --master --processes 4 & +fi + +logDir="/var/log/onap/multicloud/openstack/ocata" +if [ ! -x $logDir ]; then + mkdir -p $logDir +fi +while [ ! -f $logDir/ocata.log ]; do + sleep 1 +done + +tail -F $logDir/ocata.log |