diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2020-01-13 20:50:28 +0000 |
---|---|---|
committer | Vijay Venkatesh Kumar <vv770d@att.com> | 2020-01-15 14:14:18 +0000 |
commit | 2cabee9fd1443514279d76390ef439d8cdad5e6f (patch) | |
tree | 8a63b31cdd205ff7cebff1102ef61f2363f9660f /tca-cdap-container | |
parent | 4ccfa6d878b3de432514f20a954d67573ec549be (diff) |
remove consul lookup for cbs1.2.2
Change-Id: I3bc1aeac314bd0bbd6679182917c3c2c0176d498
Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
Issue-ID: DCAEGEN2-2021
Diffstat (limited to 'tca-cdap-container')
-rw-r--r-- | tca-cdap-container/pom.xml | 4 | ||||
-rwxr-xr-x | tca-cdap-container/restart.sh | 33 |
2 files changed, 20 insertions, 17 deletions
diff --git a/tca-cdap-container/pom.xml b/tca-cdap-container/pom.xml index c43503c..b8f20c6 100644 --- a/tca-cdap-container/pom.xml +++ b/tca-cdap-container/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- ================================================================================ -Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. +Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ limitations under the License. <groupId>org.onap.dcaegen2.deployments</groupId> <artifactId>tca-cdap-container</artifactId> <name>dcaegen2-deployments-tca-cdap-container</name> - <version>1.2.1-SNAPSHOT</version> + <version>1.2.2-SNAPSHOT</version> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> diff --git a/tca-cdap-container/restart.sh b/tca-cdap-container/restart.sh index c61c300..e062d7d 100755 --- a/tca-cdap-container/restart.sh +++ b/tca-cdap-container/restart.sh @@ -1,6 +1,6 @@ #!/bin/bash # ================================================================================ -# Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,15 @@ MR_WATCHDOG_PATH="${TCA_FILE_PATH}/mr-watchdog.sh" WORKER_COUNT='0' -CONSUL_HOST=${CONSUL_HOST:-consul} -CONSUL_PORT=${CONSUL_PORT:-8500} -CONFIG_BINDING_SERVICE=${CONFIG_BINDING_SERVICE:-config_binding_service} +# Remove consul dependency for CBS lookup (DCAEGEN2-2021) +# CBS Host and port are set to CBS K8S service name and port identified on CBS deployment via Helm +CBS_HOST=${CBS_HOST:-config-binding-service} +CBS_PORT=${CBS_PORT:-10000} -CBS_SERVICE_NAME=${CONFIG_BINDING_SERVICE} +#CONSUL_HOST=${CONSUL_HOST:-consul} +#CONSUL_PORT=${CONSUL_PORT:-8500} +#CONFIG_BINDING_SERVICE=${CONFIG_BINDING_SERVICE:-config_binding_service} +CBS_SERVICE_NAME=${CBS_SERVICE_NAME:-config_binding_service} #Changing to HOSTNAME parameter for consistency with k8s deploy MY_NAME=${HOSTNAME:-tca} @@ -317,9 +321,7 @@ echo "TCA-CDAP standalone mode initialization completed, with $WORKER_COUNT / 3 #Changing to HOSTNAME parameter for consistency with k8s deploy MY_NAME=${HOSTNAME:-tca} -unset CBS_HOST -unset CBS_PORT -echo "TCA environment: I am ${MY_NAME}, consul at ${CONSUL_HOST}:${CONSUL_PORT}, CBS service name ${CBS_SERVICE_NAME}" +echo "TCA environment: I am ${MY_NAME}, CBS K8S Service Name and port is ${CBS_HOST}:${CBS_PORT}" while echo do @@ -335,13 +337,14 @@ do done - if [[ -z "$CBS_HOST" || -z "$CBS_PORT" ]]; then - echo "Retrieving host and port for ${CBS_SERVICE_NAME} from ${CONSUL_HOST}:${CONSUL_PORT}" - sleep 2 - CBS_HOST=$(curl -s "${CONSUL_HOST}:${CONSUL_PORT}/v1/catalog/service/${CBS_SERVICE_NAME}" |jq .[0].ServiceAddress |sed -e 's/\"//g') - CBS_PORT=$(curl -s "${CONSUL_HOST}:${CONSUL_PORT}/v1/catalog/service/${CBS_SERVICE_NAME}" |jq .[0].ServicePort |sed -e 's/\"//g') - echo "CBS discovered to be at ${CBS_HOST}:${CBS_PORT}" - fi +#Below commented to remove consul lookup and use k8s servicename for CBS (DCAEGEN2-2021) +# if [[ -z "$CBS_HOST" || -z "$CBS_PORT" ]]; then +# echo "Retrieving host and port for ${CBS_SERVICE_NAME} from ${CONSUL_HOST}:${CONSUL_PORT}" +# sleep 2 +# CBS_HOST=$(curl -s "${CONSUL_HOST}:${CONSUL_PORT}/v1/catalog/service/${CBS_SERVICE_NAME}" |jq .[0].ServiceAddress |sed -e 's/\"//g') +# CBS_PORT=$(curl -s "${CONSUL_HOST}:${CONSUL_PORT}/v1/catalog/service/${CBS_SERVICE_NAME}" |jq .[0].ServicePort |sed -e 's/\"//g') +# echo "CBS discovered to be at ${CBS_HOST}:${CBS_PORT}" +# fi if [ ! -z "$CBS_HOST" ] && [ ! -z "$CBS_PORT" ]; then tca_poll_policy |