The decalogue of the sysadmin

Hi everyone, today i want to talk about the WikiToLearn’s relase strategy.

The basic idea: data is the most important thing, after data there is data access (read and write).

One thing to know about wiki’s structure: it is based on docker (1 webserver, 1 database, 1 mathoid, 1 memcache, ecc ecc).

All these servers are exposed to internet through a docker with haproxy that also deal with the encryption.

Dockers have a name, in the default setup the name starts with “w2l-dev” and this name is for the development environment.

In the scripts the override of this name is permitted,  to allow multiple instance co-exist in the same host up and running at the same time.

These things allow us to use this relase script:

  1. put the site in read only state
  2. create a backup
  3. create the new environment with the new version of software
  4. restore the last backup
  5. do updates on database
  6. bring up the new instance with an haproxy restart

Can only work because of docker and if size of backups isn’t too big.

What benefits from this stuff?

So, the best thing with this script is about the rollback: we don’t have to modify the env before we are successfully done with the relase.

Another thing is the site uptime: with this way to deploy we can be online during the entire process. Someone can say “but you are readonly!” and my replay is “yes, but not for 1 week, only for some minutes”.

I think all the downsides are a reasonable price to meet the Decalogue of the sysadmin:

  1. Do backups
  2. Do backups
  3. Do backups
  4. Do backups
  5. Do backups
  6. Do backups
  7. Do backups
  8. Do backups
  9. Do backups
  10. Do backups

Not to mention the golden rule “Make backups , stupid!”.

For today is all, see you the next time.