jboss-fuse / spring-boot-camel-xa

6 stars 16 forks source link

Integration of JTA compliant transaction manager into k8s #8

Open davesargrad opened 4 years ago

davesargrad commented 4 years ago

I've found this github project in my search for a JTA/XA compliant transaction manager that can operate on k8s and interact with camel-k.

I am struggling to find a good online example.

I found spring-boot-camel-xa here. That article discusses narayana on openshift. I am currently looking at narayana or atomikos, for a prototype system.

Any suggestions would be massively appreciated.

davesargrad commented 4 years ago

Hi @nicolaferraro

I noticed that you committed to this project. Its exciting to see that you've got some knowledge of JTA. You've been quite helpful relative to camel-k integration. Perhaps you can comment on this, and give me some guidance (assuming that you've been down this road).

davesargrad commented 4 years ago

Hi @nicolaferraro

Assuming that I want to get a springboot enabled camel transaction manager running on k8s (not OC), perhaps you can help me figure out the few commands that I must run?

Based on a quick look at spring-boot-camel-xa, I am assuming I must create a PVC, and a statefulset. I may also need to get POSTGRESQL up and running on my cluster

So at the very least it would seem that the following descriptors are pertinent.

https://github.com/jboss-fuse/spring-boot-camel-xa/blob/master/persistent-volume-claim.yml

statefulset: https://github.com/jboss-fuse/spring-boot-camel-xa/blob/master/src/main/fabric8/statefulset.yml

I'm not sure what a booster is. I dont understand the booster related commands that are shown here. image

Are there a few thoughts that you can provide relative to helping me figure out the steps and commands that are needed on a k8s cluster.

Thanks. Dave

nicolaferraro commented 4 years ago

Hi, this repo contains code for Red Hat Fuse, hence it gives instructions for OpenShift only (boosters are a OpenShift quick way to create apps from source).

Anyway, I think this can work on Kubernetes as well, you need to change the way you provision postgres and the AMQ broker, then creation of the PVC and deploy with the fabric8-maven-plugin should work the same.

davesargrad commented 4 years ago

Hi @nicolaferraro That, of course, makes sense. Thanks that helps! I'll see what I can do.

nicolaferraro commented 4 years ago

For the recovery controller to work, the PV should be shared among all pods and that feature is not available in many vanilla kube installations.

If that's the case, you can't scale out to more than 1 replica, but it should work well with a single one. Alternatively you can change the config to use multiple PV, one for each per pod of the statefulset, but you should keep the number of replicas constant, otherwise you may lose transactions on scale down.