aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-07-29 16:13:45 +0300
committerMichael Lando <ml636r@att.com>2018-07-29 16:20:34 +0300
commit5b593496b8f1b8e8be8d7d2dbcc223332e65a49b (patch)
tree2f9dfc45191e723da69cf74be7829784e9741b94 /catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes
parent9200382f2ce7b4bb729aa287d0878004b2d2b4f9 (diff)
re base code
Change-Id: I12a5ca14a6d8a87e9316b9ff362eb131105f98a5 Issue-ID: SDC-1566 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes')
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb29
1 files changed, 18 insertions, 11 deletions
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
index ac378fa106..0d1e722a70 100644
--- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
@@ -9,6 +9,17 @@ else
end
+
+if node['Pair_EnvName'] == ""
+ titan_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "," + replication_factor.to_s
+ conf_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "','" + replication_factor.to_s
+else
+ titan_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "," + replication_factor.to_s + "," + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "," + replication_factor.to_s
+ conf_dcname_with_rep = node['cassandra']['datacenter_name'] + node.chef_environment + "','" + replication_factor.to_s + "','" + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "','" + replication_factor.to_s
+end
+
+
+
template "titan.properties" do
path "#{ENV['JETTY_BASE']}/config/catalog-be/titan.properties"
source "BE-titan.properties.erb"
@@ -20,7 +31,8 @@ template "titan.properties" do
:cassandra_pwd => node['cassandra'][:cassandra_password],
:cassandra_usr => node['cassandra'][:cassandra_user],
:rep_factor => replication_factor,
- :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :DC_NAME_WITH_REP => titan_dcname_with_rep,
:titan_connection_timeout => node['cassandra']['titan_connection_timeout'],
:cassandra_truststore_password => node['cassandra'][:truststore_password],
:cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}"
@@ -28,6 +40,7 @@ template "titan.properties" do
end
+
template "catalog-be-config" do
path "#{ENV['JETTY_BASE']}/config/catalog-be/configuration.yaml"
source "BE-configuration.yaml.erb"
@@ -35,12 +48,13 @@ template "catalog-be-config" do
group "jetty"
mode "0755"
variables({
- :catalog_ip => node['Nodes']['BE'],
+ :catalog_ip => node['BE_VIP'],
:catalog_port => node['BE'][:http_port],
:ssl_port => node['BE'][:https_port],
:cassandra_ip => node['Nodes']['CS'].join(",").gsub(/[|]/,''),
:rep_factor => replication_factor,
- :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
+ :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :REP_STRING => conf_dcname_with_rep,
:titan_Path => "/var/lib/jetty/config/catalog-be/",
:socket_connect_timeout => node['cassandra']['socket_connect_timeout'],
:socket_read_timeout => node['cassandra']['socket_read_timeout'],
@@ -53,6 +67,7 @@ template "catalog-be-config" do
end
+
template "distribution-engine-configuration" do
path "#{ENV['JETTY_BASE']}/config/catalog-be/distribution-engine-configuration.yaml"
source "BE-distribution-engine-configuration.yaml.erb"
@@ -61,11 +76,3 @@ template "distribution-engine-configuration" do
mode "0755"
end
-
-cookbook_file "ArtifactGenerator" do
- path "#{ENV['JETTY_BASE']}/config/catalog-be/Artifact-Generator.properties"
- source "Artifact-Generator.properties"
- owner "jetty"
- group "jetty"
- mode "0755"
-end