diff options
author | shrek2000 <oren.kleks@amdocs.com> | 2020-01-30 14:52:49 +0200 |
---|---|---|
committer | shrek2000 <oren.kleks@amdocs.com> | 2020-01-30 14:52:49 +0200 |
commit | 0594c412c406b22725b33633299d85587ee03f08 (patch) | |
tree | 66228ad365c77c09219e147e683fae9a4999cce7 | |
parent | 22b57cf9313f0b21a1dca090088b811eec8cca6a (diff) |
Upgrade to Cassandra 3
Creating base dockers suitable for Cassandra 3
remove cqlsh version
Change-Id: I996bad2341410cdf45c49f191e998acf4781fc5d
Issue-ID: SDC-2596
Signed-off-by: shrek2000 <oren.kleks@amdocs.com>
35 files changed, 150 insertions, 176 deletions
diff --git a/asdctool/sdc-cassandra-init/Dockerfile b/asdctool/sdc-cassandra-init/Dockerfile index df9ef7673a..64dbe05e5d 100644 --- a/asdctool/sdc-cassandra-init/Dockerfile +++ b/asdctool/sdc-cassandra-init/Dockerfile @@ -1,4 +1,4 @@ -FROM onap/base_sdc-cqlsh:1.4.1 +FROM onap/base_sdc-cqlsh:1.5.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb index a516c7108b..38de1e8844 100644 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb @@ -4,7 +4,7 @@ template "/tmp/create_dox_keyspace.sh" do mode 0755 variables({ :cassandra_ip => node['Nodes']['CS'].first, - :cassandra_port => node['cassandra']['cassandra_port'], + :cassandra_port => node['cassandra'][:cassandra_port], :DC_NAME => node['cassandra']['datacenter_name'], :cassandra_pwd => node['cassandra'][:cassandra_password], :cassandra_usr => node['cassandra'][:cassandra_user] 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 72a144634c..a62550eeae 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 @@ -20,9 +20,10 @@ template "janusgraph.properties" do variables({ :DC_NAME => node['cassandra']['datacenter_name'], :cassandra_ip => node['Nodes']['CS'].first, + :cassandra_port_num => node['cassandra'][:cassandra_port], + :janus_connection_timeout => node['cassandra'][:janusgraph_connection_timeout], :cassandra_pwd => node['cassandra'][:cassandra_password], :cassandra_usr => node['cassandra'][:cassandra_user], - :janusgraph_connection_timeout => node['cassandra']['janusgraph_connection_timeout'], :replication_factor => node['cassandra']['replication_factor'] }) end diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb index bbd048cb9e..426eed83df 100644 --- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb +++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb @@ -1,8 +1,7 @@ #!/bin/bash CASSANDRA_IP=<%= @cassandra_ip %> -#Port for Cassandra Thrift to listen for clients on -CASSANDRA_PORT=9160 +CASSANDRA_PORT=<%= @cassandra_port %> CS_PASSWORD=<%= @cassandra_pwd %> SDC_USER=<%= @sdc_usr %> SDC_PASSWORD=<%= @sdc_pwd %> 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 index 60c24d7613..9b1ebdd5a4 100644 --- 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 @@ -1,21 +1,20 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=<%= @cassandra_ip %> -storage.port=9160 +storage.port=<%= @cassandra_port_num %> storage.username=<%= @cassandra_usr %> storage.password=<%= @cassandra_pwd %> -storage.connection-timeout=<%= @janusgraph_connection_timeout %> -storage.cassandra.keyspace=sdctitan +storage.connection-timeout=<%= @janus_connection_timeout %> +storage.cql.keyspace=sdctitan +storage.cql.ssl.enabled=false +storage.cql.ssl.truststore.location=<%= @cassandra_truststore_path %> +storage.cql.ssl.truststore.password=<%= @cassandra_truststore_password %> -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 %> +storage.cql.read-consistency-level=LOCAL_QUORUM +storage.cql.write-consistency-level=LOCAL_QUORUM +storage.cql.replication-strategy-class=NetworkTopologyStrategy +storage.cql.replication-strategy-options=<%= @DC_NAME %>,<%= @replication_factor %> +storage.cql.local-datacenter=<%= @DC_NAME %> cache.db-cache = false cache.db-cache-clean-wait = 20 @@ -23,7 +22,4 @@ 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 - +storage.lock.wait-time=500
\ No newline at end of file diff --git a/asdctool/src/main/resources/config/janusgraph-migration.properties b/asdctool/src/main/resources/config/janusgraph-migration.properties index e982c2d085..57113b0ddf 100644 --- a/asdctool/src/main/resources/config/janusgraph-migration.properties +++ b/asdctool/src/main/resources/config/janusgraph-migration.properties @@ -1,4 +1,4 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=localhost -storage.port=9160 +storage.port=9042 storage.cassandra.keyspace=sdctitan diff --git a/asdctool/src/main/resources/config/janusgraph.properties b/asdctool/src/main/resources/config/janusgraph.properties index 3e88b0d3c8..e0b844f554 100644 --- a/asdctool/src/main/resources/config/janusgraph.properties +++ b/asdctool/src/main/resources/config/janusgraph.properties @@ -1,20 +1,20 @@ -storage.backend=cassandrathrift +storage.backend=cql storage.hostname=192.168.33.10 -storage.port=9160 +storage.port=9042 storage.username=asdc_user storage.password=Aa1234%^! storage.connection-timeout=10000 -storage.cassandra.keyspace=sdctitan +storage.cql.keyspace=sdctitan -storage.cassandra.ssl.enabled=true -storage.cassandra.ssl.truststore.location=/var/lib/jetty/etc/truststore -storage.cassandra.ssl.truststore.password=Aa123456 +storage.cql.ssl.enabled=true +storage.cql.ssl.truststore.location=C:\\gitWork\\vagrant-sdc-all-in-one\\mytmp.trust +storage.cql.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-ILTLV2083,1 -storage.cassandra.astyanax.local-datacenter=DC-ILTLV2083 +storage.cql.read-consistency-level=LOCAL_QUORUM +storage.cql.write-consistency-level=LOCAL_QUORUM +storage.cql.replication-strategy-class=org.apache.cassandra.locator.NetworkTopologyStrategy +storage.cql.replication-strategy-options=DC-sdc-iltlv633,1 +storage.cql.local-datacenter=DC-sdc-iltlv633 cache.db-cache = false @@ -25,4 +25,4 @@ cache.db-cache-size = 0.5 cache.tx-cache-size = 1000000 storage.lock.retries=5 -storage.lock.wait-time=500 +storage.lock.wait-time=500
\ No newline at end of file diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml index f78ff11e90..577501bf49 100644 --- a/catalog-be/pom.xml +++ b/catalog-be/pom.xml @@ -330,7 +330,7 @@ <dependency> <groupId>org.janusgraph</groupId> - <artifactId>janusgraph-cassandra</artifactId> + <artifactId>janusgraph-cql</artifactId> <version>${janusgraph.version}</version> <scope>compile</scope> <exclusions> @@ -339,6 +339,18 @@ <artifactId>slf4j-log4j12</artifactId> </exclusion> <exclusion> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + </exclusion> + <exclusion> + <artifactId>commons-collections</artifactId> + <groupId>commons-collections</groupId> + </exclusion> + <exclusion> + <artifactId>groovy</artifactId> + <groupId>org.codehaus.groovy</groupId> + </exclusion> + <exclusion> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> </exclusion> 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 a0a6bc06d4..3ec26cf2dd 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 @@ -24,12 +24,13 @@ template "janusgraph.properties" do mode "0755" variables({ :cassandra_ip => node['Nodes']['CS'].join(",").gsub(/[|]/,''), + :cassandra_cql_port => node['cassandra'][:cassandra_port], :cassandra_pwd => node['cassandra'][:cassandra_password], :cassandra_usr => node['cassandra'][:cassandra_user], :rep_factor => replication_factor, :DC_NAME => node['cassandra']['datacenter_name'], :DC_NAME_WITH_REP => janusgraph_dcname_with_rep, - :janusgraph_connection_timeout => node['cassandra']['janusgraph_connection_timeout'], + :janus_connection_timeout => node['cassandra']['janusgraph_connection_timeout'], :cassandra_truststore_password => node['cassandra'][:truststore_password], :cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}" }) 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 index e091052709..0a9dd073c0 100644 --- 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 @@ -1,20 +1,20 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=<%= @cassandra_ip %> -storage.port=9160 +storage.port=<%= @cassandra_cql_port %> storage.username=<%= @cassandra_usr %> storage.password=<%= @cassandra_pwd %> -storage.connection-timeout=<%= @janusgraph_connection_timeout %> -storage.cassandra.keyspace=sdctitan +storage.connection-timeout=<%= @janus_connection_timeout %> +storage.cql.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.cql.ssl.enabled=<%= @cassandra_ssl_enabled %> +storage.cql.ssl.truststore.location=<%= @cassandra_truststore_path %> +storage.cql.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 %> +storage.cql.read-consistency-level=LOCAL_QUORUM +storage.cql.write-consistency-level=LOCAL_QUORUM +storage.cql.replication-strategy-class=NetworkTopologyStrategy +storage.cql.replication-strategy-options=<%= @DC_NAME_WITH_REP %> +storage.cql.local-datacenter=<%= @DC_NAME %> cache.db-cache = false @@ -24,5 +24,4 @@ cache.db-cache-size = 0.5 cache.tx-cache-size = 1000000 -storage.lock.retries=5 -storage.lock.wait-time=500 +storage.lock.retries=5
\ No newline at end of file diff --git a/catalog-be/src/main/resources/config/janusgraph.properties b/catalog-be/src/main/resources/config/janusgraph.properties index 5411a44224..9231207b69 100644 --- a/catalog-be/src/main/resources/config/janusgraph.properties +++ b/catalog-be/src/main/resources/config/janusgraph.properties @@ -1,6 +1,6 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=localhost -storage.port=9160 +storage.port=9042 cache.db-cache = false cache.db-cache-clean-wait = 20 @@ -8,4 +8,4 @@ cache.db-cache-time = 180000 cache.db-cache-size = 0.5 cache.tx-cache-size = 500000 -storage.cassandra.keyspace=sdctitan +storage.cql.keyspace=sdctitan
\ No newline at end of file diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java index 64fac358bf..6d0a32d1d8 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/DAOArtifactData.java @@ -23,6 +23,7 @@ package org.openecomp.sdc.be.resources.data; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; +import com.datastax.driver.mapping.annotations.Transient; import java.nio.ByteBuffer; @@ -68,6 +69,7 @@ public class DAOArtifactData { } + @Transient public byte[] getDataAsArray() { // return data; if (data != null) { diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/SdcSchemaFilesData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/SdcSchemaFilesData.java index 2b92aa3b8d..1ed044082e 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/SdcSchemaFilesData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/SdcSchemaFilesData.java @@ -24,7 +24,7 @@ import com.datastax.driver.mapping.annotations.ClusteringColumn; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; - +import com.datastax.driver.mapping.annotations.Transient; import java.nio.ByteBuffer; import java.util.Date; @@ -105,7 +105,8 @@ public class SdcSchemaFilesData { this.payload = ByteBuffer.wrap(payload.clone()); } } - + + @Transient public byte[] getPayloadAsArray() { return payload != null ? payload.array() : null; } diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/AuditingGenericEvent.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/AuditingGenericEvent.java index 57bab5977e..f37f9b9d01 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/AuditingGenericEvent.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/auditing/AuditingGenericEvent.java @@ -22,7 +22,7 @@ package org.openecomp.sdc.be.resources.data.auditing; import org.openecomp.sdc.common.datastructure.AuditingFieldsKey; - +import com.datastax.driver.mapping.annotations.Transient; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; @@ -30,16 +30,23 @@ import java.util.Map; import java.util.TimeZone; public class AuditingGenericEvent { + @Transient protected SimpleDateFormat simpleDateFormat; protected static String dateFormatPattern = "yyyy-MM-dd HH:mm:ss.SSS z"; + @Transient protected String requestId; + @Transient protected String serviceInstanceId; + @Transient protected String action; + @Transient protected String status; + @Transient protected String timestamp; - + @Transient protected String desc; + @Transient protected Map<String, Object> fields = new HashMap<>(); diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEvent.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEvent.java index 86bd60a75a..501b421bd5 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEvent.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/togglz/FeatureToggleEvent.java @@ -30,6 +30,7 @@ import org.openecomp.sdc.common.log.enums.EcompLoggerErrorCode; import org.openecomp.sdc.common.log.wrappers.Logger; import org.togglz.core.Feature; import org.togglz.core.repository.FeatureState; +import com.datastax.driver.mapping.annotations.Transient; import java.util.Map; @@ -92,6 +93,7 @@ public class FeatureToggleEvent { this.parameters = Joiner.on(",").withKeyValueSeparator("=").join(featureState.getParameterMap()); } + @Transient public FeatureState getFeatureState() { Feature feature = ToggleableFeature.getFeatureByName(featureName); if (feature == null) { diff --git a/catalog-dao/src/test/resources/cassandra.yaml b/catalog-dao/src/test/resources/cassandra.yaml index 39f987152a..d512f28230 100644 --- a/catalog-dao/src/test/resources/cassandra.yaml +++ b/catalog-dao/src/test/resources/cassandra.yaml @@ -440,9 +440,6 @@ rpc_address: 0.0.0.0 # rpc_interface: eth1 # rpc_interface_prefer_ipv6: false -# port for Thrift to listen for clients on -rpc_port: 9160 - # RPC address to broadcast to drivers and other Cassandra nodes. This cannot # be set to 0.0.0.0. If left blank, this will be set to the value of # rpc_address. If rpc_address is set to 0.0.0.0, broadcast_rpc_address must diff --git a/common-app-api/pom.xml b/common-app-api/pom.xml index 08755de6a3..11c6e50c40 100644 --- a/common-app-api/pom.xml +++ b/common-app-api/pom.xml @@ -240,6 +240,12 @@ <version>${project.version}</version> <scope>compile</scope> </dependency> + <dependency> + <groupId>com.datastax.cassandra</groupId> + <artifactId>cassandra-driver-mapping</artifactId> + <version>${cassandra.driver.version}</version> + <scope>compile</scope> + </dependency> </dependencies> <build> diff --git a/docs/configuration.rst b/docs/configuration.rst index 59f571d6ca..3ce4a5fdf2 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -1130,7 +1130,7 @@ BE-janusgraph.properties storage.hostname=<%= @CASSANDRA_IP %> # JanusGraph storage port - storage.port=9160 + storage.port=9042 # JanusGraph storage username storage.username=<%= @CASSANDRA_USR %> diff --git a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile index 76e1d2b154..29189dbb4c 100644 --- a/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile +++ b/openecomp-be/dist/sdc-onboard-db-init-docker/artifacts/Dockerfile @@ -1,4 +1,4 @@ -FROM onap/base_sdc-cqlsh:1.4.1 +FROM onap/base_sdc-cqlsh:1.5.0-SNAPSHOT-latest COPY init_keyspaces.cql /root/ @@ -76,6 +76,7 @@ Modifications copyright (c) 2018-2019 Nokia <jackson.version>2.9.9</jackson.version> <jackson-annotations.version>2.9.9</jackson-annotations.version> <jackson.mapper.version>1.9.13</jackson.mapper.version> + <clearspring.version>2.1.1</clearspring.version> <!-- Yaml for properties --> <snakeyaml.version>1.14</snakeyaml.version> @@ -137,7 +138,7 @@ Modifications copyright (c) 2018-2019 Nokia <sonar.branch>${project.version}</sonar.branch> <!--cassandra --> - <cassandra.driver.version>3.0.0</cassandra.driver.version> + <cassandra.driver.version>3.6.0</cassandra.driver.version> <libthrift.version>0.12.0</libthrift.version> <!-- maven central (Nexus) --> <nexus.id.release>nexus</nexus.id.release> diff --git a/sdc-os-chef/docker-compose.yml b/sdc-os-chef/docker-compose.yml index c91fb9a140..20b97a1391 100644 --- a/sdc-os-chef/docker-compose.yml +++ b/sdc-os-chef/docker-compose.yml @@ -1,39 +1,7 @@ version: "2.1" services: ################################################################ - elasticsearch: - build: . -# context: elasticsearch - container_name: "sdc-es" - restart: "always" - image: "ecomp-nexus:51212/ecomp/sdc-elasticsearch:1610.2.13" - mem_limit: "1g" - memswap_limit: "1g" - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - ports: - - "9200:9200" - - "9300:9300" - environment: -# - ES_JAVA_OPTS="-Xms1g -Xmx1g" - - ES_HEAP_SIZE=1073741824 - - HOST_IP:HOSTIP - - ENVNAME:DEP_ENV - volumes: - - /etc/localtime:/etc/localtime:ro - - /data/ES:/usr/share/elasticsearch/data - - /data/ASDC/environments:/root/chef-solo/environments - ulimits: - memlock: -1 - nproc: 65535 - nofile: - soft: 100000 - hard: 100000 - cassandra: build: . # context: cassandra @@ -47,7 +15,6 @@ services: max-file: "10" ports: - "9042:9042" - - "9160:9160" environment: - ES_HEAP_SIZE=1073741824 - HOST_IP:HOSTIP @@ -63,38 +30,6 @@ services: soft: 100000 hard: 100000 - - - kibana: - build: . - container_name: "sdc-kbn" - restart: "always" - image: "ecomp-nexus:51212/ecomp/sdc-kibana:1610.2.13" - mem_limit: "1g" - memswap_limit: "1g" - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "10" - ports: - - "5601:5601" - environment: - - ENVNAME:DEP_ENV - volumes: - - /etc/localtime:/etc/localtime:ro - - /data/ASDC/environments:/root/chef-solo/environments - ulimits: - memlock: -1 - nproc: 65535 - nofile: - soft: 100000 - hard: 100000 - depends_on: - - elasticsearch - - - jettyBE: build: . diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml index 9dad280526..148955815e 100644 --- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml +++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-cs.yaml @@ -46,7 +46,6 @@ spec: name: sdc-logs ports: - containerPort: 9042 - - containerPort: 9160 readinessProbe: exec: command: diff --git a/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml b/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml index d568e9c317..8d859d3f6a 100644 --- a/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml +++ b/sdc-os-chef/kubernetes/sdc/templates/services/all-services.yaml @@ -29,8 +29,6 @@ spec: ports: - name: sdc-cs-port-9042 port: 9042 - - name: sdc-cs-port-9160 - port: 9160 selector: app: sdc-cs clusterIP: None diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh index c5015e681a..759c4699d5 100755 --- a/sdc-os-chef/scripts/docker_run.sh +++ b/sdc-os-chef/scripts/docker_run.sh @@ -21,6 +21,7 @@ LOCAL=false BE_DEBUG_PORT="--publish 4000:4000" FE_DEBUG_PORT="--publish 6000:6000" ONBOARD_DEBUG_PORT="--publish 4001:4001" +CS_PORT=${CS_PORT:-9042} # Java Options: @@ -271,7 +272,7 @@ function sdc-cs { if [ ${LOCAL} = false ]; then docker pull ${PREFIX}/sdc-cassandra:${RELEASE} fi - docker run -dit --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh + docker run -dit --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish ${CS_PORT}:${CS_PORT} ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh command_exit_status $? ${DOCKER_NAME} echo "please wait while CS is starting..." monitor_docker ${DOCKER_NAME} @@ -301,7 +302,7 @@ function sdc-cs-onboard-init { if [ ${LOCAL} = false ]; then docker pull ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE} fi - docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE} + docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env CS_HOST_PORT=${CS_PORT} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE} rc=$? docker_logs ${DOCKER_NAME} if [[ ${rc} != 0 ]]; then exit ${rc}; fi diff --git a/sdc-os-chef/sdc-cassandra/Dockerfile b/sdc-os-chef/sdc-cassandra/Dockerfile index dade1d343a..15151bfd35 100644 --- a/sdc-os-chef/sdc-cassandra/Dockerfile +++ b/sdc-os-chef/sdc-cassandra/Dockerfile @@ -1,4 +1,4 @@ -FROM onap/base_sdc-cassandra:1.4.1 +FROM onap/base_sdc-cassandra:1.5.0-SNAPSHOT-latest COPY chef-solo /root/chef-solo/ diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/cassandra.yaml.erb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/cassandra.yaml.erb index 8e3d1229ba..3884841122 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/cassandra.yaml.erb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/cassandra.yaml.erb @@ -449,9 +449,6 @@ rpc_address: <%= @rpc_address %> # rpc_interface: eth1 # rpc_interface_prefer_ipv6: false -# port for Thrift to listen for clients on -rpc_port: 9160 - # RPC address to broadcast to drivers and other Cassandra nodes. This cannot # be set to 0.0.0.0. If left blank, this will be set to the value of # rpc_address. If rpc_address is set to 0.0.0.0, broadcast_rpc_address must diff --git a/test-apis-ci/pom.xml b/test-apis-ci/pom.xml index 68e0df0a9d..35b0b4f716 100644 --- a/test-apis-ci/pom.xml +++ b/test-apis-ci/pom.xml @@ -248,14 +248,35 @@ </dependency> <dependency> + <groupId>com.clearspring.analytics</groupId> + <artifactId>stream</artifactId> + <version>${clearspring.version}</version> + </dependency> + <dependency> <groupId>org.janusgraph</groupId> - <artifactId>janusgraph-cassandra</artifactId> + <artifactId>janusgraph-cql</artifactId> <version>${janusgraph.version}</version> <scope>compile</scope> <exclusions> <exclusion> - <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + </exclusion> + <exclusion> + <artifactId>commons-collections</artifactId> + <groupId>commons-collections</groupId> + </exclusion> + <exclusion> + <artifactId>groovy</artifactId> + <groupId>org.codehaus.groovy</groupId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> </exclusion> </exclusions> </dependency> diff --git a/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/recipes/sanityApiTests_2_setup_configuration.rb b/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/recipes/sanityApiTests_2_setup_configuration.rb index e90fa87e02..55ab07fca5 100644 --- a/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/recipes/sanityApiTests_2_setup_configuration.rb +++ b/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/recipes/sanityApiTests_2_setup_configuration.rb @@ -21,6 +21,7 @@ template "sdc-yaml-config" do :ConfigurationFile => "#{tests_base}/conf/configuration.yaml", :errorConfigurationFile => "#{tests_base}/conf/error-configuration.yaml", :CASSANDRA_IP => node['Nodes']['CS'][0], + :CASSANDRA_PORT => node['cassandra'][[:cassandra_port], :CASSANDRA_PWD => node['cassandra'][:cassandra_password], :CASSANDRA_USR => node['cassandra'][:cassandra_user] }) @@ -34,6 +35,7 @@ template "janusgraph.properties" do mode "0755" variables({ :CASSANDRA_IP => node['Nodes']['CS'].join(",").gsub(/[|]/,''), + :CASSANDRA_PORT => node['cassandra'][[:cassandra_port], :CASSANDRA_PWD => node['cassandra'][:cassandra_password], :CASSANDRA_USR => node['cassandra'][:cassandra_user], :rep_factor => node['cassandra']['replication_factor'], diff --git a/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/templates/default/BE-janusgraph.properties.erb b/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/templates/default/BE-janusgraph.properties.erb index a42c7bf206..d333242710 100644 --- a/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/templates/default/BE-janusgraph.properties.erb +++ b/test-apis-ci/sdc-api-tests/chef-repo/cookbooks/sdc-api-tests/templates/default/BE-janusgraph.properties.erb @@ -1,25 +1,24 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=<%= @CASSANDRA_IP %> -storage.port=9160 +storage.port=<%= @CASSANDRA_PORT %> storage.username=<%= @CASSANDRA_USR %> storage.password=<%= @CASSANDRA_PWD %> storage.connection-timeout=10000 -storage.cassandra.keyspace=sdctitan +storage.cql.keyspace=sdctitan -storage.cassandra.ssl.enabled=false -storage.cassandra.ssl.truststore.location=/var/lib/jetty/config/.truststore -storage.cassandra.ssl.truststore.password=Aa123456 +storage.cql.ssl.enabled=false +storage.cql.ssl.truststore.location=/var/lib/jetty/config/.truststore +storage.cql.ssl.truststore.password=Aa123456 cache.db-cache = false cache.db-cache-clean-wait = 20 cache.db-cache-time = 180000 cache.db-cache-size = 0.5 -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 %>,<%= @rep_factor %> -storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %> +storage.cql.read-consistency-level=LOCAL_QUORUM +storage.cql.write-consistency-level=LOCAL_QUORUM +storage.cql.replication-strategy-class=NetworkTopologyStrategy +storage.cql.replication-strategy-options=<%= @DC_NAME %>,<%= @rep_factor %> storage.lock.retries=5 storage.lock.wait-time=500 diff --git a/test-apis-ci/src/main/resources/ci/conf/janusgraph.properties b/test-apis-ci/src/main/resources/ci/conf/janusgraph.properties index 5411a44224..ea498bb7da 100644 --- a/test-apis-ci/src/main/resources/ci/conf/janusgraph.properties +++ b/test-apis-ci/src/main/resources/ci/conf/janusgraph.properties @@ -1,6 +1,6 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=localhost -storage.port=9160 +storage.port=9042 cache.db-cache = false cache.db-cache-clean-wait = 20 @@ -8,4 +8,4 @@ cache.db-cache-time = 180000 cache.db-cache-size = 0.5 cache.tx-cache-size = 500000 -storage.cassandra.keyspace=sdctitan +storage.cql.keyspace=sdctitan diff --git a/test-apis-ci/src/main/resources/log4j.properties b/test-apis-ci/src/main/resources/log4j.properties index 02f783076a..31c4ba091b 100644 --- a/test-apis-ci/src/main/resources/log4j.properties +++ b/test-apis-ci/src/main/resources/log4j.properties @@ -26,7 +26,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n log4j.logger.org.apache.cassandra.service.StorageProxy=INFO -log4j.logger.org.janusgraph.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout +log4j.logger.org.janusgraph.diskstorage.cql.CassandraTransaction=INFO, FILE, stdout log4j.logger.org.openecomp.sdc.ci.tests.utils=INFO, FILE, stdout log4j.additivity.org.openecomp.sdc.ci.tests.utils=false diff --git a/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/conf/log4j.properties b/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/conf/log4j.properties index 02f783076a..31c4ba091b 100644 --- a/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/conf/log4j.properties +++ b/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/files/default/conf/log4j.properties @@ -26,7 +26,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n log4j.logger.org.apache.cassandra.service.StorageProxy=INFO -log4j.logger.org.janusgraph.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout +log4j.logger.org.janusgraph.diskstorage.cql.CassandraTransaction=INFO, FILE, stdout log4j.logger.org.openecomp.sdc.ci.tests.utils=INFO, FILE, stdout log4j.additivity.org.openecomp.sdc.ci.tests.utils=false diff --git a/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/recipes/sanityUiTests_2_setup_configuration.rb b/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/recipes/sanityUiTests_2_setup_configuration.rb index 50a953081a..aa676a69a6 100644 --- a/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/recipes/sanityUiTests_2_setup_configuration.rb +++ b/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/recipes/sanityUiTests_2_setup_configuration.rb @@ -20,6 +20,7 @@ template "sdc-yaml-config" do :ConfigurationFile => "#{tests_base}/conf/configuration.yaml", :errorConfigurationFile => "#{tests_base}/conf/error-configuration.yaml", :CASSANDRA_IP => node['Nodes']['CS'].join(",").gsub(/[|]/,''), + :CASSANDRA_PORT => node['cassandra'][:cassandra_port], :CASSANDRA_PWD => node['cassandra'][:cassandra_password], :CASSANDRA_USR => node['cassandra'][:cassandra_user], :ES_IP => node['Nodes']['ES'] @@ -34,6 +35,7 @@ template "janusgraph.properties" do mode "0755" variables({ :CASSANDRA_IP => node['Nodes']['CS'].join(",").gsub(/[|]/,''), + :CASSANDRA_PORT => node['cassandra'][[:cassandra_port], :CASSANDRA_PWD => node['cassandra'][:cassandra_password], :CASSANDRA_USR => node['cassandra'][:cassandra_user], :rep_factor => node['cassandra']['replication_factor'], diff --git a/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/templates/default/BE-janusgraph.properties.erb b/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/templates/default/BE-janusgraph.properties.erb index a42c7bf206..31a6614910 100644 --- a/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/templates/default/BE-janusgraph.properties.erb +++ b/ui-ci/sdc-ui-tests/chef-repo/cookbooks/sdc-ui-tests/templates/default/BE-janusgraph.properties.erb @@ -1,25 +1,21 @@ -storage.backend=cassandra + +storage.backend=cql storage.hostname=<%= @CASSANDRA_IP %> -storage.port=9160 +storage.port=<%= @CASSANDRA_PORT %> storage.username=<%= @CASSANDRA_USR %> storage.password=<%= @CASSANDRA_PWD %> storage.connection-timeout=10000 -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.cql.keyspace=sdctitan +storage.cql.ssl.enabled=false +storage.cql.ssl.truststore.location=/var/lib/jetty/config/.truststore +storage.cql.ssl.truststore.password=Aa123456 cache.db-cache = false cache.db-cache-clean-wait = 20 cache.db-cache-time = 180000 cache.db-cache-size = 0.5 - -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 %>,<%= @rep_factor %> -storage.cassandra.astyanax.local-datacenter=<%= @DC_NAME %> - -storage.lock.retries=5 -storage.lock.wait-time=500 +storage.cql.read-consistency-level=LOCAL_QUORUM +storage.cql.write-consistency-level=LOCAL_QUORUM +storage.cql.replication-strategy-class=NetworkTopologyStrategy +storage.cql.replication-strategy-options=<%= @DC_NAME %>,<%= @rep_factor %> +storage.cql.local-datacenter=<%= @DC_NAME %> +storage.lock.wait-time=500
\ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/janusgraph.properties b/ui-ci/src/main/resources/ci/conf/janusgraph.properties index 94d12cfba0..9d67ed2f2f 100644 --- a/ui-ci/src/main/resources/ci/conf/janusgraph.properties +++ b/ui-ci/src/main/resources/ci/conf/janusgraph.properties @@ -1,6 +1,6 @@ -storage.backend=cassandra +storage.backend=cql storage.hostname=cassandrahost -storage.port=9160 +storage.port=9042 cache.db-cache-clean-wait = 20 cache.db-cache-time = 180000 |