About

Generic Elasticsearch infrastructure, secured in production, with an ElasticsearchService (index, search, aliases) that degrades gracefully

Provides

Services
ElasticsearchService
Translations
es

Commands

  • $ splent feature:elasticsearch status

    Show the Elasticsearch connection status for the active product.

Run them in your workspace once the feature is installed in the selected product.

Configuration

Setting Default What it does
ELASTICSEARCH_ENABLED true Kill switch. False makes every operation degrade immediately without ever opening a connection, which is how a deployment runs without a search node.
ELASTICSEARCH_INDEX_PREFIX <product> Namespace for this product's indices. __PRODUCT__ is resolved to the product name by product:env --merge and product:build; an empty value makes the service fall back to the running product's name, which is the same name. It matters whenever a product is pointed at a node it did not start, because index names are a node-wide namespace.
ELASTICSEARCH_USERNAME elastic Who the app signs in as on a node with security on, together with ELASTICSEARCH_PASSWORD (a secret, so asked for in docker/.env.prod.example rather than declared here). "elastic" is the user the production node creates from that password.

These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production. <product> stands for the name of the product that takes the feature.

Services and ports

Containers
splent_feature_elasticsearch
Ports
9200 on the host port set in ELASTICSEARCH_HOST_PORT
Volumes
elasticsearch_data
Image
A published image, pulled as it is
Health check
 Declared
Compose files
docker-compose.dev.ymldocker-compose.prod.yml

They start with the product. Host ports come from variables, so two products on one machine never collide.

Dependencies

No hard dependencies.

In product lines

Extension points

Services
ElasticsearchService
Routes
A refinement can add routes to its blueprint

Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.

Compatibility

Python
>=3.13
SPLENT framework
>=1.30.0
Python packages
elasticsearch>=8,<9