Last update on .

My website has been languishing without updates for too long. Here I mean both in terms of content and in terms of the underlying software. This entry is intended to start fixing the content, assuming I can make myself sit down and write. (I have trouble writing about things before I feel they're "finished").

Much more interesting at the moment is the software. After letting the server languish for almost two years without updates (it was running Django 1.6 - the current release is 1.9 - yikes!), I decided it was probably better to wipe it and start again. This time, I was going to build a self-updating system.

The server is running debian and apt has an unattended upgrades faculty. So that takes care of the full system.

Django and the python software used to run the server is a different problem. Much of it is not in apt and is instead installed via pip, the python package manager. Unlike apt, pip has no built-in automatic upgrades function. Additionally, django sometimes introduces breaking changes - especially across minor version number changes.

So there are several needs here:


  • Use pip to automatically update a virtualenv

  • Test updates before putting them in production

Additionally, this would be a nice time to version control the files of my website - at least those that aren't binaries.

So I've put together a new repo on github. The buildenv.sh script builds or updates a virtualenv. The django-autoupdate script uses this to update a test environment, validate basic function, then update a production environment.

While it works for now, the testing is a bit weak - it just checks that the homepage functions. Django allows a full test suite, so I really should be using that. Also, there are multiple application within the website - not all of which are used on the homepage.

Oh well, work for the future.

Discussions :

Comments

Similar entries

Proudly powered by Django
Site design by Kyle M.