summaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks
diff options
context:
space:
mode:
Diffstat (limited to 'utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks')
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb12
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb4
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb4
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb12
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb36
5 files changed, 30 insertions, 38 deletions
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb
index c02aa7e58d..a1156ee742 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_1_cleanup_jettydir.rb
@@ -1,7 +1,7 @@
directory "SDC_Simulator_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
@@ -9,8 +9,8 @@ end
directory "SDC_Simulator_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
@@ -18,8 +18,8 @@ end
directory "SDC_Simulator_create_sdc-simulator" do
path "#{ENV['JETTY_BASE']}/config/sdc-simulator"
- owner 'jetty'
- group 'jetty'
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode '0755'
action :create
end
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb
index bf859f13a3..3769a1f723 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_2_setup_configuration.rb
@@ -10,8 +10,8 @@ end
template "webseal.conf" do
path "#{ENV['JETTY_BASE']}/config/sdc-simulator/webseal.conf"
source "SDC-Simulator-webseal.conf.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:fe_url =>"#{fe_url}"
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb
index 14f83c34de..3abca7b8a8 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb
@@ -1,7 +1,7 @@
cookbook_file "log4j2.properties" do
path "#{ENV['JETTY_BASE']}/config/sdc-simulator/log4j2.properties"
source "log4j2.properties"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
end \ No newline at end of file
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb
index e0b106de72..4c83e790ae 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_locate_keystore.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_4_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.trust.jks" do
source "org.onap.sdc.trust.jks"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode 0755
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
diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb
index 5b67561b02..5e0d8eb50a 100644
--- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_create_jetty_modules.rb
+++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_5_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 "SDC-Simulator-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 "SDC-Simulator-https-ini.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:https_port => "8443"
@@ -46,8 +41,8 @@ end
template "ssl-ini" do
path "#{ENV['JETTY_BASE']}/start.d/ssl.ini"
source "SDC-Simulator-ssl-ini.erb"
- owner "jetty"
- group "jetty"
+ owner "#{ENV['JETTY_USER']}"
+ group "#{ENV['JETTY_GROUP']}"
mode "0755"
variables({
:https_port => "8443",
@@ -57,10 +52,7 @@ template "ssl-ini" do
})
end
-
-bash "echo status" do
- code <<-EOH
- echo "DOCKER STARTED"
- EOH
-end
-
+execute "echo status" do
+ command "echo 'DOCKER STARTED'"
+ action :run
+end \ No newline at end of file