Given that #2788777: Allow a site-specific profile to be installed from existing config works nicely, is it time to deprecate this module and just use the core patch instead?

Remaining tasks

Before deprecating this project we should document how to move from this module to core on the project page:

This project is (partially) deprecated as Drupal core 8.6 now supports Installing Drupal from configuration.

In order to update, the workflow with a site based off minimal and config_installer which currently is:
echo '$config_directories["sync"] = "../config/sync";' >> sites/default/default.settings.php && drush si config_installer
would become:
echo '$config_directories["sync"] = "../config/sync";' >> sites/default/default.settings.php && drush si minimal --existing-config

Comments

DamienMcKenna created an issue. See original summary.

alexpott’s picture

@DamienMcKenna I think that once #2788777: Allow a site-specific profile to be installed from existing config is part of the supported release of D8 then deprecating this is definitely the way to go. But until then I don't think it is a good idea.

Reviews of #2788777: Allow a site-specific profile to be installed from existing config very much appreciated.

Dane Powell’s picture

My understanding of this module (and I could be wrong, since I haven't used it and documentation is basically non-existent) is that it allows you to install sites from existing configuration that could live outside of the profile directory, i.e. at /config/default.

The core patch above no longer supports this use case, it only allows you to install sites from configuration stored with the profile itself, which isn't very useful for any sort of real-world configuration management workflow that I can imagine.

DamienMcKenna’s picture

@Dane Powell: At work we use the core patch all the time, it works great as we build changes locally, export to code and then deploy.

Jon Pugh’s picture

DamienMcKenna: Do you create an install profile for every site you work on then?

Perhaps this module could still serve a purpose. If you don't want to write your own custom profile to import config, you can just use config_installer plus the config directory override instead?

DamienMcKenna’s picture

@Jon Pugh: Yes.

rp7’s picture

@DamienMcKenna
Could you elaborate a little bit more on the benefits of creating a profile for "single instance" sites? I'm aware that a profile/distro is very useful as some sort of starter-kit to build sites upon, but that doesn't seem to be the case in your team.

DamienMcKenna’s picture

@RaF9: Well, for one you can add update scripts to it.

heddn’s picture

Is this ready to be deprecated now? Seeing as 8.6 is coming out? Also, if someone was previously using this approach, once 8.6 comes out, does this instantly break things and we need to migrate to the new approach in core?

alexpott’s picture

I think things will break - need to work on that. We still need this for installing via a tarball.

heddn’s picture

I've been using this w/ 8.6 latest RCs and it hasn't given me any errors. Seems to be working. But now I'm getting worried there might be dragons lurking in the weeds.

alexpott’s picture

@heddn well that is awesome to know! I'd not tested it yet so I'm super happy it still works. drupal.org can't run the automated tests for this profile :( so everything is a bit manual.

alexpott’s picture

I've run the tests against 8.6.x and whilst they fail the way they fail is due to configuration changes from 8.5.x to 8.6.x and not due to the config installer not working. So thats good!

I think we should only deprecate this profile once all the functionality is in core. The thing that is missing is the ability to install Drupal from a tarball export of configuration. This will be added to core by #2982056: Add options to the installer UI which allow a user to upload a zip with configuration or specify a config directory. This profile also allows you to get around the profile implementing a hook_install() issue that core avoids by not supporting that.

mpp’s picture

Issue summary: View changes

@alexpott, perhaps you can already update the project page with a link to the change record and some documentation how to move to core? I updated this issue's summary, you can use that text.

alexpott’s picture

@mpp thanks! Done.

mpp’s picture

Issue summary: View changes

@alexpott, seems I have forgotten an important argument: --existing-config.

Perhaps you can update this line:
echo '$config_directories["sync"] = "../config/sync";' >> sites/default/default.settings.php && drush si minimal --existing-config

alexpott’s picture

@mpp done! Thank you.

andrimont’s picture

Hello @alexpott
I wonder if the config_installer can help to choose between several Drupal 8 distributions when creating a site ?
Second question : then, can it be used on an existing Drupal 8 installation ? Shall I start from a new Drupal 8 installation ?
Thanks.
Andrimont

back-2-95’s picture

As I have existing site with config_installer, I cannot remove config_installer even if I have Drupal 8.6.9 and $settings['install_profile'] is not anymore needed.

Any clues?

alexpott’s picture

@back-2-95 I'm guessing that core.extension:profile is set to config_installer - that should never have really happened but it did for some reasons I'm not totally clear on.

You use drush config-edit to update core.extension to have a profile such as minimal and then you should be able to remove the config_installer and using core's builtin config install options.

colan’s picture

For the base use case, where you run:

drush site-install config_installer config_installer_sync_configure_form.sync_directory=/path/to/folder/with/configuration

...why bother with this module at all, when you can simply run:

drush site-install --config /path/to/folder/with/configuration

Or am I missing something?

@alexpott: Are the issues you mentioned in this Drush feature still relevant?

alexpott’s picture

@colan you are totally correct there is no point in this module anymore.

I don't think anything mentioned on that Drush feature is still relevant.

andypost’s picture

Would be great to file CR with proposed replacement

colan’s picture

Component: Miscellaneous » Documentation
Status: Active » Needs review

In that case, let's update the status on the project page, and provide an explanation (or a link to one).

alexpott’s picture

The project page already contains this information. But I will make it clearer.

colan’s picture

Great. Changing the status to deprecated, etc. would help.

alexpott’s picture

@colan indeed. I was umming an ahhing about the status - but this is deprecated in Drupal 8 too. There's no need for it. If you are using an install profile like standard that has an install hook - then change your install profile to minimal and be done.

alexpott’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.