Use cert-initializer truststore instead of hard-coded ONAP Root CA
[ccsdk/cds.git] / ms / blueprintsprocessor / application / src / main / docker / startService.sh
1 #!/bin/sh
2
3 TRUSTSTORE_PASSWD=${TRUSTSTORE_PASSWD:-changeit}
4
5 nodeName=BlueprintsProcessor_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s/\\//\\n/g | tail -1)
6
7 export APP_HOME=/opt/app/onap
8
9 #echo "${CLUSTER_ID}:${CLUSTER_NODE_ID} APP Config HOME : ${APP_CONFIG_HOME}"
10 #[[ - $APP_CONFIG_HOME/${PRIVATE_CA} ]] && keytool -import -noprompt -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -storepass ${TRUSTSTORE_PASSWD} -alias ${PRIVATE_CA} -file $APP_CONFIG_HOME/${PRIVATE_CA}
11
12 #Instead of above, using cert-initializer truststore to replace the default java cacerts
13 [[ -f $AAF_CREDSPATH/truststoreONAPall.jks ]] && cp $AAF_CREDSPATH/truststoreONAPall.jks $JAVA_HOME/lib/security/cacerts 
14
15 exec java -classpath "/etc:${APP_HOME}/lib/*:/lib/*:/src:/schema:/generated-sources:${APP_CONFIG_HOME}:${APP_HOME}" \
16 -DappName=${APP_NAME} -DappVersion=${BUNDLEVERSION} \
17 -DrouteOffer=${ROUTEOFFER} \
18 -DVERSION_ROUTEOFFER_ENVCONTEXT=${BUNDLEVERSION}/${STICKYSELECTORKEY}/${ENVCONTEXT} \
19 -DSecurityFilePath=/etc \
20 -DREST_NAME_NORMALIZER_PATTERN_FILE=/etc/PatternInputs.txt \
21 -Dms_name=org.onap.ccsdk.cds.blueprintsprocessor \
22 -Dlogging.config=${APP_CONFIG_HOME}/logback.xml \
23 -Djava.security.egd=file:/dev/./urandom \
24 -DAPPNAME=${APP_NAME} -DAPPENV=${APP_ENV} -DAPPVERSION=${APP_VERSION} -DNAMESPACE=${NAMESPACE} \
25 -Dspring.config.location=${APP_CONFIG_HOME}/ \
26 -Dhazelcast.shutdownhook.policy=GRACEFUL \
27 -Dhazelcast.graceful.shutdown.max.wait=600 \
28 org.onap.ccsdk.cds.blueprintsprocessor.BlueprintProcessorApplicationKt