Update project maturity status
[multicloud/azure.git] / azure / run.sh
1 #!/bin/sh
2 # Copyright (c) 2018 Amdocs
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #         http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 sed -i "s/MSB_SERVICE_IP =.*/MSB_SERVICE_IP = \"${MSB_ADDR}\"/g" multicloud_azure/pub/config/config.py
17 sed -i "s/MSB_SERVICE_PORT =.*/MSB_SERVICE_PORT = \"${MSB_PORT}\"/g" multicloud_azure/pub/config/config.py
18 sed -i "s/AAI_ADDR =.*/AAI_ADDR = \"${AAI_ADDR}\"/g" multicloud_azure/pub/config/config.py
19 sed -i "s/AAI_PORT =.*/AAI_PORT = \"${AAI_PORT}\"/g" multicloud_azure/pub/config/config.py
20 sed -i "s/AAI_SCHEMA_VERSION =.*/AAI_SCHEMA_VERSION = \"${AAI_SCHEMA_VERSION}\"/g" multicloud_azure/pub/config/config.py
21 sed -i "s/AAI_USERNAME =.*/AAI_USERNAME = \"${AAI_USERNAME}\"/g" multicloud_azure/pub/config/config.py
22 sed -i "s/AAI_PASSWORD =.*/AAI_PASSWORD = \"${AAI_PASSWORD}\"/g" multicloud_azure/pub/config/config.py
23 sed -i "s/MR_ADDR =.*/MR_ADDR = \"${MR_ADDR}\"/g" multicloud_azure/pub/config/config.py
24 sed -i "s/MR_PORT =.*/MR_PORT = \"${MR_PORT}\"/g" multicloud_azure/pub/config/config.py
25
26
27 logDir="/var/log/onap/multicloud/azure"
28
29 if [ "$WEB_FRAMEWORK" == "pecan" ]
30 then
31     python multivimbroker/scripts/api.py
32 else
33     # nohup python manage.py runserver 0.0.0.0:9008 2>&1 &
34     nohup aria-rest 2>&1 &
35     nohup uwsgi --http :9008 --module multicloud_azure.wsgi --master --processes 4 &
36     nohup python -m multicloud_azure.event_listener.server 2>&1 &
37
38     while [ ! -f  $logDir/azure.log ]; do
39         sleep 1
40     done
41 tail -F $logDir/azure.log
42 fi