Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for .envrc.dist #181

Open
kristin-wiseman opened this issue Jun 27, 2024 · 3 comments
Open

Documentation for .envrc.dist #181

kristin-wiseman opened this issue Jun 27, 2024 · 3 comments

Comments

@kristin-wiseman
Copy link

Is your feature request related to a problem? Please describe.
I'm trying to set up a local development environment for a Drupal 10 site hosted on Pantheon using Solr. I'm using DDEV with the ddev-drupal-solr add on, and I've copied .envrc.dist into .ddev/.env . I've set the values according to the provided examples, but I'm still getting a warning message that the server is reachable but the core is not. I've tried setting PANTHEON_INDEX_CORE to both the core's name as well as its path, but neither work, and it's unclear what that variable expects.

Also, there's no example for a PANTHEON_INDEX_SCHEMA variable, but I've found that setting one that matches the schema on the site on Pantheon removes the warning in the status report that says "This module only works when it is on a Pantheon environment or the environment variables are correctly set as described in .envrc.dist".

Describe the solution you'd like
Documentation within .envrc.dist that lists every variable necessary for the module to function in a local development environment. Also, comments for at least the PANTHEON_INDEX_HOST and PANTHEON_INDEX_CORE variables that describe the variable and demonstrate the expected format.

Describe alternatives you've considered
I've considered using a configuration split specifically for DDEV with a separate search server connected to the index. However, Search API Pantheon seems to prevent that server from working despite using the Standard Solr connector, and disabling it causes problems when switching between environments locally to export configuration.

@stevector
Copy link
Contributor

I was just on office hours with @kristin-wiseman trying to work though this

Setting environment variables of

export PANTHEON_INDEX_HOST=${DDEV_HOSTNAME}
export PANTHEON_INDEX_PORT=8983
export PANTHEON_INDEX_PATH=/solr
export PANTHEON_INDEX_CORE="dev"
export PANTHEON_INDEX_SCHEME=http

We could get a message that Solr was reachable but not the core.
Screenshot 2024-07-17 at 3 14 11 PM

Within the Pantheon Multidev we were checking against we saw that the Multidev had an absolute path for PANTHEON_INDEX_CORE (/site/5f6a069b-e1e9-4c62-8606-d26c1038b080/environment/july2024) but when we tried a similar absolute value from DDev (/var/solr/data/dev) we got the White Screen of Death
Screenshot 2024-07-17 at 3 16 54 PM

@bsnodgrass
Copy link

Thanks for looking at this with us @stevector!
We will take more time to investigate ourselves and post any further details from our investigation.

@damienmckenna
Copy link
Contributor

Due to how certain modules work, IMHO the best approach to working with Solr is to define a single server configuration and override it locally for ddev etc. Having multiple servers leads to needing to overriding the index(es), or having multiple indexes which gets even messier (multiple facets, multiple block definitions, multiple hook implementations, etc, etc).

What I've typically done is:

  • Install the modules.
  • Push the code changes to a Pantheon account.
  • Create the server configuration on the Pantheon account.
  • Export the server configuration, add the file to the repository.
  • Add settings.php changes to override the server configuration locally.

At that point everything works pretty smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants