From c4d387d216e72911f80c1ebee91b73aba191b91b Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Thu, 28 Mar 2019 11:00:54 +0200 Subject: Make Cassandra port configurable. SDC-BE & Onboarding - BE. Reviewer: Evgenia A & Areli F. Change-Id: Iaf86d647b0560764ef65d9148c85bffaf934992d Issue-ID: SDC-2077 Signed-off-by: Tal Gitelman --- .../sdc-backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb | 1 + .../cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb | 1 + .../cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb | 1 + catalog-be/src/main/resources/config/configuration.yaml | 1 + catalog-be/src/test/resources/config/catalog-be/configuration.yaml | 1 + 5 files changed, 5 insertions(+) (limited to 'catalog-be') 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 54f7128aa2..09c5cb3974 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 @@ -15,6 +15,7 @@ default['DCAE']['BE'][:https_port] = 8444 default['DCAE_BE_VIP'] = "dcae-be" #Cassandra +default['cassandra']['cassandra_port'] = 9042 default['cassandra']['datacenter_name'] = "DC-" default['cassandra']['cluster_name'] = "SDC-CS-" default['cassandra']['socket_read_timeout'] = 20000 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 74d867d699..335271f4d5 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 @@ -51,6 +51,7 @@ template "catalog-be-config" do :catalog_port => node['BE'][:http_port], :ssl_port => node['BE'][:https_port], :cassandra_ip => node['Nodes']['CS'].join(",").gsub(/[|]/,''), + :cassandra_port => node['cassandra']['cassandra_port'], :rep_factor => replication_factor, :DC_NAME => node['cassandra']['datacenter_name']+node.chef_environment, :REP_STRING => conf_dcname_with_rep, 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 078b9b1cd9..99a185e31b 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 @@ -73,6 +73,7 @@ users: cassandraConfig: cassandraHosts: [<%= @cassandra_ip %>] + cassandraPort: <%= @cassandra_port %> localDataCenter: <%= @DC_NAME %> reconnectTimeout : 30000 socketReadTimeout: <%= @socket_read_timeout %> diff --git a/catalog-be/src/main/resources/config/configuration.yaml b/catalog-be/src/main/resources/config/configuration.yaml index 2a7e8e35d1..2e84d6106b 100644 --- a/catalog-be/src/main/resources/config/configuration.yaml +++ b/catalog-be/src/main/resources/config/configuration.yaml @@ -92,6 +92,7 @@ neo4j: cassandraConfig: cassandraHosts: [192.168.33.10] + cassandraPort: 9042 localDataCenter: DC-sdc-iltlv650 reconnectTimeout : 30000 authenticate: true diff --git a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml index 6211a77042..dc1d199fcd 100644 --- a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml +++ b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml @@ -74,6 +74,7 @@ neo4j: cassandraConfig: cassandraHosts: ['localhost'] + cassandraPort: 9042 localDataCenter: datacenter1 reconnectTimeout : 30000 authenticate: false -- cgit 1.2.3-korg