X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=engine-d-standalone%2Fsrc%2Fmain%2Fassembly%2Fbin%2Frun.sh;h=eeed056ba2a381ff4c1c93c17f5824fb57ae5fc4;hb=021187ca7c07e1a7227d894fe728965a190e5c8c;hp=4a93b50b59c8b346fc6eb85a6722306a8a83f812;hpb=9c14e8bc2360c0098a23486ea71fc5c99e2fd64e;p=holmes%2Fengine-management.git diff --git a/engine-d-standalone/src/main/assembly/bin/run.sh b/engine-d-standalone/src/main/assembly/bin/run.sh index 4a93b50..eeed056 100644 --- a/engine-d-standalone/src/main/assembly/bin/run.sh +++ b/engine-d-standalone/src/main/assembly/bin/run.sh @@ -21,7 +21,7 @@ echo @RUNHOME@ $RUNHOME echo @JAVA_HOME@ $JAVA_HOME JAVA="$JAVA_HOME/bin/java" echo @JAVA@ $JAVA -main_path=$RUNHOME/../ +main_path=$RUNHOME/.. cd $main_path JAVA_OPTS="-Xms50m -Xmx128m" port=8312 @@ -31,5 +31,25 @@ echo @JAVA_OPTS@ $JAVA_OPTS class_path="$main_path/:$main_path/holmes-engine-d.jar" echo @class_path@ $class_path -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.holmes.engine.EngineDActiveApp server "$main_path/conf/engine-d.yml" +sed -i "s/activemq.username=.*/activemq.username=activemq/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties +sed -i "s/activemq.password=.*/activemq.password=v1/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties +/home/activemq/apache-activemq-5.9.0/bin/activemq start + +sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml" + + +export SERVICE_IP=`hostname -i` +echo SERVICE_IP=${SERVICE_IP} + +if [ ${TESTING} == 1 ]; then + export HOSTNAME=${SERVICE_IP}:9102 +fi + +#ActiveMQ IP Configurations +sed -i "s|brokerIp:.*|brokerIp: $SERVICE_IP|" "$main_path/conf/engine-d.yml" + +cat "$main_path/conf/engine-d.yml" + + +"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.holmes.engine.EngineDActiveApp server "$main_path/conf/engine-d.yml"