diff options
author | 2018-08-07 14:15:05 +0300 | |
---|---|---|
committer | 2018-08-07 14:15:05 +0300 | |
commit | b9708a7c3cfaf5767992a2b15180e7b85c459242 (patch) | |
tree | 076e19ea52232232e9060a9d7e074947a4a49508 /docker/chef-solo/cookbooks/dcae-dt/recipes/dcae_dt_setup.rb | |
parent | cc32bd38d72e5c1c92048657083952d3e45c1819 (diff) |
adding the dcae dt code
Adding DCAE-dt code
Change-Id: Id6b779db9d24e10825fb97ad5fd46f41e65e6738
Issue-ID: SDC-1614
Signed-off-by: Eran (ev672n), Vosk <ev672n@att.com>
Diffstat (limited to 'docker/chef-solo/cookbooks/dcae-dt/recipes/dcae_dt_setup.rb')
-rw-r--r-- | docker/chef-solo/cookbooks/dcae-dt/recipes/dcae_dt_setup.rb | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/docker/chef-solo/cookbooks/dcae-dt/recipes/dcae_dt_setup.rb b/docker/chef-solo/cookbooks/dcae-dt/recipes/dcae_dt_setup.rb new file mode 100644 index 0000000..240ea10 --- /dev/null +++ b/docker/chef-solo/cookbooks/dcae-dt/recipes/dcae_dt_setup.rb @@ -0,0 +1,69 @@ +jetty_base = "#{node['JETTY_BASE']}" +dcae_logs = "#{node['APP_LOG_DIR']}" + +dcae_fe_vip = node['DCAE_FE_VIP'] + +if node['disableHttp'] + protocol = "https" + dcae_be_port = node['DCAE']['BE'][:https_port] + dcae_fe_port = node['DCAE']['FE'][:https_port] + dcae_dt_port = node['DCAE']['DT'][:https_port] +else + protocol = "http" + dcae_be_port = node['DCAE']['BE'][:http_port] + dcae_fe_port = node['DCAE']['FE'][:http_port] + dcae_dt_port = node['DCAE']['DT'][:http_port] +end + +printf("DEBUG: [%s]:[%s] disableHttp=[%s], protocol=[%s], dcae_dt_port=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], protocol, dcae_dt_port ) + + +directory "#{jetty_base}/config" do + owner "jetty" + group "jetty" + mode '0755' + recursive true + action :create +end + +directory "#{jetty_base}/config/dcae-dt" do + owner "jetty" + group "jetty" + mode '0755' + recursive true + action :create +end + +template "dcae-dt-config" do + sensitive true + path "#{jetty_base}/config/dcae-dt/application.properties" + source "dcae-application.properties.erb" + owner "jetty" + group "jetty" + mode "0755" + variables ({ + :dcae_fe_vip => dcae_fe_vip, + :dcae_fe_port => dcae_fe_port, + :protocol => protocol, + :dcae_dt_port => dcae_dt_port + }) +end + + +template "dcae-logback-spring-config" do + sensitive true + path "#{jetty_base}/config/dcae-dt/logback-spring.xml" + source "dcae-logback-spring.erb" + owner "jetty" + group "jetty" + mode "0755" +end + + +directory "#{dcae_logs}" do + owner "jetty" + group "jetty" + mode '0755' + recursive true + action :create +end |