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

Add maintenance mode! #466

Merged
merged 1 commit into from Jul 11, 2019

Conversation

@Matt-Yorkley
Copy link
Collaborator

commented Jul 4, 2019

Fiiiiinally...

maintenance

It's pretty basic, but it's better than nothing. This will be really handy for downtimes, like with the v2 rollout.

Usage examples:

ansible-playbooks playbooks/maintenance_mode.yml --limit uk-prod
ansible-playbooks playbooks/maintenance_mode.yml --limit uk-prod -e "disable_maintenance=true"
ansible-playbooks playbooks/maintenance_mode.yml --limit es-prod -e "maintenance_mode_message='Os dia! Donde fue el sitio!? No pasa nada, estamos manteniendo el servidor...'"

Tested on UK staging ✔️

@Matt-Yorkley

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 4, 2019

The message is in English by default, but the variable maintenance_mode_message can be set in instances' respective config.yml files with a custom localised message.

A custom message can also be set on-the-fly when maintenance mode is enabled (see example above).

@Matt-Yorkley Matt-Yorkley force-pushed the Matt-Yorkley:maintenance_mode branch from f072d9d to 4f30b50 Jul 4, 2019

@Matt-Yorkley Matt-Yorkley self-assigned this Jul 4, 2019

@luisramos0
Copy link
Contributor

left a comment

ahaha, nice 🎉

@sauloperez

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

Lol message

@mkllnk

mkllnk approved these changes Jul 4, 2019

Copy link
Member

left a comment

Nice! Looks really good.

@mkllnk

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

Interesting, the fuubar error was triggered on Travis now. I guess we should rebuild with the patch.

@Matt-Yorkley Matt-Yorkley force-pushed the Matt-Yorkley:maintenance_mode branch from 4f30b50 to 8b9a102 Jul 11, 2019

@sauloperez

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2019

I added this in https://github.com/openfoodfoundation/ofn-install/wiki/Deployment-of-v2#deployment feel free to fix anything, meanwhile I merge this.

@sauloperez sauloperez merged commit 506b043 into openfoodfoundation:master Jul 11, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RachL RachL referenced this pull request Jul 11, 2019

Closed

Enable a maintenance mode #3778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.