diff options
author | Areli, Fuss (af732p) <areli.fuss@intl.att.com> | 2018-10-03 12:49:09 +0300 |
---|---|---|
committer | Areli, Fuss (af732p) <areli.fuss@intl.att.com> | 2018-10-03 12:49:09 +0300 |
commit | de55ab0287f8c373b89f6c2e286bbddc25ff893d (patch) | |
tree | bf6be27800f3b59cd4027b2bcb44af4720e29b25 | |
parent | 1a019f046f4b3ad3b010d1434ba81453b9603625 (diff) |
Set tosca url configuration
Set tosca url configuration
Change-Id: I32b09fbd4ba8005bba5711a21f2c7038c981cc6e
Issue-ID: SDC-1812
Signed-off-by: Areli, Fuss (af732p) <areli.fuss@intl.att.com>
4 files changed, 26 insertions, 16 deletions
diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb index 9d37ab7..19d401e 100644 --- a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/attributes/default.rb @@ -5,15 +5,19 @@ default['APP_LOG_DIR'] = "/opt/logs/be" default['DCAE']['consumerName'] = "dcaeDesigner" default['DCAE']['consumerPass'] = "Aa123456" -default['DCAE']['BE'][:http_port] = 8082 -default['DCAE']['BE'][:https_port] = 8444 +default['DCAE']['BE']['http_port'] = 8082 +default['DCAE']['BE']['https_port'] = 8444 +default['DCAE']['TOSCA_LAB']['http_port'] = 8085 -default['SDC']['BE'][:http_port] = 8080 -default['SDC']['BE'][:https_port] = 8443 +default['SDC']['BE']['http_port'] = 8080 +default['SDC']['BE']['https_port'] = 8443 +default['DCAE']['TOSCA_LAB']['https_port'] = 8085 -default['jetty'][:keystore_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok" -default['jetty'][:keymanager_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok" -default['jetty'][:truststore_pwd] = "OBF:1cp61iuj194s194u194w194y1is31cok" +default['jetty']['keystore_pwd'] = "OBF:1cp61iuj194s194u194w194y1is31cok" +default['jetty']['keymanager_pwd'] = "OBF:1cp61iuj194s194u194w194y1is31cok" +default['jetty']['truststore_pwd'] = "OBF:1cp61iuj194s194u194w194y1is31cok" default['disableHttp'] = true +default['DCAE_TOSCA_LAB_VIP'] = "localhost" + diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb index 645cfa3..dc9dfda 100644 --- a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/recipes/dcae_setup.rb @@ -2,15 +2,19 @@ jetty_base = "#{node['JETTY_BASE']}" dcae_logs = "#{node['APP_LOG_DIR']}" sdc_be_vip = node['BE_VIP'] +dcae_tosca_lab_vip = node['DCAE_TOSCA_LAB_VIP'] + if node['disableHttp'] protocol = "https" - sdc_be_port = node['SDC']['BE'][:https_port] - dcae_be_port = node['DCAE']['BE'][:https_port] + sdc_be_port = node['SDC']['BE']['https_port'] + dcae_be_port = node['DCAE']['BE']['https_port'] + dcae_tosca_lab_port = node['DCAE']['TOSCA_LAB']['https_port'] else protocol = "http" sdc_be_port = node['SDC']['BE'][:http_port] dcae_be_port = node['DCAE']['BE'][:http_port] + dcae_tosca_lab_port = node['DCAE']['TOSCA_LAB']['http_port'] end printf("DEBUG: [%s]:[%s] disableHttp=[%s], protocol=[%s], sdc_be_vip=[%s], sdc_be_port=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], protocol, sdc_be_vip ,sdc_be_port ) @@ -54,6 +58,8 @@ template "dcae-be-config" do :sdc_be_vip => sdc_be_vip, :sdc_be_port => sdc_be_port, :protocol => protocol, + :dcae_tosca_lab_vip => dcae_tosca_lab_vip, + :dcae_tosca_lab_port => dcae_tosca_lab_port }) end diff --git a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb index a2a3201..ecfa0bc 100644 --- a/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb +++ b/docker/docker_be/chef-solo/cookbooks/Deploy-DCAE/templates/default/dcae-application.properties.erb @@ -5,7 +5,7 @@ server.contextPath=/ scheduled.timer.value=5000 asdc_catalog_url=asdc uri=<%= @protocol %>://<%= @consumerAuth %>@<%= @sdc_be_vip %>:<%= @sdc_be_port %>#demo -toscalab.url=http://localhost:8085 +toscalab.url=http://<%= @dcae_tosca_lab_vip %>:<%= @dcae_tosca_lab_port %> blueprinter.uri=${toscalab.url}/translate blueprinter.hcuri=${toscalab.url}/healthcheck blueprinter.hcretrynum=3 diff --git a/docker/scripts/docker_run.sh b/docker/scripts/docker_run.sh index eef744a..4c3edc0 100755 --- a/docker/scripts/docker_run.sh +++ b/docker/scripts/docker_run.sh @@ -111,7 +111,7 @@ function probe_docker { # function probe_dcae_tosca { - health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' "http://${IP}:8085/healthcheck") + health_check_http_code=$(curl --noproxy "*" -i -o /dev/null -w '%{http_code}' "http://${IP}:8085/healthcheck") if [[ "${health_check_http_code}" -eq 200 ]] ; then echo "DOCKER start finished in $1 seconds" return ${SUCCESS} @@ -121,7 +121,7 @@ function probe_dcae_tosca { # function probe_dcae_be { - health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' "http://${IP}:8082/dcae/conf/composition") + health_check_http_code=$(curl --noproxy "*" -i -o /dev/null -w '%{http_code}' "http://${IP}:8082/dcae/conf/composition") if [[ "${health_check_http_code}" -eq 200 ]] ; then echo "DOCKER start finished in $1 seconds" return ${SUCCESS} @@ -131,7 +131,7 @@ function probe_dcae_be { # function probe_dcae_fe { - health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' "http://${IP}:8183/dcaed/healthCheck") + health_check_http_code=$(curl --noproxy "*" -i -o /dev/null -w '%{http_code}' "http://${IP}:8183/dcaed/healthCheck") if [[ "${health_check_http_code}" -eq 200 ]] ; then echo "DOCKER start finished in $1 seconds" return ${SUCCESS} @@ -141,7 +141,7 @@ function probe_dcae_fe { # function probe_dcae_dt { - health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' "http://${IP}:8186/dcae/healthCheckOld") + health_check_http_code=$(curl --noproxy "*" -i -o /dev/null -w '%{http_code}' "http://${IP}:8186/dcae/healthCheckOld") if [[ "${health_check_http_code}" -eq 200 ]] ; then echo "DOCKER start finished in $1 seconds" return ${SUCCESS} @@ -152,7 +152,7 @@ function probe_dcae_dt { # Not applicable for current release. Return Success in any case function probe_dcae_tools { - health_check_http_code=$(curl -i -o /dev/null -w '%{http_code}' "http://${IP}:8082/dcae/getResourcesByMonitoringTemplateCategory") + health_check_http_code=$(curl --noproxy "*" -i -o /dev/null -w '%{http_code}' "http://${IP}:8082/dcae/getResourcesByMonitoringTemplateCategory") if [[ "${health_check_http_code}" -eq 200 ]] ; then echo "DOCKER start finished in $1 seconds" return ${SUCCESS} @@ -254,7 +254,7 @@ function dcae-tosca { if [ ${LOCAL} == false ]; then docker pull "${PREFIX}/${DOCKER_NAME}:${RELEASE}" fi - docker run ${DOCKER_RUN_MODE_FG} --name ${DOCKER_NAME} --env HOST_IP="${IP}" --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${DCAE_TOSCA_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume "${WORKSPACE}/data/logs/DCAE-TOSCA/:/var/lib/jetty/logs" --publish 8085:8085 "${PREFIX}/${DOCKER_NAME}:${RELEASE}" + docker run ${DOCKER_RUN_MODE_FG} --name ${DOCKER_NAME} --env HOST_IP="${IP}" --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${DCAE_TOSCA_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume "${WORKSPACE}/data/logs/DCAE-TOSCA/:/var/logs/dcae" --publish 8085:8085 "${PREFIX}/${DOCKER_NAME}:${RELEASE}" command_exit_status $? ${DOCKER_NAME} echo "please wait while ${DOCKER_NAME^^} is starting....." monitor_docker ${DOCKER_NAME} |