Aegir
half-way through a big refactor. todo; move things from here to other places.
Aegir is a site management distribution.
Overview
Aegir is a Drupal Distro that uses the Hostmaster front-end to control the Provision module with its Drush integration. Aegir uses Drupal multisite features to share one Drupal codebase install as a Platform which multiple Sites can be hosted on. If you want to create a site for a particular Distro, you install the Distro as a Platform then create a Site on that Platform.
Content can be shared (migrated) between Sites using an updated or alternate platform with managed module dependance.
Dev/production workflow
- Drupal deployments & workflows with version control, drush_make, and Aegir (mig5, Oct 28 2009)
- Using drush hosting-import to auto-create your platform node (and other entities) (mig5, Jan 11 2011) - Updated workflow on Aegir mailing list
- From Zero to Distribution using Features, Profiler, and Drush Make (dimitri, March 9, 2011)
The Profiler library is installed with the .make and uses a .info file to specify modules to be initialised, including site sections/etc. from the Features module plus configuration settings via the Strongarm module. Provision initialises a site on that platform and installs the platform+site in Aegir.
Features and theme are stored using Git, --working-copy can be used to build a dev site then content can be migrated from live for testing. Dev platform is perfected, then rebuilt as live without --working-copy.
todo; use hosting_site_git and working-copy patch
the basics;
drush make --working-copy "$PROJECT_MAKE" "$PLATFORM_PATH" drush provision-save "@platform_"$PLATFORM_NAME"" --root="$PLATFORM_PATH" --context_type=platform drush @hostmaster hosting-import "@platform_"$PLATFORM_NAME"" drush provision-save "@$SITE_DOMAIN" --uri="$SITE_DOMAIN" --context_type='site' --platform="@platform_"$PLATFORM_NAME"" --profile="$PROJECT_NAME" drush "@$SITE_DOMAIN" provision-install drush @hostmaster hosting-task @platform_"$PLATFORM_NAME" verify --force "$VERBOSE_MODE" drush user-login
drush @hostmaster hosting-dispatch drush -y @hostmaster vset hosting_queue_tasks_frequency 1
Hostmaster
Creating a platform
Use a build make file to call the main make (possibly on-top of a base profile).
Creating a site
Things to remember for a site build:
- Don't forget full domain name!
- Create dev.* alias for BOA cache-busting
Importing a site
- http://community.aegirproject.org/content/importing-complete-drupal-platform
- http://community.aegirproject.org/content/importing-existing-aegir-backups
- remote_import - Drush extension that allows you to fetch remote sites from remote Aegir servers
- http://drupal.org/project/hosting_remote_import hosting_remote_import] - module that provides a UI for remote_import
Clone sites
Aegir provides an easy method of making entire copies of a site. This includes the actual site files, modules and so on, as well as a copy of the actual database. This feature is called 'Clone' in Aegir, because it is a method of duplicating a site with a new URL or 'site name'.
The feature is very closely linked to the Migrate feature because it is almost the same, except that rather than move the site, it leaves the existing site in place and just copies it to a new name. For this reason, enabling the Clone feature also enables the Migrate feature.
Migrating and updating platforms
- Migrating/upgrading and renaming websites
- Migration Tips
- The best recipes for disaster and how to avoid them
To upgrade core or modules, build a new platform with the upgrades, then migrate sites to the new platform. Clone and migrate to test before.
Be careful about creating additions or changes in sites/*/modules, sites/*/themes, etc. Migrate tasks will fail due to path issues.
"No, really, don't use sites/domain-name/modules for anything and save yourself headaches and frustration." ... OK, so what is the correct workflow for sites upgrades in Aegir? It highly depends on how you manage your code, but some general rules are always valid and we will list them below:
- Create or choose new platform.
- Upload all your contrib modules and themes to the new target platform.
- Re-verify the target platform in Aegir.
- Clone your live site with some working subdomain in the old platform.
- Re-verify old platform and also just cloned site.
- Migrate cloned site to the new platform.
- Check if the cloned site works without any issues.
- If the step 7 above works, you can safely migrate also the live site.
Troubleshooting
Provision
php /var/aegir/drush/drush.php @hostmaster hosting-cron --debug
See also fimafeng, my older bash provision script for Aegir/Drush.
Aegir contrib
Access
- http://drupal.org/project/provisionacl - Drush module, granular shell access for users
Backups
- http://drupal.org/project/hosting_backup_gc - allows you to specify how long Aegir should retain backups for
Migration between Aegirs
- Remote import - Provision, Remote import - Hostmaster - Drush extension allows you to fetch remote sites from remote Aegir servers.
Managing workflow
- http://drupal.org/project/hosting_queue_runner - tasks are run as soon as possible instead of waiting for a cron run. This makes Aegir appear much more responsive. [1]
- https://github.com/computerminds/aegir_make_working_copy - provides git working copy option un hostmaster gui for dev sites. - broken [2]
- http://drupal.org/project/hosting_site_git - hostmaster+provision
- http://drupal.org/project/provision_git - backend only
- Hosting Features - provides a Task to Hostmaster that provides integration with a site's Features. It is currently in development but works for the most important task: Update & Commit Features
Stack
Relating to installing Aegir on bare servers.
See: BOA - 'Barracuda, Octopus, Aegir' bash install script.
Also;