summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes')
-rw-r--r--sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb49
-rw-r--r--sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb13
-rw-r--r--sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb7
-rw-r--r--sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb7
-rw-r--r--sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb7
-rw-r--r--sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_create_jetty_modules.rb45
6 files changed, 128 insertions, 0 deletions
diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb
new file mode 100644
index 0000000000..29301a9418
--- /dev/null
+++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_1_cleanup_jettydir.rb
@@ -0,0 +1,49 @@
+#directory "FE_tempdir_cleanup" do
+# path "/var/lib/jetty/tempdir"
+# recursive true
+# action :delete
+#end
+
+
+directory "FE_tempdir_creation" do
+ path "/var/lib/jetty/temp"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+
+#directory "FE_webapps_cleanup" do
+# path "/var/lib/jetty/webapps"
+# recursive true
+# action :delete
+#end
+
+
+#directory "FE_webapps_creation" do
+# path "/var/lib/jetty/webapps"
+# owner 'jetty'
+# group 'jetty'
+# mode '0755'
+# action :create
+#end
+
+
+directory "FE_create_config_dir" do
+ path "/var/lib/jetty/config"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
+
+directory "FE_create_catalog-fe" do
+ path "/var/lib/jetty/config/catalog-fe"
+ owner 'jetty'
+ group 'jetty'
+ mode '0755'
+ action :create
+end
+
diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
new file mode 100644
index 0000000000..64d71768cd
--- /dev/null
+++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
@@ -0,0 +1,13 @@
+template "catalog-fe-config" do
+ path "/var/lib/jetty/config/catalog-fe/configuration.yaml"
+ source "FE-configuration.yaml.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables({
+ :fe_host_ip => node['HOST_IP'],
+ :be_host_ip => node['HOST_IP'],
+ :catalog_port => node['BE'][:http_port],
+ :ssl_port => node['BE'][:https_port]
+ })
+end
diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb
new file mode 100644
index 0000000000..278c3bb35d
--- /dev/null
+++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_3_errors_config.rb
@@ -0,0 +1,7 @@
+cookbook_file "/var/lib/jetty/config/catalog-fe/ecomp-error-configuration.yaml" do
+ source "FE-ecomp-error-configuration.yaml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+end
+
diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb
new file mode 100644
index 0000000000..674febb47a
--- /dev/null
+++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_4_logback.rb
@@ -0,0 +1,7 @@
+cookbook_file "/var/lib/jetty/config/catalog-fe/logback.xml" do
+ source "FE-logback.xml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+end
+
diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb
new file mode 100644
index 0000000000..710286a8dd
--- /dev/null
+++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_5_rest_configuration.rb
@@ -0,0 +1,7 @@
+cookbook_file "/var/lib/jetty/config/catalog-fe/rest-configuration-info.yaml" do
+ source "FE-rest-configuration.yaml"
+ mode 0755
+ owner "jetty"
+ group "jetty"
+end
+
diff --git a/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_create_jetty_modules.rb b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_create_jetty_modules.rb
new file mode 100644
index 0000000000..2800fd1808
--- /dev/null
+++ b/sdc-os-chef/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_6_create_jetty_modules.rb
@@ -0,0 +1,45 @@
+jetty_base="/var/lib/jetty"
+jetty_home="/usr/local/jetty"
+
+###### create Jetty modules
+bash "create-jetty-modules" do
+cwd "#{jetty_base}"
+code <<-EOH
+ cd "#{jetty_base}"
+ java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
+ java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
+EOH
+not_if "ls /#{jetty_base}/start.d/https.ini"
+end
+
+
+###### configure Jetty modules
+template "FE-http-ini" do
+ path "/#{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 "/#{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 "FE-ssl-ini" do
+ path "/#{jetty_base}/start.d/ssl.ini"
+ source "FE-ssl-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables :FE_https_port => "#{node['FE'][:https_port]}"
+end
+