warden
warden copied to clipboard
OpenSearch support
With the upcoming 2.4.4 release of Adobe, OpenSearch will be supported and Cloud installations will require it as well. With that, I'm wondering if it's possible to install OpenSearch into a Warden environment instead of Elasticsearch?
Thanks!
Worth mentioning that Elasticsearch 7.16 and 7.17 will be supported by 2.4.4 and 2.4.5 respectively as well per the M2 release notes, so it should work just fine with an official ES image in-use. However, if you do want to use an OpenSearch image that you provide, it should be fairly simple to override the image via .warden/warden-env.yml
file. Take a look at https://docs.warden.dev/environments/customizing.html for a few examples of how to use that file, but it can basically be used to change anything you see in the output of warden env config
(the fully rendered docker-compose configuration)
It would still be nice to have core Warden support for OpenSearch when it is also supported by Magento. So my wish would be to keep this open until OpenSearch is supported by Warden natively :)
@davidalger Thanks for the note about Elasticsearch and for our use and development, that will work just fine as we don't have to replicate our Cloud instance exactly - and we use a separate site search service in production as well.
However, I agree with @sprankhub that core support for OpenSearch would be a great added feature at some point :)
Added image build for OpenSearch 1.1, 1.2 and 1.3 in b49b75fb7. The plugin installs fail on 1.0, hence the omission.
https://hub.docker.com/r/wardenenv/opensearch/tags
At the moment, they can only be used by overriding the image via config in the project's .warden/warden-env.yml
file.
Managed to replace elastic with opensearch with following .warden/warden-env.yml:
version: "3.5"
services:
elasticsearch:
environment:
- DISABLE_SECURITY_PLUGIN=true
image: ${WARDEN_IMAGE_REPOSITORY}/opensearch:1.3
elasticsearch-hq:
profiles:
- donotstart
Unfortunately opensearch doesn't start with xpack.security.enabled: "false"
variable which is coming from elasticsearch.base.yml and I didn't find a way to replace it with warden-env.yml since options are simply merged, had to temporary remove it directly in that file. Hope this will be useful for someone
@Zifius - This works great! Thanks for the work on getting this to function. That note about editing the elasticsearch.base.yml is especially helpful (and easy to forget!).
I added - xpack.security.enabled=
to @Zifius warden-env.yml so I didn't have to edit the elasticsearch.base.yml. I have been able to bring up ES or OS.
version: "3.5"
services:
elasticsearch:
environment:
- DISABLE_SECURITY_PLUGIN=true
- xpack.security.enabled=
image: ${WARDEN_IMAGE_REPOSITORY}/opensearch:1.3
elasticsearch-hq:
profiles:
- donotstart
@ptrollins , when I use your config file, I get the following error message: Unsupported config option for services.elasticsearch-hq: 'profiles'
.
Do you have any idea, what I'm doing wrong?
@norgeindian did you set "ELASTICSEARCH_VERSION"=7.16 in .env? I realized that's probably not the issue. Check docker-compose ---version and make sure it is 1.28 or greater. It looks like "Docker Compose 1.28.0 introduced support for a profiles key."
Hello everyone regarding the usage of opensearch over elasticsearch in Magento 2 environment, has anyone else encountered the issue of losing indexed data on every down / up combo? I've been having issues with categories requiring reindexing to show products after every start. This was not the case when using elasticsearch
@ptrollins , thanks for the hint. Will check.
Added in 2bd95457748c1d639dc6109018d963ff624137ac. Will be present in next release.