summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
Diffstat (limited to 'vio')
-rw-r--r--vio/requirements.txt10
-rwxr-xr-xvio/run.sh17
-rwxr-xr-xvio/stop.sh3
-rw-r--r--vio/vio/settings.py4
4 files changed, 24 insertions, 10 deletions
diff --git a/vio/requirements.txt b/vio/requirements.txt
index f2c9800..f237334 100644
--- a/vio/requirements.txt
+++ b/vio/requirements.txt
@@ -26,4 +26,12 @@ unittest_xml_reporting==1.12.0
onappylog>=1.0.6
# for event
-oslo_messaging \ No newline at end of file
+oslo_messaging
+
+# for pecan framework
+pecan>=1.2.1
+oslo.concurrency>=3.21.0
+oslo.config>=4.11.0
+oslo.service>=1.25.0
+eventlet>=0.20.0
+PyYAML>=3.1.0
diff --git a/vio/run.sh b/vio/run.sh
index f3ba7a1..4b58fe5 100755
--- a/vio/run.sh
+++ b/vio/run.sh
@@ -26,11 +26,16 @@ sed -i "s/MR_PORT =.*/MR_PORT = \"${MR_PORT}\"/g" vio/pub/config/config.py
logDir="/var/log/onap/multicloud/vio"
-nohup python manage.py runserver 0.0.0.0:9004 2>&1 &
-nohup python vio/event_listener/server.py 2>&1 &
-
-while [ ! -f $logDir/vio.log ]; do
- sleep 1
-done
+if [ "$WEB_FRAMEWORK" == "pecan" ]
+then
+ python multivimbroker/scripts/api.py
+else
+ # nohup python manage.py runserver 0.0.0.0:9004 2>&1 &
+ nohup uwsgi --http :9004 --module vio.wsgi --master --processes 4 &
+ nohup python vio/event_listener/server.py 2>&1 &
+ while [ ! -f $logDir/vio.log ]; do
+ sleep 1
+ done
tail -F $logDir/vio.log
+fi
diff --git a/vio/stop.sh b/vio/stop.sh
index 718b3cb..e07394a 100755
--- a/vio/stop.sh
+++ b/vio/stop.sh
@@ -11,4 +11,5 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-ps auxww | grep 'manage.py runserver 0.0.0.0:9004' | awk '{print $2}' | xargs kill -9
+# ps auxww | grep 'manage.py runserver 0.0.0.0:9004' | awk '{print $2}' | xargs kill -9
+ps auxww |grep 'uwsgi --http :9004 --module vio.wsgi --master' |awk '{print $2}' |xargs kill -9
diff --git a/vio/vio/settings.py b/vio/vio/settings.py
index f1dad0f..68411ea 100644
--- a/vio/vio/settings.py
+++ b/vio/vio/settings.py
@@ -26,9 +26,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '3o-wney!99y)^h3v)0$j16l9=fdjxcb+a8g+q3tfbahcnu2b0o'
# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
+# DEBUG = True
-ALLOWED_HOSTS = []
+ALLOWED_HOSTS = ['*']
# Application definition