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 --- .../cassandra-actions/recipes/03-schemaCreation.rb | 16 ++++++------ .../templates/default/configuration.yaml.erb | 16 ++++++------ .../templates/default/janusgraph.properties.erb | 29 ++++++++++++++++++++++ .../templates/default/titan.properties.erb | 29 ---------------------- 4 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/janusgraph.properties.erb delete mode 100644 asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb (limited to 'asdctool/sdc-cassandra-init/chef-repo') diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb index fbfcb2ecea..4de50f6492 100644 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb @@ -12,17 +12,17 @@ bash "install tar" do end -template "titan.properties" do +template "janusgraph.properties" do sensitive true - path "/tmp/sdctool/config/titan.properties" - source "titan.properties.erb" + path "/tmp/sdctool/config/janusgraph.properties" + source "janusgraph.properties.erb" mode "0755" variables({ :DC_NAME => node['cassandra']['datacenter_name'], :cassandra_ip => node['Nodes']['CS'].first, :cassandra_pwd => node['cassandra'][:cassandra_password], :cassandra_usr => node['cassandra'][:cassandra_user], - :titan_connection_timeout => node['cassandra']['titan_connection_timeout'], + :janusgraph_connection_timeout => node['cassandra']['janusgraph_connection_timeout'], :replication_factor => node['cassandra']['replication_factor'] }) end @@ -40,7 +40,7 @@ template "/tmp/sdctool/config/configuration.yaml" do :cassandra_port => node['cassandra']['cassandra_port'], :rep_factor => node['cassandra']['replication_factor'], :DC_NAME => node['cassandra']['datacenter_name'], - :titan_Path => "/tmp/sdctool/config/", + :janusgraph_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], @@ -66,9 +66,9 @@ bash "excuting-schema-creation" do EOH end -bash "excuting-titanSchemaCreation.sh" do +bash "excuting-janusGraphSchemaCreation.sh" do code <<-EOH - chmod +x /tmp/sdctool/scripts/titanSchemaCreation.sh - /tmp/sdctool/scripts/titanSchemaCreation.sh /tmp/sdctool/config + chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh + /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config EOH end diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb index 0a658bb8d9..ab27886a47 100644 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb @@ -29,14 +29,14 @@ released: 2012-11-30 toscaConformanceLevel: 9.0 minToscaConformanceLevel: 3.0 -titanCfgFile: <%= @titan_Path %>/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: <%= @janusgraph_Path %>/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/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/janusgraph.properties.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/janusgraph.properties.erb new file mode 100644 index 0000000000..60c24d7613 --- /dev/null +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/janusgraph.properties.erb @@ -0,0 +1,29 @@ +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=false +storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore +storage.cassandra.ssl.truststore.password=Aa123456 + +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 %>,<%= @replication_factor %> +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/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb deleted file mode 100644 index 20a97be9de..0000000000 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/titan.properties.erb +++ /dev/null @@ -1,29 +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=false -storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore -storage.cassandra.ssl.truststore.password=Aa123456 - -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 %>,<%= @replication_factor %> -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