Mogdesign UK Ltd.
37 Clarence Street
+421 35 381 02 16+421 35 381 02 16
3/3 Using Aegir to manage a large amount of sites
After all your fancy new sites are up and running, you need to maintain them. Aegir itself is a well-built tool to do that of course, but still there are some nifty hints to make one admin happy.
Updating and upgrading code
Aegir offers a very nice feature for updating and upgrading your code. If you are updating, it’s a no-brainer: - just update the code on the server and you are good to go. But when you upgrade, simply create a new platform, give it some nice version number and migrate all your existing sites to this new platform. Aegir will automatically create a database snapshot before the migration takes place so you can revert anytime you discover a problem.
Some helpful notes:
- update.php is automatically run
- it’s possible to run migrations in bulk, or even migrate the whole existing platform to another one
Running stuff on existing sites
Have you ever had to turn on a module on a site? Or run updates.php? Or clear all cache? If not, then you are a Drupal baby I guess. Anyway, I think everyone has realised where this is going by now. Clearing cache on 150 sites is not a trivial task. Aegir has no support for the above mentioned procedures so we have to deal with it somehow. It’s really simple. Just run drush script for all your sites and it’s done.
for site in *.mydomain.com; do drush cc all --uri=$site -y; done
drush @sites cc all -y
I really like the power and simplicity of this one-liner, feel free to be a genius and use it instead of insane clicking.