Skip to content

Commit

Permalink
Support for multisite deploys (#1092)
Browse files Browse the repository at this point in the history
* Support multisite deployments.

* Fixed Behat multisite tests.
  • Loading branch information
danepowell authored and grasmash committed Feb 14, 2017
1 parent aff9af9 commit 07bf653
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions phing/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ drupal:

drush:
bin: ${composer.bin}/drush
cmd: ${drush.bin} @${drush.alias} -l ${multisite.name}
cmd: ${drush.bin} @${drush.alias} -l default
dir: ${docroot}
uri: ${multisite.name}
uri: default
assume: yes
passthru: yes
logoutput: yes
Expand Down
4 changes: 2 additions & 2 deletions phing/tasks/deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@
<property name="drush.bin" value="${drush.bin} --include=../drush" override="true" />
<!-- Environment parameter is used to determine which modules to toggle. On ACE, will be overridden by one of dev/stage/prod. -->
<param name="environment" value="deploy"/>
<!-- Drush alias should be set to self, but can be overridden for multisite. -->
<property name="drush.alias" value="self"/>
<!-- Drush alias should be set to sites to update all sites. -->
<property name="drush.alias" value="sites"/>
<!-- Most sites store their version-controlled configuration in /config/default. -->
<!-- ACE internally sets the vcs configuration directory to /config/default, so we use that. -->
<property name="cm.config-dir.key" value="${cm.config-dir.deploy-key}"/>
Expand Down
2 changes: 1 addition & 1 deletion phing/tasks/tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
<echo message="Running server at ${behat.server-url}"/>
<exec command="pkill -f runserver" logoutput="true" level="${blt.exec_level}" passthru="true"/>
<exec executable="${drush.bin}" dir="${docroot}" spawn="true" level="${blt.exec_level}">
<arg line="runserver ${behat.server-url} -l ${multisite.name}"/>
<arg line="runserver ${behat.server-url}"/>
</exec>
<echo message="Waiting 10 seconds for ${behat.server-url} to become available."/>
<waitfor maxwait="10" maxwaitunit="second" checkevery="1" checkeveryunit="second">
Expand Down
9 changes: 8 additions & 1 deletion readme/multisite.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Start by following the [Acquia Cloud multisite instructions](https://docs.acquia
if (file_exists('/var/www/site-php')) {
require '/var/www/site-php/mysite/multisitename-settings.inc';
}

require DRUPAL_ROOT . "/../vendor/acquia/blt/settings/blt.settings.php";

## BLT setup
Expand All @@ -23,6 +23,13 @@ Start by setting `$site_dir` in each site's settings.php, prior to the `blt.sett

$site_dir = 'example.com';

You will also need to define your multisites in `blt/project.yml` by creating a `multisite.name` variable. This allows BLT to run setup and deployment tasks for each site in the codebase.

multisite:
name:
- default
- example.com

Ensure that your new project has `$settings['install_profile']` set, or Drupal core will attempt (unsuccessfully) to write it to disk!

At this point you should have a functional multisite codebase that can be installed on Acquia Cloud.
Expand Down

0 comments on commit 07bf653

Please sign in to comment.