Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data persistence in swarm (Wiki) #991

Closed
nmathew98 opened this issue Jun 7, 2024 · 5 comments
Closed

Data persistence in swarm (Wiki) #991

nmathew98 opened this issue Jun 7, 2024 · 5 comments
Labels
documentation Issues with or potential improvements to the project's documentation

Comments

@nmathew98
Copy link

nmathew98 commented Jun 7, 2024

there is a section in the wiki about data persistence when scaling out the elastic cluster: https://github.com/deviantony/docker-elk/wiki/Elasticsearch-cluster#data-persistence

in Elastic v8 onwards, the way to do it is to set the path.data configuration as part of env vars: https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#path-settings

in docker swarm, this would be like so:

image

path.data configuration: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#data-path

@antoineco
Copy link
Collaborator

Thanks for the hint! If you feel like contributing that change the wiki can be edited by anyone. Otherwise I'll do it sometime next week.

@nmathew98
Copy link
Author

nmathew98 commented Jun 7, 2024

sweet, will get around to it tomorrow

i might add a recommendation to use nginx for port mapping and securing as well?

in swarm mode the best way is to use nginx in front for ingress I think, using target, published works but the cluster nodes can find each other but can't connect (see: https://stackoverflow.com/questions/77631583/elasticsearch-cluster-using-docker-swarm-with-three-nodes-on-three-separate-serv which is the cause I think):

image

and using socat to forward doesn't work so well even if you use valid ssl certs on elastic, was getting errors. best way I found was to use self signed certs on elastic and put the valid certs at nginx

image

@antoineco
Copy link
Collaborator

We had a request to add this once as part of

In my opinion deployment concerns are out-of-scope for docker-elk. There are a lot of ways to expose web applications securely over a network, and we are better off staying away from opinionated recommendations in this project, especially since the main focus is on single-host deployments via Docker Compose.
The instructions for Swarm are a leftover from a time where we did have a Swarm configuration in the project, but this configuration didn't fit very well into the project. I left the instructions in the wiki nevertheless, for educational purposes.

@antoineco antoineco added the documentation Issues with or potential improvements to the project's documentation label Jun 8, 2024
@nmathew98
Copy link
Author

wiki's been updated

@antoineco
Copy link
Collaborator

Thank you for your contribution, much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues with or potential improvements to the project's documentation
Projects
None yet
Development

No branches or pull requests

2 participants