docker-ejabberd
docker-ejabberd copied to clipboard
Kubernetes working example
Hi @rroemhild,
The working example I promised I only could finish today. There is a README.md with all I could put together.
I created a folder 'kubernetes' with all needed to deploy the working example. I was unable to build the image from the main Dockerfile duo to an error that I couldn't figure why. so I created another image based on the main rroemhild/docker-ejabberd and uploaded as ccpereira/ejabberd-k8s:0.0.1.
As request, a new Enviroment variable criated: EJABBERD_AUTO_JOIN_CLUSTER:true/false. if set to false, the image will behave as the original one.
I changed the script from the docker-compose-cluster example to an new one
- 100_ejabberd_join_cluster.sh
Some other small changes to:
- base_functions.sh
- functions.sh
- run.sh
The cluster is able to work on the k8s cluster, and join the nodes automatically. It works in the following way:
Any node that is not the first of the deployment, will search for other nodes to join the cluster.
I hope that will be useful, ping me if anything is not right, or in case of doubt.
regards,
Hi @claudiocleberson, sorry I had no time to look into this or even try it. Is it possible to integrate your changes into base, so that we do not need to images or duplicate code. What is the error you get with the main Dockerfile?