summaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes
diff options
context:
space:
mode:
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_4_jetty_Modules.rb56
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb19
2 files changed, 56 insertions, 19 deletions
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
index ece1066f55..afd26b3348 100644
--- 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
@@ -1,17 +1,55 @@
+#Set the http module option
+if node['disableHttp']
+ http_option = "#--module=http"
+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 --add-to-startd=http,https,logging,setuid
+ 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 "http-ini" do
+ path "#{ENV['JETTY_BASE']}/start.d/http.ini"
+ source "http-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables ({
+ :http_option => http_option ,
+ :http_port => "#{node['BE'][:http_port]}"
+ })
+
+end
+
+
+template "https-ini" do
+ path "#{ENV['JETTY_BASE']}/start.d/https.ini"
+ source "https-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables :https_port => "#{node['BE'][: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 :BE_https_port => "#{node['BE'][:https_port]}"
+ path "#{ENV['JETTY_BASE']}/start.d/ssl.ini"
+ source "ssl-ini.erb"
+ owner "jetty"
+ group "jetty"
+ mode "0755"
+ variables ({
+ :https_port => "#{node['BE'][:https_port]}" ,
+ :jetty_keystore_pwd => "#{node['jetty'][:keystore_pwd]}" ,
+ :jetty_keymanager_pwd => "#{node['jetty'][:keymanager_pwd]}" ,
+ :jetty_truststore_pwd => "#{node['jetty'][:truststore_pwd]}"
+ })
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
index 29715177be..28f611267c 100644
--- 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
@@ -1,14 +1,13 @@
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']
- })
+ 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
-