After digging deep into Aegir for the last few attempts at getting aegir sites running on docker-compose services, I've learned how Aegir installs Drupal and it's not ideal.

Aegir includes the site's PHP codebase directly and runs `install_drupal()`.

Obviously changing this will be a relatively big undertaking.

However, I think it's critical. This system is blocking our ability to:

  1. Use docker for hosted sites. drush provision-install requires a local copy of files and direct database access. One of the benefits of docker is the separation, so granting outside access to your app's database server isn't really ideal. We don't want aegir@server_master to directly access those databases. They will have SSH access so that should be good enough.
  2. Host anything but Drupal natively. This is why Mathieu Lutfy had to create platform_wordpress and site_wordpress node types: This is one big space where the drupal stuff is hard coded.

Next Steps:

  1. #2754069: API Only: Allow site nodes to specify "install_method", allowing something other than automated Drupal profile. - We must change the workflow to run verify to create the site, then run a separate install task, if desired.
  2. #2764245: Refactor PROVISION_SITE_INSTALLED to be more verbose and actually check if site was installed. - This function is not smart. If we are using docker containers, settings.php will already be there.
  3. Define "platform types". We add a property to platforms for "type" or some other word to track "drupal" or "wordpress" or static or whatever.
  4. Let those platform types define their "install" hook. For drupal, it should pass to drush site-install
  5. Refactor provision-install to run that hook.
  6. Allow sites to use sites/default/ as their settings file path.
  7. Allow sites to customize their Files directory path.

Comments

Jon Pugh created an issue. See original summary.

colan’s picture

Makes sense to me. Great work!

However, for (3) and (4), I think it might make more sense to add this type metadata to the Distribution content type (discussed in #2704799: RFC: Add a 'distribution' content type) instead of Platform as a platform is just an instance of a distribution.

colan’s picture

Jon Pugh’s picture