Getting Elasticsearch into your pipeline is where it starts paying off - automated, repeatable and reviewed. Here is a working integration and the habits that keep it reliable.
A working pipeline snippet
Provide Elasticsearch as a CI service.
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.0
env: { discovery.type: single-node, xpack.security.enabled: 'false' }
ports: ['9200:9200']Do this
- Define explicit mappings; disable dynamic where possible
- Use Index Lifecycle Management for retention/rollover
- Size shards deliberately (tens of GB each)
Avoid this
- Unbounded mapping explosion from dynamic fields
- Too many small shards hurting performance
- No ILM, so indices grow without retention
Want senior help putting Elasticsearch to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.