Coding ache: underlying systems upgrade...

  • 16/01/2013 00:00:00

A thought about a tricky process: the patch/upgrade process. It always is a pain when it comes to it, but face it: you need to patch a system to gain new features or bug fixes. Yet, it still scares the hell out lots of people.

A thought about a tricky process: the patch/upgrade process. It always is a pain when it comes to it, but face it: you need to patch a system to gain new features or bug fixes. Yet, it still scares the hell out lots of people.

Well yeah... I do like coding. Really. It helps me with many itches.

Today I was going to deploy some major changes to our Technical Management Application (formely "Alice", as in "Alice In Wonderland" but that's another story). It's about 5 years of work so far on it. It runs on Windows, PHP and IIS (I know, some may like it not, though it's a Business need - of my own), and a MySQL database.

Since it is a major deployment, I decided to do some system upgrade as well. Consider the Windows OS is running Windows Update every week with no issue, we never had a downtime because of some incompatible update installed or security fix. Update runs on, server reboots on sunday night, on monday morning it's awaiting users for logon. Plain and simple.

Application framework is a bit more complex, as many changes tends to get through deployments, so changelog reviews is a must.

After months (sadly) I decided to do some serious updates. Therefore, I've started the process in a straight forward way:

  1. Snapshot of the virtual machine, just in case
  2. Application and database backup
  3. MySQL Database schema ALTER and massive UPDATE statements (the DB is actually ~1Gb)
  4. PHP Code upgrade via SVN
  5. PHP Binary Tree upgrade
  6. IIS Reconfiguration
  7. VMware Snapshot commitment

And that would be it... about 2 hours all. The process is straightforward and really consolidated within our company, at every single step there's a rollback point to the previous steps. So, if I had problems with the PHP Binary tree I could recover it from backup, if the code was too buggy we could rollback via SVN, if the database schema was giving issues we could recover it from database and so on.

The whole thing went really shiny, there was no real deal with deprecated code in the PHP source (actually about 50.000 lines of code) and it is still pretty performing (I have set up a 5 seconds time limit over the page execution, so it has to be fast).

Knowing the code is really useful, changelogs are vital friends of your deployment strategy. Also coding and System Administration is really important when you need to do some major upgrades. What leaves me speechless often is hearing developers whining because SysAdmins upgrades platforms and their code stops working, or vice versa, SysAdmins stating the programs have security holes or causes "unpredictable" errors within the system. Pointing finger is really useless. Both sides need to work together.

And updating opens a couple of new thoughts.

First of all is heading to the Cloud. Usually the biggest deal is: users don't like changes. Well. They don't like changes as far as you (the SysAdmin) allow them to get too lazy. Or you don't allow'em to play with their gadgets, say their iPads. Anwyas, first things first (this might be a new reflection for next days).

What will happen in the Cloud. Would a Cloud Provider really allow Software Houses to deploy applications on potentially insecure infrastructures? I wouldn't. Seriously. If I can't upgrade an operating system because your application will "possibly" stop working, there must be something wrong with your idea of the real life. You need to know what you're typing in your RAD (if you're using one, perhaps if you are using Emacs as your editor, you perfectly know what'cha doin). So, is your application breached? Give us (the Cloud Providers) a way to help you sealing it.

"Please, could you allow all the traffic of this virtual server?"

Seriously, is this help? You really do not know what is the difference between incoming traffic and outgoing? What does your application run on? Which regitry keys do you need?

Let's face it. Software Development is getting insane. "Make the user administrator", "grant ALL PRIVILEGES on this folder to all", "open all the ports on the firewall" are just some of the requests usually coming to our Service Desk. This is really insane. I can understand lazyness of my own, scripting down something to be done automagically every day to avoid doing it myself. But if I am going to develop something, I tend to study most aspects of it. Solutions are easier than it seems, you just need to know it. Perhaps the main reason is that I've been "raised" in an era where "RTFM" was the most frequent answer I got to most "stupid" questions. And that is true.

Keep your mind in shape, never allow lazyness on important things to get over you. The world turns without your help, it evolves and won't stop waiting for you, nor a bot will stop looking for holes in your application because you're begging for mercy and running a platform 2 major releases old. Grow up. Evolve. Learn. Apply. Look for help and find a solution.

Have fun and enjoy coding!

  • Contacts

Data Protection & Copyright

RIGHTS CHAIN LTD.

Networking & IT

Coming soon

Social Profile