aboutsummaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts
diff options
context:
space:
mode:
authork.kedron <k.kedron@partner.samsung.com>2019-08-28 15:01:51 +0200
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-08-30 07:26:02 +0000
commit3643cc5c5876f8ae43e89e9f437d4e9a4287f2fc (patch)
tree9ef0ab20a8fc9459612fc922d20bad7ef8592a36 /sdc-os-chef/scripts
parent68830a739232e31feadc5b10c1e537197d86269f (diff)
Use https request in the dcoker_run
-Update the docker_run script to use https connection for healthCheck request. -Removing the onap/sdc-simulator each time when docker is running up to prevent error with restarting host -Checkstyle for script Issue-ID: SDC-2546 Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com> Change-Id: I66fbb67bbcd3e200c61a5ec67f15f5f5dad5bc8c
Diffstat (limited to 'sdc-os-chef/scripts')
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh52
1 files changed, 26 insertions, 26 deletions
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index c3e177adfe..959c1cca21 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -59,7 +59,7 @@ function cleanup {
echo "Performing old dockers cleanup"
if [ "$1" == "all" ] ; then
- docker_ids=`docker ps -a | egrep -v "onap/sdc-simulator" | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit}|dcae" | awk '{print $1}'`
+ docker_ids=`docker ps -a | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit}|dcae" | awk '{print $1}'`
for X in ${docker_ids}
do
docker rm -f ${X}
@@ -213,7 +213,7 @@ function monitor_docker {
esac
- if [ ${status} == ${SUCCESS} ] ; then
+ if [[ ${status} == ${SUCCESS} ]] ; then
break;
fi
@@ -230,22 +230,22 @@ function monitor_docker {
}
#
-
+# healthCheck script used the secure connection to send request (https is always turn on)
function healthCheck {
curl --noproxy "*" ${IP}:9200/_cluster/health?pretty=true
echo "BE Health Check:"
- curl --noproxy "*" http://${IP}:8080/sdc2/rest/healthCheck
+ curl -k --noproxy "*" https://${IP}:8443/sdc2/rest/healthCheck
echo ""
echo ""
echo "FE Health Check:"
- curl --noproxy "*" http://${IP}:8181/sdc1/rest/healthCheck
+ curl -k --noproxy "*" https://${IP}:9443/sdc1/rest/healthCheck
echo ""
echo ""
- healthCheck_http_code=$(curl --noproxy "*" -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user/demo;)
+ healthCheck_http_code=$(curl -k --noproxy "*" -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" https://${IP}:8443/sdc2/rest/v1/user/demo;)
if [[ ${healthCheck_http_code} != 200 ]]; then
echo "Error [${healthCheck_http_code}] while checking existence of user"
return ${healthCheck_http_code}
@@ -610,25 +610,25 @@ fi
echo ""
if [ -z "${DOCKER}" ]; then
- cleanup all
- dir_perms
- sdc-es
- sdc-init-es
- sdc-cs
- sdc-cs-init
-# sdc-kbn
- sdc-cs-onboard-init
- sdc-onboard-BE
- sdc-BE
- sdc-BE-init
- sdc-FE
- healthCheck
- sdc-sim
- sdc-api-tests
- sdc-ui-tests
+ cleanup all
+ dir_perms
+ sdc-es
+ sdc-init-es
+ sdc-cs
+ sdc-cs-init
+# sdc-kbn
+ sdc-cs-onboard-init
+ sdc-onboard-BE
+ sdc-BE
+ sdc-BE-init
+ sdc-FE
+ healthCheck
+ sdc-sim
+ sdc-api-tests
+ sdc-ui-tests
else
- cleanup ${DOCKER}
- dir_perms
- ${DOCKER}
- healthCheck
+ cleanup ${DOCKER}
+ dir_perms
+ ${DOCKER}
+ healthCheck
fi