Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multisite deploys #1092

Merged
merged 2 commits into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should have no effect for single-site projects. Multisite projects should pass either a unique cloud alias or override drush.uri, for instance via example.multisite.yml.

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