summaryrefslogtreecommitdiffstats
path: root/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-09-21 22:13:05 +0200
committerMichael Morris <michael.morris@est.tech>2021-05-12 10:27:10 +0000
commitdf353be353e1ec25ac2a0e64a9eb617dcbc87703 (patch)
treee79c636bc4f67bdd8392b24c85f2f6cb26e3c67a /openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend
parent936781153118364e60662529dbd7217416a26148 (diff)
Use integration-java11 Dockerfile
Use onap/integration-java11:7.1.0 as a source for the images requiring JDK 11 in SDC Issue-ID: SDC-3298 Change-Id: Ifee3d2942dcb9c078f2ebb686bdabc0ecca857b3 Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend')
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb1
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb12
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb12
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb4
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb25
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb12
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_6_prepareProbeFile.rb2
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb13
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb2
-rw-r--r--openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb4
10 files changed, 41 insertions, 46 deletions
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb
index 761edc9e5b..074584a6e8 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/attributes/default.rb
@@ -8,6 +8,7 @@ default['cassandra'][:truststore_password] = "Aa123456"
default['jetty'][:keystore_pwd] = "?(kP!Yur![*!Y5!E^f(ZKc31"
default['jetty'][:keymanager_pwd] = "?(kP!Yur![*!Y5!E^f(ZKc31"
default['jetty'][:truststore_pwd] = "z+KEj;t+,KN^iimSiS89e#p0"
+default['jetty']['truststore_path'] = "#{ENV['JETTY_BASE']}/etc/truststore"
default['VnfRepo']['vnfRepoPort'] = 8702
default['VnfRepo']['vnfRepoHost'] = "refrepo"
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb
index 2c703f2039..305ff2384b 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_1_cleanup_jettydir.rb
@@ -1,23 +1,23 @@
directory "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 "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
directory "onboarding-be" do
path "#{ENV['JETTY_BASE']}/config/onboarding-be"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb
index e482b693e7..1a678397d8 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_2_locate_keystore.rb
@@ -1,22 +1,22 @@
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/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb
index 823c3cd44e..0d97645420 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_3_logback.rb
@@ -1,7 +1,7 @@
cookbook_file "#{ENV['JETTY_BASE']}/config/onboarding-be/logback.xml" do
source "logback.xml"
mode 0755
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
end
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb
index 64a02e9559..9fe747851e 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb
@@ -5,22 +5,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['ONBOARDING_BE'][: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['ONBOARDING_BE'][:https_port]}" ,
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb
index d767ddd1c8..e7048427c7 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_5_setup_configuration.rb
@@ -1,8 +1,8 @@
template "onboard-be-config" do
path "#{ENV['JETTY_BASE']}/config/onboarding-be/onboarding_configuration.yaml"
source "configuration.yaml.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:onboard_ip => node['ONBOARDING_BE_VIP'],
@@ -32,8 +32,8 @@ end
template "VnfrepoConfiguration" do
path "#{ENV['JETTY_BASE']}/config/onboarding-be/config-vnfrepo.yaml"
source "vnfrepo-configuration.yaml.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:VNFREPO_IP => node['VnfRepo']['vnfRepoHost'],
@@ -46,8 +46,8 @@ end
template "ExternalTestingConfiguration" do
path "#{ENV['JETTY_BASE']}/config/onboarding-be/externaltesting-configuration.yaml"
source "externaltesting-configuration.yaml.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:EP1_CONFIG => node['EXTTEST']['ep1_config'],
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 8d77d61481..6351be35b2 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
@@ -6,7 +6,7 @@ else
port = "#{node['ONBOARDING_BE'][: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/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb
index c84e660534..2660eb0e6d 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_7_setup_base_template.rb
@@ -1,14 +1,13 @@
cookbook_file "#{ENV['JETTY_BASE']}/resources/base_template.yaml" do
source "base_template.yaml"
mode 0644
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
end
-
+
cookbook_file "#{ENV['JETTY_BASE']}/resources/base_template.env" do
source "base_template.env"
mode 0644
- owner "jetty"
- group "jetty"
-end
-
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
+end \ No newline at end of file
diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb
index a7b0411e9e..853fcf7ab6 100644
--- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb
+++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/configuration.yaml.erb
@@ -28,7 +28,7 @@ cassandraConfig:
username: <%= @cassandra_usr %>
password: <%= @cassandra_pwd %>
ssl: <%= @cassandra_ssl_enabled %>
- truststorePath: /var/lib/jetty/etc/truststore
+ truststorePath: <%= node['jetty']['truststore_path'] %>
truststorePassword: <%= @cassandra_truststore_password %>
# access restriction
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 bea3c34488..4ca281cee3 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,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "Accept: application/json" "<%= @protocol %>://127.0.0.1:<%= @port %>/onboarding-api/v1.0/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"