AWS OpenSearch and Zamad

Hi everyone,

I’m currently using the Dockerized version of Zammad and I’m trying to connect it to OpenSearch (an Elasticsearch-compatible service on AWS). However, I’m having trouble figuring out where to input the OpenSearch credentials in the docker-compose .env file. I tried ELASTICSEARCH_USER and ELASTICSEARCH_PASSWORD but no luck.

Could anyone point me in the right direction or share some guidance on how to configure this?

Thank you!

Hi,
If you are OK with configuring this on the running zammad container, you can open rails console on your zammad instance and run these commands

bundle exec rails r “Setting.set(‘es_url’, ‘your-opensearch-https-url’)”

bundle exec rails r “Setting.set(‘es_user’, ‘your-opensearch-user’)”

bundle exec rails r “Setting.set(‘es_password’, ‘your-opensearch-password’)”

#Rebuild index

rake zammad:searchindex:rebuild

Hope this helps!

@javlin’s approach is not update safe, it will be overwritten with a stack restart and thus be a pain to maintain.

Note that opensearch officially has no support from Zammad:
https://docs.zammad.org/en/latest/prerequisites/software.html#elasticsearch-optional

This might help you though:

I agree with @MrGeneration regarding the approach I suggested - It will be valid only for the particular container life (I had mentioned that rider though!)