New docker start monitor engine
[sdc.git] / sdc-os-chef / sdc-frontend / chef-repo / cookbooks / sdc-catalog-fe / recipes / FE_7_create_jetty_modules.rb
1 jetty_base="/var/lib/jetty"
2 jetty_home="/usr/local/jetty"
3
4 ###### create Jetty modules
5 bash "create-jetty-modules" do
6 cwd "#{jetty_base}"
7 code <<-EOH
8    cd "#{jetty_base}"
9    java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
10    java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
11 EOH
12 not_if "ls /#{jetty_base}/start.d/https.ini"
13 end
14
15
16 ###### configure Jetty modules
17 template "FE-http-ini" do
18    path "/#{jetty_base}/start.d/http.ini"
19    source "FE-http-ini.erb"
20    owner "jetty"
21    group "jetty"
22    mode "0755"
23    variables :FE_http_port => "#{node['FE'][:http_port]}"
24 end
25
26
27 template "FE-https-ini" do
28    path "/#{jetty_base}/start.d/https.ini"
29    source "FE-https-ini.erb"
30    owner "jetty"
31    group "jetty"
32    mode "0755"
33    variables :FE_https_port => "#{node['FE'][:https_port]}"
34 end
35
36
37 template "ssl-ini" do
38    path "/#{jetty_base}/start.d/ssl.ini"
39    source "ssl-ini.erb"
40    owner "jetty"
41    group "jetty"
42    mode "0755"
43    variables :https_port => "#{node['FE'][:https_port]}"
44 end
45
46 bash "echo status" do
47    code <<-EOH
48      echo "###### DOCKER STARTED #####"
49    EOH
50 end
51