Skip to content

Adjustments to config management on all b.org sites #612

@ghost

Description

There are three approaches to working with configuration management in Backdrop:

  1. Figure 8
  2. Extra directory
  3. Versioned staging

Backdrop's sites all use the Versioned Staging approach, as detailed, for example, here: https://github.com/backdrop-ops/backdropcms.org/blob/master/config/README.md

I agree that this approach, out of the three above, is the best option. However, I also believe it could use some tweaking to make it better. Here're the changes I'm proposing and their reasons/benefits:

  • Rename the live-active directory to active.
    • Since only two directories are needed for this approach, unlike the Extra Directory approach, we can name them more simply to avoid confusion (active is always active and staging is always staging). This also means that settings.php won't need to be updated between dev and live environments.
  • gitignore everything in the activedirectory.
    • The very name of this approach indicates that only the staging directory is in version control, so we shouldn't be committing active config files. The reason for ignoring the files and not the whole active directory itself is that I'm hoping (this is untested) this will make it so that that cloning the repo will mean a blank active directory is present and ready to use as the active directory on development environments (e.g. users don't need to perform an additional step of creating a new directory).
  • Remove any code/instructions that clear out the staging directory after importing to active.
    • I believe I saw some code somewhere that deleted the contents of staging once the import into active was complete. By removing this and leaving staging intact after import, users will get a copy of config files when cloning even though the active directory is empty.
  • Make a policy that configuration changes NEVER happen on the live site.
    • When config changes happen on production, it means that someone with server access needs to go and export and commit those changes to the repo before someone cloning the repo can do any work on it. This is, at best, a bottleneck for development (requiring potential developers to find and ask an admin to do this for them) and, at worst, a barrier-to-entry for developers who find it too hard or confronting to do so (when they just want to make a simple PR but instead give up). This could open up more development opportunities for people.
  • Make sure the drush config commands work properly, install drush on Backdrop's server and document that this is an option.
    • Typing drush bcex is much quicker and easier (and less error-prone) than manually copying files between directories. Leave the manual instructions in-place for those who prefer them, but make the drush command instructions the default.

I think that's it for now. I'll add more if I remember anything later that I've forgotten. Feel free to give feedback, suggest alternatives, etc., all in an effort to make contributing to Backdrop's websites simpler, easier, more robust and available to more people.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions