[3.4.2] Cassandra cloud connects to Datastax Astra DB#7110
Closed
smatvienko-tb wants to merge 1 commit into
Closed
[3.4.2] Cassandra cloud connects to Datastax Astra DB#7110smatvienko-tb wants to merge 1 commit into
smatvienko-tb wants to merge 1 commit into
Conversation
…ENT_ID and CLIENT_SECRET
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cassandra cloud connects to Datastax Astra DB
This PR allows connecting to Cassandra on the cloud (Datastax Astra DB)
Decoupled 'CREATE KEYSPACE' into a separate service. For cloud, we have to create keyspace manually using cloud UI, then create a user and token to access the cloud.
Refactored GuavaSessionBuilder and GuavaDriverContext: deprecated constructor replaced to support the newest features, like cloud bundles.
new env vars in YAML:
The result is on the screenshots:



You need a 'Database administrator' role to install the Thingsboard schema

Schema install for on-premise Cassandra got a new line

schema-keyspace.cql:For the cloud install is running without creating keyspace:
Before decoupling keyspace creation, cloud install fired exception:

Before refactoring GuavaSessionBuilder and GuavaDriverContext the cloud connection failed like that:
The total spending during the test takes about 8 hours with 3k telemetry points per second:

Test with
docker-compose.yml:Performance test to put some telemetry:
docker run -it --rm --network host --name tb-perf-test \ --pull always --log-driver none \ --env REST_URL=http://127.0.0.1:8080 \ --env MQTT_HOST=127.0.0.1 \ --env REST_USERNAME=tenant@thingsboard.org \ --env REST_PASSWORD=tenant \ --env DEVICE_END_IDX=1111 \ --env MESSAGES_PER_SECOND=1000 \ --env DURATION_IN_SECONDS=86400 \ --env ALARMS_PER_SECOND=1 \ --env DEVICE_CREATE_ON_START=true \ --env TEST_PAYLOAD_TYPE=SMART_METER \ thingsboard/tb-ce-performance-test:latestGeneral checklist
Front-End feature checklist
Back-End feature checklist