diff options
Diffstat (limited to 'openecomp-be')
2 files changed, 13 insertions, 8 deletions
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb index edc8f9eebf..c8102e43ee 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb @@ -1,9 +1,17 @@ +if node[:disableHttp] + protocol = "https" + port = "#{node['ONBOARDING_BE'][:https_port]}" +else + protocol = "http" + port = "#{node['ONBOARDING_BE'][:http_port]}" +end + template "/var/lib/ready-probe.sh" do source "ready-probe.sh.erb" sensitive true mode 0755 variables({ - :onboard_port => "#{node['ONBOARDING_BE'][:http_port]}", - :ssl_port => "#{node['ONBOARDING_BE'][:https_port]}" - }) + :protocol => protocol, + :port => port + }) end diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb index 60148e0d16..bad5f878dd 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb @@ -1,9 +1,6 @@ #!/bin/bash -<% if node[:disableHttp] -%> -health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "USER_ID: cs0008" --header "Accept: application/json" "https://127.0.0.1:<%= @ssl_port %>/onboarding-api/v1.0/healthcheck") -<% else %> -health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "USER_ID: cs0008" --header "Accept: application/json" "http://127.0.0.1:<%= @onboard_port %>/onboarding-api/v1.0/healthcheck") -<% end -%> +health_Check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' <%= @protocol %>://127.0.0.1:<%= @port %>/sdc1/rest/healthCheck) + if [[ "$health_Check_http_code" -eq 200 ]]; then exit 0 else |