b06f8a5342b88b0f5f556acc959b1fc85d742533
[sdc.git] / catalog-be / sdc-backend / chef-repo / cookbooks / sdc-catalog-be / recipes / BE_10_setup_cadi.rb
1 jetty_base = "#{ENV['JETTY_BASE']}"
2
3
4 directory "Jetty_etc_dir_creation" do
5         path "#{jetty_base}/etc"
6         owner 'jetty'
7         group 'jetty'
8         mode '0755'
9         action :create
10   not_if { ::File.directory?("#{jetty_base}/etc") }
11 end
12
13
14 cookbook_file "#{jetty_base}/etc/keyfile" do
15    source "keyfile"
16    owner "jetty"
17    group "jetty"
18    mode 0755
19 end
20
21
22 cookbook_file "#{jetty_base}/etc/cadi_truststore.jks" do
23    source "cadi_truststore.jks"
24    owner "jetty"
25    group "jetty"
26    mode 0755
27 end
28
29
30 template "#{jetty_base}/etc/cadi.properties" do
31   path "#{jetty_base}/etc/cadi.properties"
32   source "cadi.properties.erb"
33   owner "jetty"
34   group "jetty"
35   mode "0755"
36 end
37
38
39 #Workaround due to hardcode definition in cata,log-be web.xml file
40 directory "/opt/app/jetty" do
41   path "/opt/app/jetty"
42   owner 'jetty'
43   group 'jetty'
44   mode '0755'
45   recursive true
46   action :create
47 end
48
49 directory "/opt/app/jetty/base/" do
50   path "/opt/app/jetty/base/"
51   owner 'jetty'
52   group 'jetty'
53   mode '0755'
54   recursive true
55   action :create
56 end
57
58
59 directory "/opt/app/jetty/base/be/" do
60   path "/opt/app/jetty/base/be/"
61   owner 'jetty'
62   group 'jetty'
63   mode '0755'
64   recursive true
65   action :create
66 end
67
68 directory "/opt/app/jetty/base/be/etc" do
69   path "/opt/app/jetty/base/be/etc"
70   owner 'jetty'
71   group 'jetty'
72   mode '0755'
73   recursive true
74   action :create
75 end
76
77 #Workaround due to hardcode definition in catalog-be web.xml file
78 template "/opt/app/jetty/base/be/etc/cadi.properties" do
79   path "/opt/app/jetty/base/be/etc/cadi.properties"
80   source "cadi.properties.erb"
81   owner "jetty"
82   group "jetty"
83   mode "0755"
84 end
85