0d12e3b589b5afcec2afdf09dd6dc693c66bb1f2
[sdc.git] / sdc-os-chef / sdc-frontend / chef-repo / cookbooks / sdc-catalog-fe / recipes / FE_2_setup_configuration.rb
1 jetty_base="/var/lib/jetty"
2
3
4 template "catalog-fe-config" do
5    path "#{jetty_base}/config/catalog-fe/configuration.yaml"
6    source "FE-configuration.yaml.erb"
7    owner "jetty"
8    group "jetty"
9    mode "0755"
10    variables({
11       :fe_host_ip   => node['HOST_IP'],
12       :be_host_ip   => node['HOST_IP'],
13       :kb_host_ip   => node['HOST_IP'],
14       :catalog_port => node['BE'][:http_port],
15       :ssl_port     => node['BE'][:https_port]
16    })
17 end
18
19 template "designers-fe-config" do
20    path "#{jetty_base}/config/catalog-fe/designers-configuration.yaml"
21    source "FE-designers-configuration.yaml.erb"
22    owner "jetty"
23    group "jetty"
24    mode "0755"
25    variables({
26       :dcae_host                 => node['Designers']['DCAE']['dcae_host'],
27       :dcae_port                 => node['Designers']['DCAE']['dcae_port'],
28       :dcae_path                 => node['Designers']['DCAE']['dcae_path'],
29       :dcae_state_url            => node['Designers']['DCAE']['dcae_state_url'],
30       :dcae_protocol             => node['Designers']['DCAE']['dcae_protocol'],
31       :dcae_button_location      => node['Designers']['DCAE']['dcae_button_location'],
32       :dcae_tab_presentation     => node['Designers']['DCAE']['dcae_tab_presentation'],
33       :workflow_host             => node['Designers']['WORKFLOW']['workflow_host'],
34       :workflow_port             => node['Designers']['WORKFLOW']['workflow_port'],
35       :workflow_path             => node['Designers']['WORKFLOW']['workflow_path'],
36       :workflow_state_url        => node['Designers']['WORKFLOW']['workflow_state_url'],
37       :workflow_protocol         => node['Designers']['WORKFLOW']['workflow_protocol'],
38       :workflow_button_location  => node['Designers']['WORKFLOW']['workflow_button_location'],
39       :workflow_tab_presentation => node['Designers']['WORKFLOW']['workflow_tab_presentation']
40    })
41 end
42
43
44 template "onboarding-fe-config" do
45  path "#{jetty_base}/config/onboarding-fe/onboarding_configuration.yaml"
46  source "FE-onboarding-configuration.yaml.erb"
47  owner "jetty"
48  group "jetty"
49  mode "0755"
50  variables({
51     :catalog_ip   => node['HOST_IP'],
52     :catalog_port => node['BE'][:http_port],
53     :ssl_port     => node['BE'][:https_port]
54 })
55 end