Explaining to Matt how to do configuration updates
On 10/02/2018 03:02 PM, Matthew Biewener wrote:> Hi Ben –
I know that floating around in comments, wikis, IRC discussions, notes, and readme files are the keys to this question, but I think we need to once-and-for-all try to get this down pat. The goal (as always): to deploy recent updates to the distribution, while retaining any site-specific customizations. Please help me to understand… It is in one convenient place! The README, under “Updating configuration”:
https://gitlab.com/nichq/nichq-community/blob/master/README.md#updating-configuration
First, I want to use “destructivereset” to get the database of the site I want to update. Then, I import the configuration from the site-specific directory using “confload”. That’s where you’re going wrong. You don’t do the confload as part of an update of the live configuration. If you’re making changes to a specific site, generally it’s best to start with the live database, so you get to notice any changes you made there. That’s what destructivereset does.
At that point, if there are any further customizations I’d like to make, I can do so and then run “confsave” (as noted here: https://gitlab.com/nichq/nichq-community/issues/253#note_98966702) so that my updates are saved in a site-specific config directory for deployment.
confsave is the last step.
- At what point (where/how) do I pull in updates to the distribution? Until we’re on Drush 9 and test the config distro drush command, by going to http://nichq-community.local/admin/config/development/configuration/distro
- How do we view and reconcile any conflicts? It’s shown visually at that page (i prefer the ‘classic’ view at the bottom). Basically there aren’t conflicts; if config distro fails to bring the changes you want into the site, it’s best to do them manually as if they were a site-specific change. But bring in me first as it should bring in any changes in the distro into the site.
Then you have one more chance to review what you’re committing to the site-specific directory versus what was there after the confsave, of course.
- If configuration changes had been made directly on the live site in the UI, how do we preserve them (given that “confload” pulls from what’s in the repository, not from what’s in active configuration on the live site)? No confload is the answer :-)
- After we somehow update the site-specific configuration folder with the site-specific customizations AND the distribution updates (having reconciled them in #2), will the standard “deploy.yml” playbook, then, know to deploy configuration from that site-specific folder?
Yes the deployment knows to use the site-specific folder!
Not sure where other levels of intelligence are (making you confirm that you know that there were live changes, if there were live changes) so tagging Chris in. But if you follow the procedure in the README and deploy pretty soon after that you’ll be capturing any live changes.
Thanks, You’re welcome!
Matt
…………………………………………… Matthew Biewener Senior Digital Solutions Manager National Institute for Children’s Health Quality (NICHQ) 30 Winter Street, 6th Floor, Boston, MA 02108 Main: 617-391-2700 | Direct: 617-391-2750 | Fax: 617-391-2743 mbiewener@nichq.orgmailto:mbiewener@nichq.org
Connect with NICHQ: [/Users/mbiewener/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_529202672] http://www.nichq.org/ [/Users/mbiewener/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1873669825] http://twitter.com/#!/NICHQ [/Users/mbiewener/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_21141742] https://www.facebook.com/pages/National-Initiative-for-Childrens-Healthcare-Quality-NICHQ/79017289989 [/Users/mbiewener/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_2147183529] https://www.linkedin.com/company/92762/ ☞ Join our mailing list for children’s health insights, resources and toolshttp://www.nichq.org/mailing-list?utm_source=Signature