From 2623c8402a57e2035db69a9d92d2851050916801 Mon Sep 17 00:00:00 2001 From: shrikantawachar Date: Mon, 20 May 2019 12:11:54 +0530 Subject: Upgrade SDC from Titan to Janus Graph Upgrade SDC from Titan to Janus Graph Change-Id: I67fb8b8e60cc6751697bc5ff2f06754c92803786 Issue-ID: SDC-2296 Signed-off-by: shrikantawachar --- .../cookbooks/sdc-catalog-be/attributes/default.rb | 2 +- .../recipes/BE_2_setup_configuration.rb | 16 ++++++------- .../templates/default/BE-configuration.yaml.erb | 16 ++++++------- .../templates/default/BE-janusgraph.properties.erb | 28 ++++++++++++++++++++++ .../templates/default/BE-titan.properties.erb | 28 ---------------------- 5 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-janusgraph.properties.erb delete mode 100644 catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb (limited to 'catalog-be/sdc-backend/chef-repo/cookbooks/sdc-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 09c5cb3974..763db8f5a4 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 @@ -20,7 +20,7 @@ default['cassandra']['datacenter_name'] = "DC-" default['cassandra']['cluster_name'] = "SDC-CS-" default['cassandra']['socket_read_timeout'] = 20000 default['cassandra']['socket_connect_timeout'] = 20000 -default['cassandra']['titan_connection_timeout'] = 10000 +default['cassandra']['janusgraph_connection_timeout'] = 10000 #Elasticsearch default['elasticsearch']['cluster_name'] = "SDC-ES-" 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 5d83cdbd43..20c144c056 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 @@ -2,18 +2,18 @@ replication_factor=node['cassandra']['replication_factor'] if node['Pair_EnvName'] == "" - titan_dcname_with_rep = node['cassandra']['datacenter_name'] + "," + replication_factor.to_s + janusgraph_dcname_with_rep = node['cassandra']['datacenter_name'] + "," + replication_factor.to_s conf_dcname_with_rep = node['cassandra']['datacenter_name'] + "','" + replication_factor.to_s else - titan_dcname_with_rep = node['cassandra']['datacenter_name'] + "," + replication_factor.to_s + "," + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "," + replication_factor.to_s + janusgraph_dcname_with_rep = node['cassandra']['datacenter_name'] + "," + replication_factor.to_s + "," + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "," + replication_factor.to_s conf_dcname_with_rep = node['cassandra']['datacenter_name'] + "','" + replication_factor.to_s + "','" + node['cassandra']['cluster_name'] + node['Pair_EnvName'] + "','" + replication_factor.to_s end -template "titan.properties" do - path "#{ENV['JETTY_BASE']}/config/catalog-be/titan.properties" - source "BE-titan.properties.erb" +template "janusgraph.properties" do + path "#{ENV['JETTY_BASE']}/config/catalog-be/janusgraph.properties" + source "BE-janusgraph.properties.erb" owner "jetty" group "jetty" mode "0755" @@ -23,8 +23,8 @@ template "titan.properties" do :cassandra_usr => node['cassandra'][:cassandra_user], :rep_factor => replication_factor, :DC_NAME => node['cassandra']['datacenter_name'], - :DC_NAME_WITH_REP => titan_dcname_with_rep, - :titan_connection_timeout => node['cassandra']['titan_connection_timeout'], + :DC_NAME_WITH_REP => janusgraph_dcname_with_rep, + :janusgraph_connection_timeout => node['cassandra']['janusgraph_connection_timeout'], :cassandra_truststore_password => node['cassandra'][:truststore_password], :cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}" }) @@ -46,7 +46,7 @@ template "catalog-be-config" do :rep_factor => replication_factor, :DC_NAME => node['cassandra']['datacenter_name'], :REP_STRING => conf_dcname_with_rep, - :titan_Path => "/var/lib/jetty/config/catalog-be/", + :janusgraph_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], 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 0ad9997c3f..6a49b19c5e 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 @@ -28,14 +28,14 @@ released: 2012-11-30 toscaConformanceLevel: 9.0 minToscaConformanceLevel: 3.0 -titanCfgFile: /var/lib/jetty/config/catalog-be/titan.properties -titanInMemoryGraph: false -titanLockTimeout: 1800 -# The interval to try and reconnect to titan DB when it is down during ASDC startup: -titanReconnectIntervalInSeconds: 3 - -# The read timeout towards Titan DB when health check is invoked: -titanHealthCheckReadTimeout: 1 +janusGraphCfgFile: /var/lib/jetty/config/catalog-be/janusgraph.properties +janusGraphInMemoryGraph: false +janusGraphLockTimeout: 1800 +# The interval to try and reconnect to JanusGraph DB when it is down during ASDC startup: +janusGraphReconnectIntervalInSeconds: 3 + +# The read timeout towards JanusGraph DB when health check is invoked: +janusGraphHealthCheckReadTimeout: 1 # The interval to try and reconnect to Elasticsearch when it is down during ASDC startup: diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-janusgraph.properties.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-janusgraph.properties.erb new file mode 100644 index 0000000000..e091052709 --- /dev/null +++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-janusgraph.properties.erb @@ -0,0 +1,28 @@ +storage.backend=cassandra +storage.hostname=<%= @cassandra_ip %> +storage.port=9160 +storage.username=<%= @cassandra_usr %> +storage.password=<%= @cassandra_pwd %> +storage.connection-timeout=<%= @janusgraph_connection_timeout %> +storage.cassandra.keyspace=sdctitan + +storage.cassandra.ssl.enabled=<%= @cassandra_ssl_enabled %> +storage.cassandra.ssl.truststore.location=/var/lib/jetty/etc/truststore +storage.cassandra.ssl.truststore.password=<%= @cassandra_truststore_password %> + +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_WITH_REP %> +storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %> + + +cache.db-cache = false +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.5 + +cache.tx-cache-size = 1000000 + +storage.lock.retries=5 +storage.lock.wait-time=500 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 deleted file mode 100644 index 1a259a1f98..0000000000 --- a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-titan.properties.erb +++ /dev/null @@ -1,28 +0,0 @@ -storage.backend=cassandra -storage.hostname=<%= @cassandra_ip %> -storage.port=9160 -storage.username=<%= @cassandra_usr %> -storage.password=<%= @cassandra_pwd %> -storage.connection-timeout=<%= @titan_connection_timeout %> -storage.cassandra.keyspace=sdctitan - -storage.cassandra.ssl.enabled=<%= @cassandra_ssl_enabled %> -storage.cassandra.ssl.truststore.location=/var/lib/jetty/etc/truststore -storage.cassandra.ssl.truststore.password=<%= @cassandra_truststore_password %> - -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_WITH_REP %> -storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %> - - -cache.db-cache = false -cache.db-cache-clean-wait = 20 -cache.db-cache-time = 180000 -cache.db-cache-size = 0.5 - -cache.tx-cache-size = 1000000 - -storage.lock.retries=5 -storage.lock.wait-time=500 -- cgit 1.2.3-korg