Uh oh!
There was an error while loading. Please reload this page.
Add scylladb module - #8002
Conversation
guy9
commented
Jan 7, 2024
Thanks @mkorolyov , interested in this as well |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mykaul
commented
Jan 14, 2024
I wish there was a way NOT to provide your own scylla.yaml, but merge your defaults with the default scylla.yaml - the end result is that you might be missing some new defaults if you bring your own scylla.yaml. |
fix typos in docs Co-authored-by: Yaniv Kaul <yaniv.kaul@scylladb.com>
mkorolyov
commented
Jan 16, 2024
This looks like a separate feature for merging config files. Usually what I used to see in a majority of the applications is that you are using the default config file and overriding it with ENVs or flags or providing your own config file. Providing own config file which will still be merged with some default looks like implicit behavior which in my opinion will confuse users. WDYT? |
guy9
commented
Jan 21, 2024
Any updates on merging this? |
mykaul
commented
Jan 23, 2024
Yes, my ask is exactly this - let's use the default Scylla YAML that comes with Scylla, and allow overriding values in it. |
| this.enableJmxReporting = false; | ||
| withEnv("CASSANDRA_SNITCH", "GossipingPropertyFileSnitch"); | ||
| withEnv("JVM_OPTS", "-Dcassandra.skip_wait_for_gossip_to_settle=0 -Dcassandra.initial_token=0"); |
There was a problem hiding this comment.
those are not relevant to scylla, you need commandline option for skip_wait_for_gossip_to_settle
| addExposedPort(CQL_PORT); | ||
| this.enableJmxReporting = false; | ||
| withEnv("CASSANDRA_SNITCH", "GossipingPropertyFileSnitch"); |
There was a problem hiding this comment.
I think this needs to be checked, scylla docker doesn't use this variable
vbazhmin
commented
Jun 7, 2024
Hello folks. Any updates on this one ? ;) |
eddumelendez
commented
Aug 1, 2024
Hi, I'll review the PR once the other comments have been addressed. It is great seeing Scylla team reviewing the PR. |
fruch
commented
Aug 1, 2024
hopefully it won't be dragged like it's counterpart: |
eddumelendez
commented
Aug 14, 2024
@fruch LMK once this is ready to review and will do it as soon as possible. I still see some comments that hasn't been resolved. So, that's the reason why I haven't reviewed yet. |
eddumelendez
commented
Oct 16, 2024
Hi, I know this is still in progress because I see some comments unresolved. But, JFTR it would be nice to add an integration test enabling ssl and add it to the docs. |
eddumelendez
commented
Dec 17, 2024
I'm updating the PR based on testcontainers/testcontainers-go#2919 |
mkorolyov
commented
Jan 3, 2025
Hi @mykaul, I've looked into implementing your suggestion, and it seems there are a few challenges with achieving this functionality:
While this method works, it feels like a bit of a hack to me, and I’m not entirely comfortable with introducing such a workaround into the workflow.
Given these constraints, do you have other suggestions for achieving this functionality? Specifically, how can we ensure the availability of an up-to-date configuration file while maintaining simplicity and compatibility with the existing workflow? Looking forward to your thoughts! |
mkorolyov
commented
Jan 3, 2025
@eddumelendez Hey, thanks for stepping in and polishing PR. Just asking, why you removed custom config file related changes? |
mykaul
commented
Jan 5, 2025
@mkorolyov - thanks for looking into this. I think your point no. 1 makes a convincing argument - it's trivial to just pass a yaml file, it's quite standard, so anyone using the Scylla testcontainer can do it. Let's just document it. |
mkorolyov
commented
Jan 5, 2025
@mykaul Hey, added possibility to easily replace config file for test container and documented it. @eddumelendez Hey, added ssl integration test and documented it. Could you pls take a look so we could proceed with it? Appreciate your help and time! |
| } | ||
| @Test | ||
| public void testSslConfiguration() { |
There was a problem hiding this comment.
@mkorolyov this test fails. Lacking ssl configuration? default image doesn't provide those env vars
There was a problem hiding this comment.
it was committed by mistake. cleaned that up, thanks!
| } | ||
| @Test | ||
| public void testSimpleSsl() |
There was a problem hiding this comment.
Thanks for adding this! I think cql cli command would not work unless is configured properly. We should configure it properly when ssl is enabled https://opensource.docs.scylladb.com/stable/operating-scylla/security/gen-cqlsh-file.html
There was a problem hiding this comment.
@eddumelendez yes, if ssl enabled on the server for client connections in order to cqlsh to work we need to configure ssl for it too, but it is not used here, in test containers, right? I didn't get your point, could you pls clarify what else you would like to see in this PR? thanks!
There was a problem hiding this comment.
Users can execute commands using via execInContainer method provided by Testcontainers API. Testcontainers should provide a proper configuration for the container to run properly. In this case, external clients will connect properly because the sdk client is configured but not inside the container. I think we should fix that.
There was a problem hiding this comment.
I've added a test example how to make cqlsh work with same ssl setup.
There was a problem hiding this comment.
Thanks! WDYT about adding withSsl(MountableFile certificate, MountableFile keyfile, MountableFile truststore) and copy those files as part of ScyllaDBContainer. If so, then create the cqlshrc.
ScyllaDBContainerscylladb = newScyllaDBContainer(SCYLLADB_IMAGE)
.withConfigurationOverride("scylla-test-ssl")
.withSsl(certificate, keyfile, truststore)There was a problem hiding this comment.
@eddumelendez Sure, added withSsl. Also used SSL_CERTFILE env variable instead of rewriting cqlshrc file as there could be issues with the connection hostname specified in the file and also it simplifies setup.
mkorolyov
commented
Jan 23, 2025
@eddumelendez Hey, could you please take a look? I've updated PR according to your suggestions. |
eddumelendez
left a comment
There was a problem hiding this comment.
@mkorolyov we are close. I left one more comment related to the truststore given it is optional.
| return this; | ||
| } | ||
| public ScyllaDBContainer withSsl(MountableFile certificate, MountableFile keyfile, MountableFile truststore) { |
There was a problem hiding this comment.
truststore is optional. See https://opensource.docs.scylladb.com/stable/operating-scylla/security/client-node-encryption.html#validate-the-clients. So, we should provide another methodwithSsl(MountableFile certificate, MountableFile keyfile)
There was a problem hiding this comment.
nice catch! thanks, fixed this one
There was a problem hiding this comment.
I have reverted this because truststore must be at the system truststore and in order to do that we need to copy the file too. Sorry about that.
Uh oh!
There was an error while loading. Please reload this page.
eddumelendez
commented
Jan 31, 2025
Thanks for your contribution, @mkorolyov ! |
ScyllaDB is an open-source distributed NoSQL wide-column data store. It gains wide popularity as a drop-in replacement for Cassandra but a significantly faster one.
This PR adds the ScyllaDB module.