Elasticsearch in ASAB Maestro¶
Elasticsearch technology extends Elasticsearch service configuration and connects Elasticsearch to other services.
Parameters¶
List of parameters created by Elasticsearch tech, available to the model and descriptors whenever Elasticsearch is present in the installation.
- ELASTIC_HOSTS_KIBANA
-
A string from URLs to all ElasticSearch master nodes.
"[http://lmc01:9200, http://lmc02:9201, http://lmc03:9202]"
Kibana descriptor
define: type: rc/descriptor name: Kibana url: https://www.elastic.co/kibana descriptor: image: docker.elastic.co/kibana/kibana volumes: - "{{SITE}}/{{INSTANCE_ID}}/config:/usr/share/kibana/config" files: - "config/kibana.yml": | # https://github.com/elastic/kibana/blob/main/config/kibana.yml server.host: {{NODE_ID}} elasticsearch.hosts: {{ELASTIC_HOSTS_KIBANA}} elasticsearch.username: "elastic" elasticsearch.password: {{ELASTIC_PASSWORD}} xpack.monitoring.ui.container.elasticsearch.enabled: true server.publicBaseUrl: {{PUBLIC_URL}}/kibana server.basePath: "/kibana" server.rewriteBasePath: true
- ELASTIC_PASSWORD
-
A secret allowing access and write operations to Elasticsearch.
Configuration of ASAB Services¶
Every ASAB Service obtains elasticsearch
configuration section.
[elasticsearch]
url=http://lmc01:9200
http://lmc02:9201
http://lmc03:9202
username=elastic
password=<ELASTIC_PASSWORD>
Elasticsearch configuration¶
Environment variables¶
There are several environment variables in the Elasticserach descriptor set to null
and replaced by the tech.
- node.roles
-
Roles are read from the model for each instance The names specified for each instance (master, hot, warm, cold) are translated into node.riles as followed:
- master ->
node.roles=master,ingest
- hot ->
node.roles=data_content,data_hot
- warm ->
node.roles=data_warm
- cold ->
node.roles=data_cold
No other names and tiers are supported by Elasticsearch, nor ASAB Maestro.
- master ->
- http.port
-
Every Elasticsearch instance gets assigned a unique port based on its role. All master instances start at 9200, all hot instances start at 9250, all warm instances start at 9300, all cold instances start at 9350.
- transport.port
-
Every Elasticsearch instance gets assigned a unique port for inner (inter-elastic) communication. All master instances start at 9400, all hot instances start at 9450, all warm instances start at 9500, all cold instances start at 9550.
- cluster.initial_master_nodes
-
All master instances of Elasticsearch.
- discovery.seed_hosts
-
All master nodes excluding the one being configured.
- ES_JAVA_OPTS
-
If
-Xms
is not set, yet, it is set to-Xms2g
for master nodes and-Xms28g
for other nodes. If-Xmx
is not set, yet, it is set to-Xmx2g
for master nodes and-Xmx28g
for other nodes.
Certificates¶
Communication of the Elasticsearch instances is secured by certificates. Certificates are generated by the ASAB Remote Control, using its certificate authority.
Nginx configuration¶
Ports assigned to the master nodes are propagated to Nginx configuration to create an upstream
record for the elasticsearch service.