Remove jboss-rmi
[sdc.git] / catalog-be / src / main / docker / backend / chef-repo / cookbooks / sdc-catalog-be / recipes / BE_4_jetty_Modules.rb
1 #Set the http module option
2 if node['disableHttp']
3   http_option = "#--module=http"
4 else
5   http_option = "--module=http"
6 end
7
8
9 bash "create-jetty-modules" do
10 cwd "#{ENV['JETTY_BASE']}"
11 code <<-EOH
12   cd "#{ENV['JETTY_BASE']}"
13   java -jar "#{ENV['JETTY_HOME']}"/start.jar --add-to-start=deploy
14   java -jar "#{ENV['JETTY_HOME']}"/start.jar --create-startd --add-to-start=http,https,console-capture,setuid
15 EOH
16 end
17
18
19 template "http-ini" do
20   path "#{ENV['JETTY_BASE']}/start.d/http.ini"
21   source "http-ini.erb"
22   owner "jetty"
23   group "jetty"
24   mode "0755"
25   variables ({
26     :http_option => http_option ,
27     :http_port => "#{node['BE'][:http_port]}"
28   })
29    
30 end
31
32
33 template "https-ini" do
34   path "#{ENV['JETTY_BASE']}/start.d/https.ini"
35   source "https-ini.erb"
36   owner "jetty"
37   group "jetty"
38   mode "0755"
39   variables :https_port => "#{node['BE'][:https_port]}"
40 end
41
42
43 template "ssl-ini" do
44   path "#{ENV['JETTY_BASE']}/start.d/ssl.ini"
45   source "ssl-ini.erb"
46   owner "jetty"
47   group "jetty"
48   mode "0755"
49   variables ({
50     :https_port => "#{node['BE'][:https_port]}" ,
51     :jetty_keystore_pwd => "#{node['jetty'][:keystore_pwd]}" ,
52     :jetty_keymanager_pwd => "#{node['jetty'][:keymanager_pwd]}" ,
53     :jetty_truststore_pwd => "#{node['jetty'][:truststore_pwd]}"
54   })
55 end