We have a shiny new configuration system, but no way for users to actually deploy configuration to a new site and import it. We need to create a user interface through which this can happen.
Create a user interface to import configuration that has been deployed to a server. This interface should allow users to view the configuration changes that have been made (updates, adds, and deletes) and press a button to accept them. Once this happens, the import should occur. In an ideal world, this is all that would be necessary. It should be very very simple to deploy and import configuration.
After discussion with Bojhan, he made the following mockup for the configuration import screen:
Currently this is implemented with creates and updates working properly. Deletes have turned out to be problematic. Currently the following proposal is on the table:
Config entities maintain a 'manifest' file which lists the objects that each config entity is currently maintaining. This file is a very simple flat listing of config object IDs, and it would always exist, even if it is empty. It would be automatically generated the first time a specific ConfigEntity is constructed, so module maintainers don't have to worry about it at all. Objects are added/removed from this file automatically as they are created/deleted. When config is ready to be deployed, this file will have to be deployed along with the actual objects themselves. Comparing this file to the existing manifest on the target site will generate the create/delete list.
The most recent patches are working with this idea.
Testing instructions - FTP/file copy workflow
- Download two copies of Drupal 8 and put them in separate subdirectories. Call one 'Dev' and the other 'Live'. Apply the most recent patch to both of them. (For more information about applying patches see the patch documentation.) Do whatever you need to do on your local development environment to be able to run these downloads at separate URLS (outside the scope of these instructions.)
- Install both downloads.
- On dev, make some changes to settings. Not everything is currently converted to CMI but the following areas are
- Performance settings
- RSS settings
- Cron settings
- Site Information
- Maintenance mode settings
- Search settings
- Image Stlyes
- Each site has two directories under sites/default/config_[random_string]. One is named 'active' and one named 'staging'. Copy the configuration from 'active' on the 'dev' site to 'staging' on the 'live' site. You can either copy all of the configuration, or just the files that you have changed.
- On the 'live' site, visit 'admin/config/development/sync' and you will see the screen listing your configuration changes. Look at them and see that they represent the changes you made. If so, press 'Import All'. The import will run. Check through the live site to make sure the appropriate changes were in fact made.
Testing instructions - git workflow (to automatically deploy from dev site's active to production site's staging)
This is more involved and requires making some changes to settings.php. I have outlined this process at.
|PASSED: [[SimpleTest]]: [MySQL] 46,925 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] 46,928 pass(es), 0 fail(s), and 3 exception(s).|
|FAILED: [[SimpleTest]]: [MySQL] 46,858 pass(es), 0 fail(s), and 3 exception(s).|