Поисковый сервис
Сервисы/Elasticsearch

Сервис Elasticsearch

Самостоятельно размещаемый поисковый сервис Elasticsearch для индексации данных приложений, полнотекстового поиска и поисковой аналитики.

Вы добавляете этот сервис в стек и выбираете там его версию и ресурсы. Каждое окружение может их переопределить.

В StackMaster

Как Elasticsearch работает в StackMaster

What Wodby sets up for this Elasticsearch service. It runs the official Elastic image as a single node, configured through environment variables set by the manifest.

How applications reach it

  • URL: http://<app service name>:9200. Security is on (xpack.security.enabled), TLS on the HTTP layer is off: use plain http:// with HTTP Basic authentication.
  • User elastic, the built-in superuser. Its password is generated by Wodby (token password) and is in ELASTIC_PASSWORD inside this container.
  • A service linked to this one receives host, port and the password in variables named by the linking service; read them in code and do not copy the password into the repository.
  • Port 9200 is private: no public route is created. Port 9300 is the transport port and is not for applications.

What is configured

  • discovery.type is single-node; the service is not scalable. An index with replicas stays yellow because there is no second node: create indices with zero replicas.
  • The cluster name is built from the application and environment names.
  • node.store.allow_mmap is false.
  • The JVM heap comes from ES_JAVA_OPTS (the manifest sets a fixed heap). The container memory limit must leave room above the heap.
  • A second password (token kibana_password) is generated for the built-in kibana_system user. A start-up hook sets it through the security API once the node answers. A linked Kibana service connects with that user; do not use kibana_system from applications and do not give Kibana the elastic password.

Changing configuration

Elasticsearch settings are environment variables on this service, named exactly like the setting (for example cluster.name). Do not mount an elasticsearch.yml. Turning security off or HTTP TLS on changes how every linked service must connect, Kibana included.

Data

Indices are in /usr/share/elasticsearch/data on the data volume. The manifest declares no backups, imports or actions; snapshots need a repository configured in Elasticsearch itself.

Check the result

From this service's container:

  • curl -s -u "elastic:$ELASTIC_PASSWORD" http://localhost:9200/_cluster/health?pretty
  • curl -s -u "elastic:$ELASTIC_PASSWORD" http://localhost:9200/_cat/indices?v

Обзор

Технический профиль Elasticsearch

Здесь перечислены версии, которые можно выбрать для Elasticsearch в стеке или окружении. Сам сервис публикуется ревизиями, и стек ссылается на конкретную ревизию.

Тип сервиса

Поисковый сервис

Версии

9.5

Постоянные тома

Elasticsearch data

Стеки

Стеки, в которые входит Elasticsearch

Elasticsearch входит в эти публичные стеки. Можно создать приложение из публичного стека как есть или добавить сервис в собственный стек.

Конфигурация

Конфигурация сервиса Elasticsearch

Сервис Elasticsearch объявляет следующее. Если значение можно изменить, его задаёт стек, а каждое окружение может его переопределить.

Тома

Elasticsearch data