Last time I showed how I set up a project in TaskJuggler.
Now it is time to add in the tasks.
Thinking about what I want to achieve, the project goes something like this:
The Project
Update the operating system on the database server
Update the development database server during the patching window.
Run a test to make sure it works. This includes
People using it during the day.
An automated test running overnight.
Assuming it all works, update the test database server during the patching window.
Run the same tests as above
Update the UAT database server during the patching window
Run the tests
Update production during the patching window.
Patch the databases
This looks very similar to above
Patch the development and test database during the patching window.
Test
Patch the UAT database during the patching window
Test
Patch production during the patching window.
Update the Application and web tier VMs
This is very slightly different, because production and UAT have redundant configurations.
Update the development VMs during the patching window
Test
Assuming it all works, update the test VMs during the patching window.
Test
Drain half the UAT web servers at the load balancer
After about a day, update them.
Undrain the first half and drain the second half
After about a day, update the second half, and undrain them.
Run the tests
Drain half the production web servers at the load balancer
After about a day, update them.
Undrain the first half and drain the second half
After about a day, update the second half.
How to schedule
So in the three mini projects I have above, each task is dependant on the one above. But also, they have
dependencies between the tasks. For example I have decided that I don’t want to do unix updates on the
database server at the same time as we are updating the VMs, as the VMs won’t start properly if the
database server is down. I also can’t do database patching on a database server if it is being
restarted for the operating system updates.
At first this seems difficult to schedule. How can I make sure these rules are followed while still allowing
the patching window to be used by other parts of the project where there aren’t clashes.
I solved this by deciding which order to start the projects, and then making the update or patching
task of the second one dependant on the testing phase of the first one. Here it is in TaskJuggler
code:
The schedule
Update the operating system on the database server
I allocate the system, which has an efficiency of 0, so can’t do anything, but is needed to perform the task.
I also allocate the person (or team) doing the task. I put them as mandatory, otherwise TaskJuggler just seems
to pick one of them.
I add the effort, which in this case isn’t that important in this case.
I add in the dependencies. Because the patching window is in the morning, and the testing happens in the night
this enforces only one system being patched per day. As I say it doesn’t necessarily matter whether
I update the DB server OS, VM OS or Database software first, but I do have to pick one to make the
scheduling work.
A useful feature is the gapduration. I used this to make sure I don’t update the production VMs at the same time
as the production database, because I can’t use the trick of the test suite because it doesn’t run in production.
Also, when we put the web servers on drain in the load balancer we need to wait about a day for people to stop using them.
Setting the gapduration is perfect for this requirement.
All we have to do now is to set up the reports and run them! I will talk about reports next.