datastax / cassandra-quarkus

An Apache Cassandra(R) extension for Quarkus
Apache License 2.0
39 stars 28 forks source link

Feature Request: Add Devservices for Cassandra #199

Open BiggA94 opened 2 years ago

BiggA94 commented 2 years ago

Since Quarkus 2.0 there are DevServices for some Plugins (DBs, Kafka, etc., e.g. https://quarkus.io/guides/datasource#dev-services-configuration-free-databases), see https://quarkus.io/guides/dev-services. They start a Container in docker, where you don't have to config something for it to run.

Also needed for this is a way to create the Schema on startup, possibilities:

This would make usage of cassandra in Quarkus way easier, as one would not need to run multiple docker commands on every startup/change.

┆Issue is synchronized with this Jira Task by Unito

edeandrea commented 2 years ago

I would also like to see this.

adutra commented 2 years ago

Thanks for reporting this, we are going to evaluate the suggestion.

In the meanwhile, have you tried to use our test framework?

edeandrea commented 2 years ago

I haven't but Dev Services is more than providing a running container at test time. It also kicks in when running Quarkus Dev Mode.

adutra commented 2 years ago

I know :-) I was just suggesting a temporary workaround.

maxandersen commented 2 years ago

@adutra anything we can do to help here ?

adutra commented 2 years ago

@maxandersen unfortunately I'm very busy working for other projects right now and won't have time to look into this in a short-term time frame. If you have time to come up with a working prototype I'd be happy to review/test though.

coiouhkc commented 1 year ago

Hi @adutra , I recently gathered some experience writing a DevService for Mosquitto, is it OK if I try?

adutra commented 1 year ago

I recently gathered some experience writing a DevService for Mosquitto, is it OK if I try?

@coiouhkc absolutely, be my guest :-)

Also note that I'm not officially working on this project anymore, but I would gladly review your PR.

\cc @absurdfarce

coiouhkc commented 1 year ago

Started working on it in https://github.com/coiouhkc/cassandra-quarkus/tree/feature/cassandra-quarkus-199-devservices, will raise a PR, once review-ready.