Things and Stuff Wiki - An organically evolving personal wiki knowledge base with an on-the-fly taxonomy containing a patchwork of topic outlines, descriptions, notes and breadcrumbs, with links to sites, systems, software, manuals, organisations, people, articles, guides, slides, papers, books, comments, videos, screencasts, webcasts, scratchpads and more. Quality varies drastically. Use the Table of Contents to navigate long pages, use the Small-ToC and Tiny-ToC header links on longer pages. Not that mobile friendly atm. #tnswiki on freenode IRC for feedback chat, or see About for login and further information. / et / em
two thirds-way through a big refactor. todo; move things from here to other places.
Aegir is a Drupal distribution for managing Drupal site provision and hosting.
- 1 Overview
- 2 Tasks
- 3 Provision
- 4 Remote
- 5 Aegir contrib
- 6 Docker
- 7 Services
Aegir is a Drupal Distro that uses the Hostmaster front-end to control the Provision module with its Drush integration. Aegir uses Drupal multi-site 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. Sites and their content can be cloned on or migrated between Platforms or pushed to spoke servers. Module dependency is managed via those loaded in the Profile of the Distro with the .make.
- Wikipedia:Aegir Hosting System
- Aegir file system structure
#aegir on freenode
See BOA - 'Barracuda, Octopus, Aegir' bash install script.
- Aegir-up provides a collaborative, distributed development environment, that encourages the use of Drupal best-practices. It deploys the Aegir Hosting System in a local virtual environment for development and testing. It provides all the ease-of-use of Aegir, wrapped in the convenience of Vagrant-based virtual machines. Creating sites and platforms is a matter of a click or two, while rebuilding the entire environment is a matter of minutes.
- My Aegir Development Environment - ergonlogic
- Vimeo: Drupal Camp Montreal 2012 - Fearless development with Drush, Vagrant and Aegir
Use a build make file to call the main make (possibly on-top of a base profile).
Behind the scenes pseudo;
drush make --working-copy "$PROJECT_MAKE" "$PLATFORM_PATH" drush provision-save @platform_PlatformName --root="$PLATFORM_PATH" --context_type=platform drush @hostmaster hosting-import @platform_PlatformName
/usr/local/bin/php /var/aegir/drush/drush.php --php='/usr/local/bin/php' --context_type='platform' --master_url='http://aegirmaster.example.org/' --root='/var/aegir/platforms/exampleplatform' --server='@server_master' --web_server='@server_master' --makefile='https://raw.github.com/so/me/build.make' --make_working_copy='1' provision-save '@platform_ExamplePlatformDec02' --backend
Things to remember for a site build in hostmaster;
- Don't forget full domain name!
- Create dev.* alias for BOA cache-busting
Behind the scenes;
drush provision-save "@$SITE_DOMAIN" --uri="$SITE_DOMAIN" --context_type='site' --platform="@platform_PlatformName" --profile="$PROJECT_NAME" drush "@$SITE_DOMAIN" provision-install drush @hostmaster hosting-task @platform_"$PLATFORM_NAME" verify --force --verbose drush user-login
In Hostmaster, make sure that all sites have an associated Client, otherwise the site will be listed as available for all Clients/Users you have added.
- remote_import - Drush extension that allows you to fetch remote sites from remote Aegir servers
- hosting_remote_import - module that provides a UI for remote_import
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
“old_short_name = new_profile_name”
"Example: your site has been created with that old Commerce Dev platform when it was using ‘commercedev’ as a machine name for its installation profile, and you want to migrate it to newer Commerce 7.x Kickstart platform, but it is using ‘commerce_kickstart’ as a machine name for its installation profile. You only need to add one line in your commerce_kickstart.info file, with “old_short_name = commercedev” (without quotes), just below “name = Commerce Kickstart” line. Then re-verify the newer Commerce Kickstart platform in Aegir and Voilà! – now you can migrate your sites from the old Commerce Dev platform to the new Commerce Kickstart platform"
Aegir does not manage profiles..
the following is incomplete!!
Basic core and module upgrade;
- Git commit theme and push to remote
- Use profiler_builder to create new distro files (info/profile/make)
- Edit files (todo/missing info)
- Add new set of profile files to git repo
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.
If a site install task fails, and the build make/info/profile cannot be fixed and the Install and Verify run again to completion, there is no clean way to remove it.
- Delete failed site install task item
- Delete failed site item
- Remove failed site table from DB
- Provision - the Aegir backend
- API reference
- purge option for platforms (--force)
- Manage your Aegir system from the command-line
- Aegir contexts - above and beyond Drush site aliases
/usr/bin/php /var/aegir/drush/drush.php @hostmaster hosting-dispatch /usr/bin/php /var/aegir/drush/drush.php -y @hostmaster vset hosting_queue_tasks_frequency 1
/usr/bin/php /var/aegir/drush/drush.php @hostmaster hosting-task 1234 --verbose --debug
Run hostmaster tasks with debug
/usr/bin/php /var/aegir/drush/drush.php @hostmaster hosting-cron --verbose --debug
drush @mysite.com provision-restore /var/aegir/backup/example.com...tgz
Older restore method(?)
drush @hostmaster provision-deploy /var/aegir/backup/example.com...tgz
Pause task cron;
drush @hostmaster hostmaster-pause
See also fimafeng, my older bash provision script for Aegir/Drush.
To sort with Drush#deployment
Proper master hub remote spoke Aegir requires remote Aegir user, Apache config changes and apache2ctl sudoers for restarting, so shared hosting environments are generally out of the question currently.
Saying that, one can manually create Drush site aliases with the relevant details to manually rsync and sql-sync.
- Remote servers (multiserver) - basics for setting up a remote (slave) Aegir server
- Essential Reading: Aegir Master-Remote Mysteries
- Running Drush Rsync on Windows (Solved!) - dreamhost
- Configuring Aegir Hosting System to use a Remote MySQL server - have hub hostmaster use remote db via drush.rc config
- Aegir Support for Multi-Server Site Deployment and Management for Drupal - Adrian Rossouw, Jul 06 2010
- Drush synchronization of database and files - Apr 16, 2012. Drush extra.
- http://drupal.org/project/provisionacl - Drush module, granular shell access for users
- 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.  - now in Aegir core
- https://github.com/computerminds/aegir_make_working_copy - provides git working copy option un hostmaster gui for dev sites. - broken 
- 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
- aegir-projec - A project-abstraktion on top of platforms and sites
- http://drupal.org/project/hosting_backup_gc - allows you to specify how long Aegir should retain backups for
Migration between Aegirs
Remote Import goes on receiving server, SSH key from server site is coming from