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

Chore/add support to open search #46

Merged
merged 3 commits into from
Mar 6, 2025

Conversation

mescalantea
Copy link
Contributor

What is the goal?

Provide configuration parameters to use opensearch

How is it being implemented?

This pull request includes several changes to support the use of OpenSearch as an alternative to Elasticsearch in the Magento setup. Key changes include modifications to environment configuration, Docker setup, and entrypoint scripts.

Environment Configuration Updates:

  • Added OpenSearch version tags and ports to .env.sample to allow configuration for different Magento versions.
  • Introduced M2_SEARCH_ENGINE environment variable to switch between Elasticsearch and OpenSearch. Updated related configurations accordingly.

Docker Setup Modifications:

  • Updated docker-compose.yml to add a new service definition for OpenSearch, including necessary ports, environment settings, and volume mappings.
  • Modified conditions and health checks for Elasticsearch and added profiles for both Elasticsearch and OpenSearch.

Script Adjustments:

  • Updated .docker/magento/m2-entrypoint.sh to dynamically configure search engine parameters based on the selected search engine. [1] [2]
  • Modified setup.sh and teardown.sh to use the appropriate Docker profile based on the configured search engine. [1] [2]

Opportunistic refactorings

Conditional Sample Data Installation:

  • Added a check in .docker/magento/HelperModule/Sequra/Helper/Console/Setup.php to skip setup if M2_SAMPLE_DATA is not set.
  • Updated .env.sample to include M2_SAMPLE_DATA variable with instructions on enabling or disabling sample data installation.

How is it tested?

Manual tests

How is it going to be deployed?

Standard deployment

mescalantea and others added 2 commits March 6, 2025 13:05
@mescalantea mescalantea requested a review from m1k3lm March 6, 2025 14:46
@mescalantea mescalantea requested a review from m1k3lm March 6, 2025 16:14
@mescalantea mescalantea merged commit 8455dcd into master Mar 6, 2025
6 checks passed
@mescalantea mescalantea deleted the chore/Add-support-to-OpenSearch branch March 6, 2025 16:38
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

Successfully merging this pull request may close these issues.

2 participants