I've installed D8 + search+api + search_api_solr.
In admin UI, I can easily create & config solr instances.
In D8, with different-from-D7 module dir structure, and general use of yaml configs, what's the current 'approved' method of prepopulating module's settings & overriding defaults?
Still adding to site's settings.php? Other?
Comments
Comment #1
Anonymous (not verified) commentedbugsonly created an issue. See original summary.
Comment #2
borisson_Overriding defaults is still possible from settings.php. Not sure what you mean with prepopulating module data.
Comment #3
berdirsearch api servers are normal config entity, you can provide default configuration in the same way as anything else.
And just in the same way you can provide config overrides through settings.php like anything else in Drupal 8. I'm using the following to configure solr on platform.sh:
<?php
// Set overridden solr configuration.
if (!empty($relationships['solr'][0])) {
$solr = $relationships['solr'][0];
$config['search_api.server.ID']['backend_config']['host'] = $solr['host'];
$config['search_api.server.ID']['backend_config']['port'] = $solr['port'];
$config['search_api.server.ID']['backend_config']['path'] = '/' . $solr['path'];
}
Comment #4
Anonymous (not verified) commented@borrisson
> Not sure what you mean with prepopulating module data.
I'm after a 'deploy script' (For lack of a better term) that'll allow me to correctly setup installed-modules' parameters/settings at the time of install. Without having to visit/configure each module @UI, after install+login.
For example, after using composer to
install drupal
install search_api / search_api_solr
configure the installed instance of solr module with
Sounds like settings.php is still the right place for this?
To *get* the available configs' name/syntax, I was just looking at
But that only returns
which doesn't appear to be the right/complete set of config. I need to get at the complete config(-able) data for the module. Either from the module source, from the sql DB, or perhaps changing/dumping the config to filesystem ...
My larger goal is simply to have a preconfigured 'base install'; solr is my first widely-common set of settings that I want to deal with.
Composer gets me to an an easily-script drupal + modules installation.
I'm looking at how to get the base-install's modules pre-configured with my settings, overriding the defaults.
Comment #5
berdirThe servers are configuration entities, they're all separate config objects. I recommend you read up on alex pott's great blog posts on configuration management: https://www.chapterthree.com/blog/principles-configuration-management-pa... and part two and three, found through his profile for example.
You can put configuration in a module and install it, in an install profile to create many similar sites, or you can use the config_installer to install new sites exactly based on configuration export (and then customize it further).
Comment #6
Anonymous (not verified) commentedToo many places to look!
I'd found this
https://www.amazeelabs.com/en/blog/drupal8-configuration-management-part1
felt a little dusty; just reading this
https://www.drupal.org/documentation/administer/config
the links you provided are quite helpful, thx.