Setting Moodle into maintenance mode is now quite effortless and a bit fun as well.
I created a home cooked idea using our Traffic Manager and its Rule processing capabilities. The idea is this: using the maintenance rule attached to the Virtual Server the user is sent an "In Maintenance" page. This page also has the capability of refreshing on a given interval. So the user can set it there and then come back in a few minutes to check again.
Why bother? Maintenance is maintenance - right?.
Here's my take. I'd rather see something than get the - Firefox can't find the server at moodle.iup.edu - message back from my browser.
Here's how this can be done:
- Create your custom html maintenance page. And upload it to the Extra Files area of your TrafficManager.
- Create your maintenance pool. Use any (or all) of your production pools nodes, only this time pick a random port not in use (ie: 8888). Place all nodes in drain mode, you will have to check the box to confirm this action. Adjust these settings under the pools 'Connection Management' area.
- keepalive = no
- max_connect_time = 1
- max_reply_time = 1
- error_file <- here is where you select you maintenance file
- Now create a new "Maintenance Mode" rule with the following Actions
Choose Pool (your maintenance pool)Save your new rule. - Using Services -> VirtualServers Select your server. Under the rules area add your new Maintenance Rule. You can
EnableorDisablethis rule in the future from here with no other changes to the VirtualServer
Pretty slick, now you have a, on-the-cheep, Maintenance page with little effort.
Note: I have created this environment using the zxtm-lb version of the TrafficManager. This provides some inflexibility when serving image content. For my Maintenance Page I host the two images on an outside of zxtm web accessible space.With full zxtm version you would not need to store images else where.
Posted by Kevin Foote in zxtm on December 10, 2009

