Fully HTTPS support in the catalog-be
[sdc.git] / catalog-be / sdc-backend-init / chef-repo / cookbooks / sdc-catalog-be-setup / recipes / 2_check_Backend.rb
1 if node['disableHttp']
2   protocol = "https"
3   be_port = node['BE']['https_port']
4 else
5   protocol = "http"
6   be_port = node['BE']['http_port']
7 end
8
9 template "/var/tmp/check_Backend_Health.py" do
10     source "check_Backend_Health.py.erb"
11     sensitive true
12     mode 0755
13     variables({
14       :protocol => protocol,
15       :be_ip => node['Nodes']['BE'],
16       :be_port => be_port
17     })
18 end
19
20 bash "executing-check_Backend_Health" do
21    code <<-EOH
22      python /var/tmp/check_Backend_Health.py
23      rc=$?
24      if [[ $rc != 0 ]]; then exit $rc; fi
25    EOH
26 end