Integrate uwsgi with django 73/36173/1
authorYun Huang <yun.huang@windriver.com>
Fri, 16 Mar 2018 06:29:47 +0000 (14:29 +0800)
committerYun Huang <yun.huang@windriver.com>
Fri, 16 Mar 2018 06:29:47 +0000 (14:29 +0800)
To enable parallel processing of plugin services

Change-Id: I61e9934273a8448ee6a437c9832a45d1f75a7a60
Issue-ID: MULTICLOUD-187
Signed-off-by: Yun Huang <yun.huang@windriver.com>
newton/requirements.txt
newton/run.sh
newton/stop.sh
ocata/requirements.txt
ocata/run.sh
ocata/stop.sh
windriver/requirements.txt
windriver/run.sh
windriver/stop.sh

index df84bef..5eb0f36 100644 (file)
@@ -13,6 +13,9 @@ keystoneauth1==2.19.0
 #python-memcached
 python-memcached
 
+#uwsgi for parallel processing
+uwsgi
+
 # for unit test
 coverage==4.2
 mock==2.0.0
index 43de581..a355cb8 100755 (executable)
@@ -15,7 +15,8 @@
 
 memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid
 export PYTHONPATH=lib/share
-nohup python manage.py runserver 0.0.0.0:9003 2>&1 &
+#nohup python manage.py runserver 0.0.0.0:9003 2>&1 &
+nohup uwsgi --http :9003 --module newton.wsgi --master --processes 4 &
 
 logDir="/var/log/onap/multicloud/openstack/newton"
 if [ ! -x  $logDir  ]; then
index f743bf9..506d996 100755 (executable)
@@ -13,5 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ps auxww | grep 'manage.py runserver 0.0.0.0:9003' | awk '{print $2}' | xargs kill -9
+#ps auxww | grep 'manage.py runserver 0.0.0.0:9003' | awk '{print $2}' | xargs kill -9
+ps auxww |grep 'uwsgi --http :9003 --module newton.wsgi --master' |awk '{print $2}' |xargs kill -9
 ps auxww | grep 'memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid' | awk '{print $2}' | xargs kill -9
index 76a3c0b..34ceaec 100644 (file)
@@ -11,6 +11,9 @@ keystoneauth1==2.18.0
 #python-memcached
 python-memcached
 
+#uwsgi for parallel processing
+uwsgi
+
 # for unit test
 coverage==4.2
 mock==2.0.0
index f1bcfa9..c0293f6 100644 (file)
@@ -15,7 +15,8 @@
 
 memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid
 export PYTHONPATH=lib/share
-nohup python manage.py runserver 0.0.0.0:9006 2>&1 &
+#nohup python manage.py runserver 0.0.0.0:9006 2>&1 &
+nohup uwsgi --http :9006 --module ocata.wsgi --master --processes 4 &
 
 logDir="/var/log/onap/multicloud/openstack/ocata"
 if [ ! -x  $logDir  ]; then
index 5a2209f..1402a97 100644 (file)
@@ -13,5 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ps auxww | grep 'manage.py runserver 0.0.0.0:9006' | awk '{print $2}' | xargs kill -9
+#ps auxww | grep 'manage.py runserver 0.0.0.0:9006' | awk '{print $2}' | xargs kill -9
+ps auxww |grep 'uwsgi --http :9006 --module ocata.wsgi --master' |awk '{print $2}' |xargs kill -9
 ps auxww | grep 'memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid' | awk '{print $2}' | xargs kill -9
index 25a691a..c3576f5 100644 (file)
@@ -11,6 +11,9 @@ keystoneauth1==2.18.0
 #python-memcached
 python-memcached
 
+#uwsgi for parallel processing
+uwsgi
+
 # for unit test
 coverage==4.2
 mock==2.0.0
index 05413d2..4cc23a6 100644 (file)
@@ -15,7 +15,8 @@
 
 memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid
 export PYTHONPATH=lib/share
-nohup python manage.py runserver 0.0.0.0:9005 2>&1 &
+#nohup python manage.py runserver 0.0.0.0:9005 2>&1 &
+nohup uwsgi --http :9005 --module titanium_cloud.wsgi --master --processes 4 &
 
 logDir="/var/log/onap/multicloud/openstack/windriver"
 if [ ! -x  $logDir  ]; then
index a84fb3b..ab8a72d 100644 (file)
@@ -13,5 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ps auxww | grep 'manage.py runserver 0.0.0.0:9005' | awk '{print $2}' | xargs kill -9
+#ps auxww | grep 'manage.py runserver 0.0.0.0:9005' | awk '{print $2}' | xargs kill -9
+ps auxww |grep 'uwsgi --http :9005 --module titanium_cloud.wsgi --master' |awk '{print $2}' |xargs kill -9
 ps auxww | grep 'memcached -d -m 2048 -u root -c 1024 -p 11211 -P /tmp/memcached1.pid' | awk '{print $2}' | xargs kill -9