From 50ffa6b75d42f85bd0594e1306677eb11fb47a2c Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Mon, 8 Jan 2018 10:52:07 +0200 Subject: expose timeout setting expose setting of time out in env.json remove the hard codeing of password in the configuration, cs password is set using the envjson. Change-Id: I09cc1f99914f444900e6b73d2ae438c72527ba2c Issue-ID: SDC-833 Signed-off-by: Michael Lando --- .../cassandra-actions/recipes/02-createCsUser.rb | 4 +++- .../recipes/03-createDoxKeyspace.rb | 4 +++- .../cassandra-actions/recipes/04-schemaCreation.rb | 23 ++++++++++++++-------- .../recipes/05-titanSchemaCreation.rb | 23 ++++++++++++++-------- 4 files changed, 36 insertions(+), 18 deletions(-) (limited to 'sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes') diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb index 1ebc80d5e4..d9041f2841 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb @@ -3,7 +3,9 @@ template "/tmp/create_cassandra_user.sh" do sensitive true mode 0755 variables({ - :cassandra_ip => "HOSTIP" + :cassandra_ip => "HOSTIP", + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user] }) end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb index 789f658694..4e37d49ee0 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb @@ -4,7 +4,9 @@ template "/tmp/create_dox_keyspace.sh" do mode 0755 variables({ :cassandra_ip => "HOSTIP", - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user] }) end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb index 5890603829..0bb0027325 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb @@ -18,7 +18,10 @@ template "titan.properties" do source "titan.properties.erb" mode "0755" variables({ - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user], + :titan_connection_timeout => node['cassandra']['titan_connection_timeout'] }) end @@ -28,13 +31,17 @@ template "/tmp/sdctool/config/configuration.yaml" do source "configuration.yaml.erb" mode 0755 variables({ - :host_ip => node['HOST_IP'], - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port], - :cassandra_ip => node['Nodes']['CS'], - :rep_factor => 1, - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, - :titan_Path => "/tmp/sdctool/config/" + :host_ip => node['HOST_IP'], + :catalog_port => node['BE'][:http_port], + :ssl_port => node['BE'][:https_port], + :cassandra_ip => node['Nodes']['CS'], + :rep_factor => 1, + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :titan_Path => "/tmp/sdctool/config/", + :socket_connect_timeout => node['cassandra']['socket_connect_timeout'], + :socket_read_timeout => node['cassandra']['socket_read_timeout'], + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user] }) end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb index a3af2f490f..fa9ae79690 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb @@ -19,7 +19,10 @@ template "titan.properties" do source "titan.properties.erb" mode "0755" variables({ - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user], + :titan_connection_timeout => node['cassandra']['titan_connection_timeout'] }) end @@ -29,13 +32,17 @@ template "/tmp/sdctool/config/configuration.yaml" do source "configuration.yaml.erb" mode 0755 variables({ - :host_ip => node['HOST_IP'], - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port], - :cassandra_ip => node['Nodes']['CS'], - :rep_factor => 1, - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, - :titan_Path => "/tmp/sdctool/config" + :host_ip => node['HOST_IP'], + :catalog_port => node['BE'][:http_port], + :ssl_port => node['BE'][:https_port], + :cassandra_ip => node['Nodes']['CS'], + :rep_factor => 1, + :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, + :titan_Path => "/tmp/sdctool/config", + :socket_connect_timeout => node['cassandra']['socket_connect_timeout'], + :socket_read_timeout => node['cassandra']['socket_read_timeout'], + :cassandra_pwd => node['cassandra'][:cassandra_password], + :cassandra_usr => node['cassandra'][:cassandra_user] }) end -- cgit 1.2.3-korg