kelseyhightower / jira-on-kubernetes

Notes: Running Atlassian's Jira on Kubernetes
67 stars 39 forks source link

But the question is can it scale? #3

Open asakapab0i opened 5 years ago

asakapab0i commented 5 years ago

Can we replicate the jira node multiple times and still works? Sorry for the stupid question but I just want to know.

hoeghh commented 5 years ago

No, jira server does not support horizontally scaling.

asakapab0i commented 5 years ago

@hoeghh , but JIRA Data Center does right? Have you tested the DC in kubernetes already? Does it work?

hoeghh commented 5 years ago

@asakapab0i yes data center works but needs alot of configuring. We have done it in a project called ask. Let me know if you have questions.

https://www.praqma.com/services/ask/

asakapab0i commented 5 years ago

@hoeghh How do you handle index in each individual node? (Local home directory index). Do you transfer them or you just let the newly spun up node to rebuild the indexes?

I'm also trying to find out how to deal with the home directory and dbconfig.xml.

hoeghh commented 5 years ago

@asakapab0i Data center takes care of this for you. They share the index between them. You need to setup the volumes correct. We made a blogpost about it here : https://www.praqma.com/stories/ask/

scottohara commented 5 years ago

@hoeghh Sorry this is a bit off topic, but if you don't mind me asking, how does ASK handle Data Center node discovery?

I've been attempting to get Confluence Data Center running on GKE (for test/eval purposes, definitely not for production), and the bit I'm stuck on is getting new nodes to discover each other.

I'm not sure if JIRA is the same, but you may recall that Confluence DC supports two discovery modes:

Using the default multicast option, after getting the first node setup, when I attempt to scale my statefulset to 2 replicas (kubectl scale --replicas=2 statefulset confluence), the new node doesn't discover the first one; resulting in a split-brain and the error message:

Database is being updated by an instance which is not part of the current cluster.
You should check network connections between cluster nodes, especially multicast traffic.

Using tcp_ip, obviously I can't know ahead of time what each pod's IP will be. However, during setup of the first node (before choosing a discovery mode), I do know what that pod IP is, and I can use that.

Then I am able to scale successfully to a second replica, and everything runs quite happily with 2 nodes.

Unfortunately, if I then try to scale to a third replica, when it comes up the second one immediately dies and restarts. Once the second replica comes back, the third one then dies/restarts... and this flapping continues indefinitely.

(I'm assuming this is because 2nd/3rd nodes don't have their IPs listed in the confluence.cluster.peers property.)

Just wondering if you could share any tips on how you managed to do it; and if you're using multicast was there anything special you needed (e.g. a headless service, or some special network policy to allow the nodes to find each other via the multicast address)?

hoeghh commented 5 years ago

@scottohara Sorry for the late response. I've been super busy lately.

ASK is a product that we try to sell, so i cant give you concrete code. I hope it will be release as an opensource project at some point.

But, the idea is that you can ask a service for endpoints. These endpoints should be used by the HazleCast cluster software used by Jira Data Center.

The Docker image in this repo does not have the mechanism you need to do that. Others on the Docker hub does.

Jira-1 does not need the IP of Jira-2 to start up. But Jira-2 needs the ip of Jira-1. If Jira-1 is stopped and rescheduled, it now needs the IP of Jira-2 if that exists. Hope you get the point.

With Confluence we use the Tcp_ip option.

scottohara commented 5 years ago

Thanks @hoeghh, I appreciate the help (and I totally understand that this is ASK's "secret sauce", and something you prefer not to share at this point).

For what it's worth, recent versions of Hazelcast support a new SPI discovery mode; and there is an open ticket with Atlassian (currently in the "Gathering Interest" status) to have Confluence work with this new mode.

If this does come to fruition (possibly with Confluence 7.0?), it should hopefully make running Data Center on Kubernetes and OpenShift much simpler to setup.

Bonn93 commented 5 years ago

I built a stateful set that does scale. https://github.com/Bonn93/atlassian-kubernetes/tree/master/jira

hoeghh commented 5 years ago

Ask is now open source.

(The link name is wrong, Atlassian did not open source it, we did) https://www.google.com/amp/s/techcrunch.com/2019/05/21/atlassian-puts-its-data-center-products-into-containers/amp/

More info here with links to repos : https://www.praqma.com/products/ask/

Helm charts can be found here : https://github.com/Praqma/ask