From 9d525f580b866778dc3417a06d98b96c70857efe Mon Sep 17 00:00:00 2001 From: "Areli, Fuss (af732p)" Date: Mon, 9 Apr 2018 18:15:42 +0300 Subject: Replace ssl configuration Replace ssl configuration from hardcoded into variable Change-Id: I1e393d311940944060d3f3f4e1093ee96eece777 Issue-ID: SDC-1176 Signed-off-by: Areli, Fuss (af732p) --- .../chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb | 3 ++- .../cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb | 9 ++++++--- .../sdc-catalog-be/templates/default/BE-configuration.yaml.erb | 6 +++--- .../sdc-catalog-be/templates/default/BE-titan.properties.erb | 6 +++--- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'catalog-be/sdc-backend') diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb index 4287ca8617..26d18c5db1 100644 --- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb +++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb @@ -1 +1,2 @@ -# \ No newline at end of file +# +default['cassandra'][:truststore_password] = "Aa123456" 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 fd7e2f8c5f..c04b11b815 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 @@ -12,7 +12,9 @@ template "titan.properties" do :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'] + :titan_connection_timeout => node['cassandra']['titan_connection_timeout'], + :cassandra_traststore_password => node['cassandra'][:truststore_password], + :cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}" }) end @@ -34,8 +36,9 @@ template "catalog-be-config" do :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] - + :cassandra_usr => node['cassandra'][:cassandra_user], + :cassandra_traststore_password => node['cassandra'][:truststore_password], + :cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}" }) end diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb index 9bb4c33dec..6ed6406191 100644 --- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb +++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb @@ -77,9 +77,9 @@ cassandraConfig: authenticate: true username: <%= @cassandra_usr %> password: <%= @cassandra_pwd %> - ssl: false - truststorePath : /config/.truststore - truststorePassword : Aa123456 + ssl: <%= @cassandra_ssl_enabled %> + truststorePath : /config/truststore + truststorePassword : <%= @cassandra_traststore_password %> keySpaces: - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']} - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['<%= @DC_NAME %>','<%= @rep_factor %>']} diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb index cf885e62bb..cc518ad1b2 100644 --- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb +++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb @@ -6,9 +6,9 @@ storage.password=<%= @CASSANDRA_PWD %> storage.connection-timeout=<%= @titan_connection_timeout %> storage.cassandra.keyspace=sdctitan -storage.cassandra.ssl.enabled=false -storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore -storage.cassandra.ssl.truststore.password=Aa123456 +storage.cassandra.ssl.enabled=<%= @cassandra_ssl_enabled %> +storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/truststore +storage.cassandra.ssl.truststore.password=<%= @cassandra_traststore_password %> storage.cassandra.read-consistency-level=LOCAL_QUORUM storage.cassandra.write-consistency-level=LOCAL_QUORUM -- cgit 1.2.3-korg