Add OpenSearch 2.19.5 service alongside Elasticsearch
What this does
Adds OpenSearch 2.19.5 as a second search engine alongside the existing Elasticsearch 7.17.28. Both run simultaneously so we can compare them side by side during the migration.
Changes
- Added
opensearchservice todocker-compose.dev.yml(port 9202, security disabled) - Added OpenSearch URL to
ServiceUrlsinapp.php - Created data directory with
.gitkeepso bind mount works on fresh clones - Updated
.gitignoreto exclude OpenSearch runtime data - Registered
opensearchinconfig.dev.jsonsocdli.pyincludes it in the generated compose file (disabled by default - devs opt in via their localconfig.json)
What's NOT changed
- Elasticsearch service, Logstash,
ElasticSearchQuery.php,SearchController.php-> all untouched - No code changes, this is infrastructure only
How to verify
Create dev/config.json (copy dev/config.dev.json if you don't have one) and set both elasticsearch and opensearch to "enabled": true and "is_default": true, then:
./dev/cdli.py dev up -d
curl http://localhost:9200 # ES 7.17.28
curl http://localhost:9202 # OpenSearch 2.19.5Load the mapping template and create the index:
curl -X PUT "http://localhost:9202/_template/artifacts" -H "Content-Type: application/json" -d @dev/data/logstash/resources/artifacts.json
curl -X PUT "http://localhost:9202/artifacts"Notes
- Running both engines needs ~4GB JVM heap. Developers with limited RAM can start them selectively
- The
?engine=opensearchquery parameter and poller dual-write are separate issues - OpenSearch environment variables reference: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/
Closes #2614
Edited by sung