blob: 9e1542b417b5d50de6349ade290b27062bc8dfe8 [file] [log] [blame]
Bin Yangb1b03862017-02-22 11:15:28 +08001#!/bin/bash
Ethan Lynn2906f882018-01-15 10:32:43 +08002# Copyright (c) 2017-2018 VMware, Inc.
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.
Bin Yangb1b03862017-02-22 11:15:28 +080015
Ethan Lynnc7633872017-08-28 16:45:26 +080016sed -i "s/MSB_SERVICE_IP =.*/MSB_SERVICE_IP = \"${MSB_ADDR}\"/g" multivimbroker/pub/config/config.py
17sed -i "s/MSB_SERVICE_PORT =.*/MSB_SERVICE_PORT = \"${MSB_PORT}\"/g" multivimbroker/pub/config/config.py
18sed -i "s/AAI_ADDR =.*/AAI_ADDR = \"${AAI_ADDR}\"/g" multivimbroker/pub/config/config.py
19sed -i "s/AAI_PORT =.*/AAI_PORT = \"${AAI_PORT}\"/g" multivimbroker/pub/config/config.py
20sed -i "s/AAI_SCHEMA_VERSION =.*/AAI_SCHEMA_VERSION = \"${AAI_SCHEMA_VERSION}\"/g" multivimbroker/pub/config/config.py
21sed -i "s/AAI_USERNAME =.*/AAI_USERNAME = \"${AAI_USERNAME}\"/g" multivimbroker/pub/config/config.py
22sed -i "s/AAI_PASSWORD =.*/AAI_PASSWORD = \"${AAI_PASSWORD}\"/g" multivimbroker/pub/config/config.py
23
liangked346df72018-03-05 17:04:16 +080024logDir="/var/log/onap/multicloud/multivimbroker"
25if [ ! -x $logDir ]; then
26 mkdir -p $logDir
27fi
28
Hong Hui Xiaod7297be2018-03-12 17:59:05 +080029if [ "$WEB_FRAMEWORK" == "pecan" ]
30then
31 python multivimbroker/scripts/api.py
32else
Yun Huang38e7e692018-03-24 00:28:34 +080033 # nohup python manage.py runserver 0.0.0.0:9001 2>&1 &
SudhakarReddy5a9a2412018-05-10 14:29:20 +053034 nohup uwsgi --http :9001 -t 120 --module multivimbroker.wsgi --master --processes 4 &
Ethan Lynnc7633872017-08-28 16:45:26 +080035
Hong Hui Xiaod7297be2018-03-12 17:59:05 +080036 while [ ! -f $logDir/multivimbroker.log ]; do
37 sleep 1
38 done
Ethan Lynnc7633872017-08-28 16:45:26 +080039
Hong Hui Xiaod7297be2018-03-12 17:59:05 +080040 tail -F $logDir/multivimbroker.log
liangke7e247672018-03-26 17:55:40 +080041fi