-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fixes #1138: Support Config Split for environment-specific Core CMI #965
Comments
Note that adding the |
Also a note about Config Split setup—doing something like this requires you to configure a Split for each of your environments, using the environment's machine name as the machine name of the split. So Local = |
Also, here's the extent of the documentation I provided our devs to use Configuration Split when working on tickets:
|
Also, if using Config Split, there's no need to set up a ton of arrays of modules to enable and disable in different environments, since it's all managed in your site's configuration. For our project, we changed the defaults to:
|
We ended up using this exact same approach (full import + config split) and agree it feels like a sane default for BLT going forwards. Not sure how it'd go on projects using |
You've got a little extra bit in the config there that is site-specific I believe <!-- Addition: Configure admins on non-prod environments. -->
<if>
<not><equals arg1="${environment}" arg2="prod" /></not>
<then>
<drush command="npadmin" assume="yes" alias="${drush.alias}"/>
</then>
</if> |
@swichers - Oops, you're right. I've removed that portion. (It was there to run a command to make certain unprivileged users on prod admins in other environments (see Adding a role to a user programmatically in Drupal 8) |
Relates to #854 |
FYI, I just posted a blog post that goes through the process in detail (I just tested it from scratch on my Acquia Cloud employee site to verify it all works the way I thought it would...): Adding Configuration Split to a Drupal site using BLT and Acquia Cloud |
I'm testing the latest version of BLT right now... I'll document the project tweaks required to make use of this when I have something working on my test site. |
Configuring a site for Config SplitIn your cm:
strategy: config-split
core:
path: ${repo.root}/config
key: sync
deploy-key: vcs
dirs:
sync:
path: ${cm.core.path}/default If you had a custom Also, if you were on Config Split beta4, and had configured splits in your own Test vs. Stage for Acquia Cloud Stage (
|
Closing issue. Please open new issue for any specific changes that need to be made. |
This is a feature request, and it's something I'm still working on conceptually—it could also dovetail into a more nuanced approach in general to how BLT handles different Configuration Management scenarios.
Currently the default is to either do:
--partial
(which results in difficulty deleting fields and content types, etc.—you have to use a lot of update hooks and APIs to do cleanup work)--partial
(same caveats, but often better for multisite-style projects since feature 'packages of configuration' can be enabled or disabled per-site).I've been building a site using the Configuration Split module for Drupal, and it seems to give me the best of both worlds for many aspects (block content management is still an issue... but that's a separate thing for a separate day):
drush fra
ghost that requires extradrush cc drush
es to clear up. Makes managing massive changes (e.g. deleting lots of fields and adding others, same with other config entities) a lot easier).To use Configuration Split, besides the normal setup (documented on the module page), I needed to make a few modifications to a few of BLT's Phing build targets. So far I've done the following:
First, change
import
insideblt/project.yml
to add my custom Phing target overrides:Second, create
blt/build.xml
with said overrides for thesetup:update
andsetup:drupal:install
targets (Note: The things I added or changed in these targets are marked by a comment line withAddition
):The
setup:update
customized target basically swaps outconfig-import --partial
forconfig-split-import --split=[environment-here]
.The
setup:drupal:install
customized target just adds in one line to pass the--config-dir
option to Drush, so fresh site installs will handle existing UUIDs properly (this makes it so multisite installs or CI installs still work even with full exported CMI data).The text was updated successfully, but these errors were encountered: