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 --- .../recipes/BE_2_setup_configuration.rb | 30 +++++++++++++--------- .../templates/default/BE-configuration.yaml.erb | 6 +++-- .../templates/default/BE-titan.properties.erb | 2 +- 3 files changed, 23 insertions(+), 15 deletions(-) (limited to 'sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be') diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb index baee9d97dc..fde367da7c 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb @@ -8,11 +8,12 @@ template "titan.properties" do group "jetty" mode "0755" variables({ - :CASSANDRA_IP => node['Nodes']['CS'], - :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 + :CASSANDRA_IP => node['Nodes']['CS'], + :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, + :titan_connection_timeout => node['cassandra']['titan_connection_timeout'] }) end @@ -24,13 +25,18 @@ template "catalog-be-config" do group "jetty" mode "0755" variables({ - :catalog_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 => "/var/lib/jetty/config/catalog-be/" + :catalog_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 => "/var/lib/jetty/config/catalog-be/", + :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-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb index 9ed32d2939..825dd54061 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb @@ -72,9 +72,11 @@ cassandraConfig: cassandraHosts: [<%= @cassandra_ip %>] localDataCenter: <%= @DC_NAME %> reconnectTimeout : 30000 + socketReadTimeout: <%= @socket_read_timeout %> + socketConnectTimeout: <%= @socket_connect_timeout %> authenticate: true - username: asdc_user - password: Aa1234%^! + username: <%= @cassandra_usr %> + password: <%= @cassandra_pwd %> ssl: false truststorePath : /config/.truststore truststorePassword : Aa123456 diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb index 18b69b3970..cf885e62bb 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb @@ -3,7 +3,7 @@ storage.hostname=<%= @CASSANDRA_IP %> storage.port=9160 storage.username=<%= @CASSANDRA_USR %> storage.password=<%= @CASSANDRA_PWD %> -storage.connection-timeout=10000 +storage.connection-timeout=<%= @titan_connection_timeout %> storage.cassandra.keyspace=sdctitan storage.cassandra.ssl.enabled=false -- cgit 1.2.3-korg