Deploy Elasticsearch on dedicated workers

Issue

  • Elasticsearch is not being deployed on dedicated elasticsearch workers

Environment

Resolution

  • Pre-condition: You must have enough dedicated elasticsearch workers to deploy the elasticsearch instances.

To use dedicated workers you must use the CJE CLI operation cje prepare elasticsearch-update ensuring that max_instance_count and use_dedicated_worker are NOT commented like in the example below.

###################################################################

[elasticsearch]

## Maximum of instances. Should always be an odd number and equal or bigger than three.
# (Recommended)
# max_instance_count = 3
# Current value
max_instance_count = 3

## Application memory in MB. 14GB are required for minimum set-up in production.
# (Recommended)
# memory = 14336
# Current value
# memory = 14336

## CPU reservation/allocation
# cpus = 0.1

## Elasticsearch default index shards
# shards = 3

## Elasticsearch default index replicas
# replicas = 1

## Use dedicated elasticsearch workers
# Requires workers created for the "elasticsearch" workload type.
# Use the "worker-add" to create such workers
# Valid values : yes/no
use_dedicated_worker = yes

Then, once the operation is applied, you should check that the elasticsearch instances went correctly deployed into the dedicated elasticsearch workers. If there were not correctly deployed, then check in .dna/project.config that under the [elasticsearch] section, the cluster_attributes = jce_elasticsearch:true is present. In case it is empty,, then manually change the value of cluster_attributes and run: cje upgrade-project --apply-template and once it finishes, dna stop elasticsearch/dna init elasticsearch to re-deploy elasticsearch.

Note: Notice that to re-deploy elasticsearch means that the data currently stored in Elasticsearch will be wiped out. You can check this KB article to know how to generate a backup

Tested products/plugins version

The latest update of this article was tested with:

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.