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

Maintenance - Safe Shutdown / Preserve state after server downtime #436

Open
arunseelagan-cisa opened this issue Sep 9, 2024 · 2 comments

Comments

@arunseelagan-cisa
Copy link

Is your feature request related to a problem? Please describe.
When we need to take down the server hosting LME for maintenance purposes, what is the best way to stop the LME docker stack without completely destroying the existing containers?

We want to be able to re-run docker stack after the downtime and still have access to all the data that was present beforehand.

Describe the solution you'd like
Please add a section under the "Maintenance" section of https://github.com/cisagov/LME, where you provide guidance on how to properly stop LME in a manner that preserves state.

Describe alternatives you've considered
Tried to run "docker stop <lme_container_ids>" but the containers come right back up automatically.

docker remove commands are not a good alternative, because that would theoretically destroy all the data inside the containers.

Additional context
N/A

@aarz-snl
Copy link
Collaborator

May want to look into docker stack commands...

Something like

docker stack services lme -q | xargs docker service update --replicas 0

Which would temporarily stop the containers

And then to restart

docker stack services lme -q | xargs docker service update --replicas 1

@aarz-snl
Copy link
Collaborator

aarz-snl commented Sep 17, 2024

This worked for me:

docker service scale lme_elasticsearch=0 lme_kibana=0 lme_logstash=0

Then

docker service scale lme_elasticsearch=1 lme_kibana=1 lme_logstash=1
To restart

took about a minute to stop them, and about 3 minutes to start back up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Product Backlog
Development

No branches or pull requests

2 participants