summaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/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-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/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-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes')
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb24
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb58
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb15
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb17
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb14
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb17
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb7
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb14
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_9_prepareProbeFile.rb5
9 files changed, 171 insertions, 0 deletions
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
new file mode 100644
index 0000000000..1de29548f3
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
@@ -0,0 +1,24 @@
+directory "BE_tempdir_creation" do
+ path "#{ENV['JETTY_BASE']}/temp"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+directory "BE_create_config_dir" do
+ path "#{ENV['JETTY_BASE']}/config"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+
+directory "BE_create_catalog-be" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-be"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
new file mode 100644
index 0000000000..fd7e2f8c5f
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
@@ -0,0 +1,58 @@
+replication_factor=1
+
+template "titan.properties" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-be/titan.properties"
+ source "BE-titan.properties.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :CASSANDRA_IP => node['Nodes']['CS'],
+ :CASSANDRA_PWD => node['cassandra'][:cassandra_password],
+ :CASSANDRA_USR => node['cassandra'][:cassandra_user],
+ :rep_factor => replication_factor,
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :titan_connection_timeout => node['cassandra']['titan_connection_timeout']
+ })
+end
+
+
+template "catalog-be-config" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-be/configuration.yaml"
+ source "BE-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],
+ :cassandra_ip => node['Nodes']['CS'],
+ :rep_factor => 1,
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :titan_Path => "/var/lib/jetty/config/catalog-be/",
+ :socket_connect_timeout => node['cassandra']['socket_connect_timeout'],
+ :socket_read_timeout => node['cassandra']['socket_read_timeout'],
+ :cassandra_pwd => node['cassandra'][:cassandra_password],
+ :cassandra_usr => node['cassandra'][:cassandra_user]
+
+ })
+end
+
+
+template "distribution-engine-configuration" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-be/distribution-engine-configuration.yaml"
+ source "BE-distribution-engine-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+end
+
+
+cookbook_file "ArtifactGenerator" do
+ path "#{ENV['JETTY_BASE']}/config/catalog-be/Artifact-Generator.properties"
+ source "Artifact-Generator.properties"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+end
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb
new file mode 100644
index 0000000000..b09ec2610f
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb
@@ -0,0 +1,15 @@
+
+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-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb
new file mode 100644
index 0000000000..ece1066f55
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb
@@ -0,0 +1,17 @@
+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 "ssl-ini" do
+ path "#{ENV['JETTY_BASE']}/start.d/ssl.ini"
+ source "ssl-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables :BE_https_port => "#{node['BE'][:https_port]}"
+end
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb
new file mode 100644
index 0000000000..29715177be
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb
@@ -0,0 +1,14 @@
+clusterName = node['elasticsearch'][:cluster_name]+node.chef_environment
+
+template "elasticsearch.yml-config" do
+ path "#{ENV['JETTY_BASE']}/config/elasticsearch.yml"
+ source "BE-elasticsearch.yml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :cluster_name => "#{clusterName}",
+ :es_host_ip => node['Nodes']['ES']
+ })
+end
+
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb
new file mode 100644
index 0000000000..912ddf7dc0
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb
@@ -0,0 +1,17 @@
+template "template portal.properties" do
+ path "#{ENV['JETTY_BASE']}/resources/portal.properties"
+ source "BE-portal.properties.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables ({
+ :ecomp_rest_url => node['ECompP']['ecomp_rest_url'],
+ :ecomp_redirect_url => node['ECompP']['ecomp_redirect_url'],
+ :ueb_url_list => node['ECompP']['ueb_url_list'],
+ :inbox_name => node['ECompP']['inbox_name'],
+ :app_key => node['ECompP']['app_key'],
+ :app_secret => node['ECompP']['app_secret'],
+ :app_topic_name => node['ECompP']['app_topic_name'],
+ :decrypt_key => node['ECompP']['decryption_key']
+ })
+end
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb
new file mode 100644
index 0000000000..f5bf61725a
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb
@@ -0,0 +1,7 @@
+cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-be/logback.xml" do
+ source "logback.xml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+end
+
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb
new file mode 100644
index 0000000000..49cf3c3d1a
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb
@@ -0,0 +1,14 @@
+cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-be/ecomp-error-configuration.yaml" do
+ source "ecomp-error-configuration.yaml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+end
+
+cookbook_file "#{ENV['JETTY_BASE']}/config/catalog-be/error-configuration.yaml" do
+ source "error-configuration.yaml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+end
+
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_9_prepareProbeFile.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_9_prepareProbeFile.rb
new file mode 100644
index 0000000000..14d08be94c
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_9_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