summaryrefslogtreecommitdiffstats
path: root/catalog-fe/sdc-frontend/chef-repo
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-fe/sdc-frontend/chef-repo')
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb16
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb12
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb4
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb4
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb4
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb12
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb25
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb2
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb4
9 files changed, 39 insertions, 44 deletions
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb
index 0dd305ac42..cdd6b19b24 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb
@@ -1,15 +1,15 @@
directory "FE_tempdir_creation" do
path "#{ENV['JETTY_BASE']}/temp"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
directory "FE_create_config_dir" do
path "#{ENV['JETTY_BASE']}/config"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
@@ -17,8 +17,8 @@ end
directory "FE_create_catalog-fe" do
path "#{ENV['JETTY_BASE']}/config/catalog-fe"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
@@ -26,8 +26,8 @@ end
directory "FE_create_catalog-fe" do
path "#{ENV['JETTY_BASE']}/config/onboarding-fe"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
index 640b5b8d77..819638ac08 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
@@ -1,8 +1,8 @@
template "catalog-fe-config" do
path "#{ENV['JETTY_BASE']}/config/catalog-fe/configuration.yaml"
source "FE-configuration.yaml.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:fe_host_ip => node['FE_VIP'],
@@ -20,8 +20,8 @@ end
cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-fe/workspace-configuration.yaml" do
source "FE-workspace-configuration.yaml"
mode 0755
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
end
@@ -29,7 +29,7 @@ end
template "onboarding-fe-config" do
path "#{ENV['JETTY_BASE']}/config/onboarding-fe/onboarding_configuration.yaml"
source "FE-onboarding-configuration.yaml.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
end
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb
index 54dee2ef26..aa8087960b 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb
@@ -1,7 +1,7 @@
cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-fe/ecomp-error-configuration.yaml" do
source "FE-ecomp-error-configuration.yaml"
mode 0755
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
end
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb
index f26418372b..34c084e38d 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb
@@ -1,6 +1,6 @@
cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-fe/logback.xml" do
source "FE-logback.xml"
mode 0755
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
end
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb
index cf7575c546..388974e111 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb
@@ -1,7 +1,7 @@
cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-fe/rest-configuration-info.yaml" do
source "FE-rest-configuration.yaml"
mode 0755
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
end
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb
index 527713c768..50cb2639e8 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb
@@ -1,21 +1,21 @@
directory "Jetty_etcdir_creation" do
path "#{ENV['JETTY_BASE']}/etc"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.p12" do
source "org.onap.sdc.p12"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode 0755
end
cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.trust.jks" do
source "org.onap.sdc.trust.jks"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode 0755
end
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
index bf756fb1c6..0a1527f05e 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
@@ -6,22 +6,17 @@ else
http_option = "--module=http"
end
-
-bash "create-jetty-modules" do
-cwd "#{ENV['JETTY_BASE']}"
-code <<-EOH
- cd "#{ENV['JETTY_BASE']}"
- java -jar "#{ENV['JETTY_HOME']}"/start.jar --add-to-start=deploy
- java -jar "#{ENV['JETTY_HOME']}"/start.jar --create-startd --add-to-start=http,https,console-capture,setuid
-EOH
+execute "create-jetty-modules" do
+ command "java -jar #{ENV['JETTY_HOME']}/start.jar --add-to-start=deploy && java -jar #{ENV['JETTY_HOME']}/start.jar --create-startd --add-to-start=http,https,console-capture,setuid"
+ cwd "#{ENV['JETTY_BASE']}"
+ action :run
end
-
template "http-ini" do
path "#{ENV['JETTY_BASE']}/start.d/http.ini"
source "http-ini.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:http_option => http_option ,
@@ -33,8 +28,8 @@ end
template "https-ini" do
path "#{ENV['JETTY_BASE']}/start.d/https.ini"
source "https-ini.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables :https_port => "#{node['FE'][:https_port]}"
end
@@ -43,8 +38,8 @@ end
template "ssl-ini" do
path "#{ENV['JETTY_BASE']}/start.d/ssl.ini"
source "ssl-ini.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:https_port => "#{node['FE'][:https_port]}" ,
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb
index 2ce61b9c09..46bc80a021 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb
@@ -6,7 +6,7 @@ else
port = "#{node['FE'][:http_port]}"
end
-template "/var/lib/jetty/ready-probe.sh" do
+template "#{ENV['JETTY_BASE']}/ready-probe.sh" do
source "ready-probe.sh.erb"
sensitive true
mode 0755
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb
index 5b772ecb15..eb69f2e8c0 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb
@@ -1,7 +1,7 @@
-#!/bin/bash
+#!/bin/sh
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
+if [ "$health_check_http_code" -eq 200 ]; then
exit 0
else
echo "Health check http status: $health_check_http_code"