aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions
diff options
context:
space:
mode:
authorMahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>2019-03-21 04:19:23 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-04-10 16:48:13 +0000
commit00a6a4d66b0d22d530314816b4b5697fbc975e37 (patch)
tree38f2713fb1f392f2d4b7318f20c85979fffc9d92 /asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions
parentc39136c8094f3866070627fd461b5871fea9faa3 (diff)
Upgrade SDC to use common cassandra cluster
Issue-ID: SDC-2199 Change-Id: I139f38f3f3d968b775c9962bfe3ad6d13ea7f678 Signed-off-by: Mahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>
Diffstat (limited to 'asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions')
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb2
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb9
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb2
3 files changed, 7 insertions, 6 deletions
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
index c9a4087671..a516c7108b 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
@@ -5,7 +5,7 @@ template "/tmp/create_dox_keyspace.sh" do
variables({
:cassandra_ip => node['Nodes']['CS'].first,
:cassandra_port => node['cassandra']['cassandra_port'],
- :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :DC_NAME => node['cassandra']['datacenter_name'],
:cassandra_pwd => node['cassandra'][:cassandra_password],
:cassandra_usr => node['cassandra'][:cassandra_user]
})
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
index b48eecd9b0..fbfcb2ecea 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
@@ -18,11 +18,12 @@ template "titan.properties" do
source "titan.properties.erb"
mode "0755"
variables({
- :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :DC_NAME => node['cassandra']['datacenter_name'],
:cassandra_ip => node['Nodes']['CS'].first,
:cassandra_pwd => node['cassandra'][:cassandra_password],
:cassandra_usr => node['cassandra'][:cassandra_user],
- :titan_connection_timeout => node['cassandra']['titan_connection_timeout']
+ :titan_connection_timeout => node['cassandra']['titan_connection_timeout'],
+ :replication_factor => node['cassandra']['replication_factor']
})
end
@@ -37,8 +38,8 @@ template "/tmp/sdctool/config/configuration.yaml" do
:ssl_port => node['BE'][:https_port],
:cassandra_ip => node['Nodes']['CS'].first,
:cassandra_port => node['cassandra']['cassandra_port'],
- :rep_factor => 1,
- :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment,
+ :rep_factor => node['cassandra']['replication_factor'],
+ :DC_NAME => node['cassandra']['datacenter_name'],
:titan_Path => "/tmp/sdctool/config/",
:socket_connect_timeout => node['cassandra']['socket_connect_timeout'],
:socket_read_timeout => node['cassandra']['socket_read_timeout'],
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb
index 0f31341d40..20a97be9de 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb
@@ -14,7 +14,7 @@ storage.cassandra.ssl.truststore.password=Aa123456
storage.cassandra.read-consistency-level=LOCAL_QUORUM
storage.cassandra.write-consistency-level=LOCAL_QUORUM
storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.NetworkTopologyStrategy
-storage.cassandra.replication-strategy-options=<%= @DC_NAME %>,1
+storage.cassandra.replication-strategy-options=<%= @DC_NAME %>,<%= @replication_factor %>
storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %>
cache.db-cache = false