4 # Copyright 2017 ZTE Corporation.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 RUNHOME=`cd $DIRNAME/; pwd`
21 echo @RUNHOME@ $RUNHOME
23 echo @JAVA_HOME@ $JAVA_HOME
24 JAVA="$JAVA_HOME/bin/java"
28 JAVA_OPTS="-Xms50m -Xmx128m"
30 #JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
31 echo @JAVA_OPTS@ $JAVA_OPTS
33 class_path="$main_path/:$main_path/holmes-engine-d.jar"
34 echo @class_path@ $class_path
36 sed -i "s/activemq.username=.*/activemq.username=activemq/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties
37 sed -i "s/activemq.password=.*/activemq.password=v1/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties
38 /home/activemq/apache-activemq-5.9.0/bin/activemq start
40 sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml"
43 export SERVICE_IP=`hostname -i`
44 echo SERVICE_IP=${SERVICE_IP}
46 if [ ! -z ${TESTING} ] && [ ${TESTING} == 1 ]; then
47 if [ ! -z ${HOST_IP} ]; then
48 export HOSTNAME=${HOST_IP}:9102
50 export HOSTNAME=${SERVICE_IP}:9102
54 #ActiveMQ IP Configurations
55 sed -i "s|brokerIp:.*|brokerIp: $SERVICE_IP|" "$main_path/conf/engine-d.yml"
57 cat "$main_path/conf/engine-d.yml"
60 "$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.holmes.engine.EngineDActiveApp server "$main_path/conf/engine-d.yml"