I was a host (along with btmash) at DrupalCampLA this year for a BoF entitled "Lets learn Drupal 8 together"
While we where going through all the new stuff, someone asked about managing deployments with the new config system. We could not come up with a desirable workflow for keeping the config in version control and still being able to migrate configuration between team members.
This was the best that we could come up with.
Tell version control to ignore active config directory.
Copy all Configuration over to staging directory and commit to version control.
If this is the recommended way of doing it then why isn't the config just mirrored in staging from the beginning?
Comments
Comment #1
larowlanHey, I recommend @heyrocker's cmi session from Portland, he mentioned you can control which directory is staging and which is your active via configuration. On dev site you use the default but on live site you switch them. So active store is in git, when you deploy to prod, the active store on dev is staging store and then you just sync changes from the ui or with drush
Comment #2
frobIs this the session that you are talking about? I haven't watched yet, more I am adding it to the comments for completeness sake.
http://www.youtube.com/watch?v=7HzFK9BWswI&feature=player_embedded
Comment #3
btmash commentedI've tried to watch the video though the it is very hard to try and figure out what is on the slide with the deployment structure (are the slides up anywhere?) :) But one question that came out of our camp (and which I was unable to find a clear answer on even after watching the video) was: while figuring out a deployment workflow from one server to the next was complex but doable, what is the suggested workflow from multiple local environments (ie multiple developers) into dev (or between each other) - I would imagine every team member would be sharing the same or similar environment so how do changes on one teammate's machine come over?
Comment #4
frobSo it seems there is no way to modify this in the UI. I found that there is something lightly documented in the settings.php file.
This does seem as though it hinges on a certain development workflow. Feature branches might work well. Was there a suggested workflow in mind?
Comment #5
mtiftThis doesn't quite answer your question, but it does describe a more simplified git config import workflow: #1831818: Document git config import workflow.
The details of more complicated workflows are still being discussed.
Comment #6
ivansf commentedI'm also very interested in the recommended workflow for local development.
If the recommended method of using it on a live environment is by swapping the folders, then it feels a bit hacky and it doesn't seem to solve the problem of having multiple local environments.
The actual settings file has this comment.
Comment #7
btmash commentedI'm following back on this issue. I posted the question on stackexchange after @chx posted to ask questions there. I asked the question at http://drupal.stackexchange.com/questions/85635/what-is-the-suggested-wo... and the response from @berdir is pleasantly surprising:
So from the looks of it, it does not seem like we have to have the cross-linked active/staging strategy anymore; everything goes through the import system (be it the ui or drush) which certainly helps simplify the tasks. Followup questions from me are going to be:
Anyways, please post followup questions there as we can bring it back into the fold here.
Comment #7.0
btmash commentedUpdated issue summary.
Comment #8
johnpitcairn commentedIf the staging directory is cleaned out on import, I'm looking at using a third "dev" directory, with a script to sync the current contents of the active directory to that (a folder action works nicely if you're on a mac). Put the dev config directory into version control, then there is no need to reset staging config prior to a git pull.
Comment #9
mtiftComment #10
frob@John, I was thinking the same thing. Drush should be tool of choice for doing such things. However, Drupal should dictate the workflow intuitively. At the very least this script should be built in. Maybe a drush script in the core/drush or core/modules directory.
Comment #11
frobJust a note, this walkthtrough of the git workflow was posted on Drupal Planet today.
http://nuvole.org/blog/2014/aug/20/git-workflow-managing-drupal-8-config...
Comment #12
anavarreThis issue was filed a while ago and is not getting much attention. I suggest we close it and here's a possible workflow now that Drupal 8.0.0 is out: https://docs.acquia.com/cloud/manage/code/config-d8