aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2018-02-15 12:04:46 +0200
committerYuli Shlosberg <ys9693@att.com>2018-02-21 17:28:40 +0200
commit958c32d2d7a3e5cbd9bc672645cdeb95a49b719a (patch)
tree1ba5b0d1dbece6daa5618a005d6281bbd5c7c1dc /catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes
parent4cc47ac3abe00eda7c04b9955e56dafc819e2657 (diff)
OOM Alignment BE,FE,KBN
Change-Id: I8ff609a6be919d5709ce95af5a6a903aeb7afc43 Issue-ID: SDC-918 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes')
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb33
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb42
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb7
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb7
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb7
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb14
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb41
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb5
8 files changed, 156 insertions, 0 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
new file mode 100644
index 0000000000..7449518f87
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb
@@ -0,0 +1,33 @@
+directory "FE_tempdir_creation" do
+ path "#{ENV['JETTY_BASE']}/temp"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+directory "FE_create_config_dir" do
+ path "#{ENV['JETTY_BASE']}/config"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+
+directory "FE_create_catalog-fe" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-fe"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+
+directory "FE_create_catalog-fe" do
+ path "#{ENV['JETTY_BASE']}/config/onboarding-fe"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end \ No newline at end of file
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
new file mode 100644
index 0000000000..abefd28588
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
@@ -0,0 +1,42 @@
+template "catalog-fe-config" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-fe/configuration.yaml"
+ source "FE-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :fe_host_ip => node['Nodes']['FE'],
+ :be_host_ip => node['Nodes']['BE'],
+ :kb_host_ip => node['Nodes']['KB'],
+ :catalog_port => node['BE'][:http_port],
+ :ssl_port => node['BE'][:https_port]
+ })
+end
+
+template "plugins-fe-config" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-fe/plugins-configuration.yaml"
+ source "FE-plugins-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :dcae_discovery_url => node['Plugins']['DCAE']['dcae_discovery_url'],
+ :dcae_source_url => node['Plugins']['DCAE']['dcae_source_url'],
+ :workflow_discovery_url => node['Plugins']['WORKFLOW']['workflow_discovery_url'],
+ :workflow_source_url => node['Plugins']['WORKFLOW']['workflow_source_url']
+ })
+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"
+ mode "0755"
+ variables({
+ :catalog_ip => node['Nodes']['BE'],
+ :catalog_port => node['BE'][:http_port],
+ :ssl_port => node['BE'][:https_port]
+})
+end \ No newline at end of file
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
new file mode 100644
index 0000000000..54dee2ef26
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb
@@ -0,0 +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"
+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
new file mode 100644
index 0000000000..67c511408c
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb
@@ -0,0 +1,7 @@
+cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-fe/logback.xml" do
+ source "FE-logback.xml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+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
new file mode 100644
index 0000000000..cf7575c546
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb
@@ -0,0 +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"
+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
new file mode 100644
index 0000000000..12af1fff21
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_locate_keystore.rb
@@ -0,0 +1,14 @@
+directory "Jetty_etcdir_creation" do
+ path "#{ENV['JETTY_BASE']}/etc"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+cookbook_file "#{ENV['JETTY_BASE']}/etc/keystore" do
+ source "keystore"
+ owner "jetty"
+ group "jetty"
+ 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
new file mode 100644
index 0000000000..32b121eefd
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
@@ -0,0 +1,41 @@
+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 --add-to-startd=http,https,logging,setuid
+EOH
+end
+
+
+
+template "FE-http-ini" do
+ path "#{ENV['JETTY_BASE']}/start.d/http.ini"
+ source "FE-http-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables :FE_http_port => "#{node['FE'][:http_port]}"
+end
+
+
+template "FE-https-ini" do
+ path "#{ENV['JETTY_BASE']}/start.d/https.ini"
+ source "FE-https-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables :FE_https_port => "#{node['FE'][:https_port]}"
+end
+
+
+template "ssl-ini" do
+ path "#{ENV['JETTY_BASE']}/start.d/ssl.ini"
+ source "ssl-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables :https_port => "#{node['FE'][:https_port]}"
+end
+
+
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
new file mode 100644
index 0000000000..14d08be94c
--- /dev/null
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_8_prepareProbeFile.rb
@@ -0,0 +1,5 @@
+template "/var/lib/ready-probe.sh" do
+ source "ready-probe.sh.erb"
+ sensitive true
+ mode 0755
+end \ No newline at end of file