-
Notifications
You must be signed in to change notification settings - Fork 197
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 example #11109
base: master
Are you sure you want to change the base?
Maintenance example #11109
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
I have not tested this, but it looks good from a first pov 👍 When added, I will do a docs update of our deployment example in the admin docs Functionality wise, you enable maintenance mode, change the image versions in the respective containers and do a |
I think I'll need a step-by-step guide for dummies, just to make sure what are the expected actions. There are mainly 2 important phases to take into account:
I've noticed that when the ocis container is down, the web client receives 404 instead of the expected 503 even with maintenance mode active. This might be a problem for the clients which might assume that the maintenance mode is gone. Some configuration might be missing in order to make it work the way we want, so I'll need to have a look. For running the upgrade scripts, I'll have to check. I expect them to be run on the first run of the new container, before the server has started. For testing, I'll need one that takes long enough that allow us to check how the web behaves. |
traefik.enabled must be true in the traefik container in order for other containers to get access to the configured maintenance plugin
We need to use file configuration in order to setup an empty service where the requests will be routed if the containters are down. Maintenance configuration will be also setup in there for convenience. Router configuration for the "unavailable" service is in the docker's labels because we want to skip the routing for traefik in case the dashboard is enabled, although it might not be needed.
f215f08
to
1dfee4c
Compare
|
This should be fixed now.
For now, only oCIS, Collabora and OnlyOffice are setup with the maintenance mode. The only problem is that a lot of services are within oCIS and they might access each other through traefik. This means that even though the command could be run, it could get a 503 error. I'm pretty sure this will also affect upgrade scripts that are run in maintenance mode. In this regard, we'll probably need to document that the maintenance mode (within the scope of the "ocis_full" deployment) should be enabled from oCIS 7.1+ Upgrading from earlier versions with maintenance mode enabled might not work properly (depending on what the upgrade is doing, we'd need to test each possible upgrade) |
Description
Add maintenance page to the ocis_full deployment.
In order to switch on the maintenance mode:
/maintenance/content.txt
file inside the traefik container if it doesn't exist. Write any type of plain text content in the file (just an "Under maintenance" is good enough)/maintenance/content.txt.trigger
. This will switch on the maintenance mode/maintenance/content.txt.trigger
file.For convenience:
docker exec -ti ocis_full-traefik-1 sh -c 'mkdir -p /maintenance && echo "Under maintenance" > /maintenance/content.txt && touch /maintenance/content.txt.trigger'
docker exec -ti ocis_full-traefik-1 sh -c 'rm /maintenance/content.txt.trigger'
Note that the maintenance mode will be "active" for the ocis, collabora and onlyoffice containers, which are expected to be exposed to the outside. The rest of the containers, which should only be accessed internally, will be accessible as usual. They might not work properly though because they might need to access to the ocis container.
Related Issue
Part of owncloud/web#10260
Motivation and Context
The maintenance page is expected to be handled by traefik in this case. This PR just adds the proposed configuration.
How Has This Been Tested?
Manually tested. Enabling the maintenance mode makes the server responses to start sending 503 codes.
Screenshots (if appropriate):
Types of changes
Checklist:
Note that the dashboard has been slightly touched.
The
traefik.enable=true
is required so other containers can see the maintenance plugin configuration, otherwise the "ocis" and "collabora" containers won't be able to find the maintenance plugin.In that regard, the dashboard will only be enabled if
TRAEFIK_DASHBOARD=true
, as intended.