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 multiple CM approaches. #854

Closed
jasonharc opened this issue Dec 22, 2016 · 4 comments
Closed

Support for multiple CM approaches. #854

jasonharc opened this issue Dec 22, 2016 · 4 comments
Labels
Enhancement A feature or feature request

Comments

@jasonharc
Copy link

I want BLT to support multiple CM approaches.

@geerlingguy
Copy link
Contributor

geerlingguy commented Dec 22, 2016

Currently it seems there are a few widely-used approaches that people are using:

  1. Core CMI (full config): Use drush cex -y to export everything and drush cim -y to import everything. Works well for single sites, has some difficulties around overrides and environment-specific modules. Things like [Configuration Split|https://www.drupal.org/project/config_split] may help here.
  2. Core CMI (partial): Use drush cex -y to export everything and drush cim -y --partial to import everything, but anything you .gitignore (e.g. Contact form config, YAML/Webform config, etc.) is not imported. Drupal also doesn't automatically delete fields/content types/etc. when using --partial. Can work better than full config in multi-site scenarios too.
  3. Features and Core CMI (partial): Similar to how D7 works, but with some more configuration thrown into a core CMI export, potentially. Requires more work in architecting features to be installable and not conflict with each other, and roles/permissions can't be managed (sanely) within Feature module exports. Better for multisite since features could be enabled or disabled per site more easily.

This isn't a comprehensive list, but I wanted to sum up what I've seen most often in the wild.

Using #1 means that any config changes made on prod (e.g. block changes, layout changes, contact forms, etc.) would need to be exported back to code or else they'd be overwritten on the next code deploy/config import.

Using #2 or #3 means you have to use the D7-style 'update hooks for everything' approach where you write custom code to do field/other deletions and manage any configuration that's not explicitly defined in the imported configuration.

@bkosborne
Copy link
Contributor

Some thoughts from someone struggling with this as well:

From what I gather, BLT supports the second workflow approach above: exporting everything and then doing a partial config import on production. The documentation for configuration management assumes you're using a Features based workflow (unless I missed another reference somewhere?)

I'm using BLT with Acquia Cloud, which includes the BLT provided acquia cloud hook for performing post-code-deploy actions.

BLT currently hardcodes a the --partial option to drush config-import during the site install process.

I think at the very least this that should be configurable, or at least documented somehow?

I haven't quite settled on an approach for managing different configs between environments, but for now during development of a project, I'm just exporting all config from dev and importing it all into prod. The --partial flag throws me off because it leaves things around on prod that I didn't intend.

@grasmash
Copy link
Contributor

@bkosborne there is now a cm.core.partial variable that can be toggled.

@grasmash
Copy link
Contributor

I'm closing this in favor of the more specific #965, which would be the other config strategy supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

No branches or pull requests

4 participants