Skip to content

Commit

Permalink
Automatic Elasticsearch clusterization (hitachienergy#2426)
Browse files Browse the repository at this point in the history
* Change defaults and change clustering condition

* Update documentation to mention limitation of Open Distro deployment

* Add fix for logging role

* Fix documentation after review

* Changes in template after review

* Add information to changelog

* Remove enter

* Changes in docs
  • Loading branch information
erzetpe authored and sbbroot committed Aug 17, 2021
1 parent bb30c22 commit 7546377
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- [#2406](https://github.com/epiphany-platform/epiphany/issues/2406) - [Upgrade] [Filebeat] All settings for multiline feature are lost after upgrade
- [#2380](https://github.com/epiphany-platform/epiphany/issues/2380) - Unable to drain nodes with Istio application enabled due to PodDisruptionBudgets
- [#2332](https://github.com/epiphany-platform/epiphany/issues/2332) - [Elasticsearch] Error when having multiple VMs and non-clustered mode

### Updated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
{{ existing_es_config['opendistro_security.authcz.admin_dn'] if (is_upgrade_run) else
[ _epiphany_DNs.admin ] }}
_epiphany_nodes_dn: >-
{%- if specification.clustered -%}
{%- if groups[current_group_name] | length > 1 -%}
{%- set nodes_to_iterate = ansible_play_hosts_all -%}
{%- else -%}
{%- set nodes_to_iterate = [ inventory_hostname ] -%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ transport.port: {{ transport_port }}
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
{% if specification.clustered %}
{% if groups[current_group_name] | length > 1 -%}
discovery.seed_hosts: [{% for host in groups[current_group_name] %}"{{hostvars[host]['ansible_default_ipv4']['address']}}"{%- if not loop.last -%},{% endif %}{% endfor %}]
{% else %}
discovery.seed_hosts: ["{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}"]
Expand All @@ -86,7 +86,7 @@ discovery.seed_hosts: ["{{ ansible_default_ipv4.address | default(ansible_all_ip
{% if is_upgrade_run | default(False) %}
cluster.initial_master_nodes: []
{% else %}
{% if specification.clustered %}
{% if groups[current_group_name] | length > 1 %}
cluster.initial_master_nodes: [{% for host in groups[current_group_name] %}"{{hostvars[host]['ansible_hostname']}}"{%- if not loop.last -%},{% endif %}{% endfor %}]
{% else %}
cluster.initial_master_nodes: ["{{ ansible_hostname }}"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Logging Config
name: default
specification:
cluster_name: EpiphanyElastic
clustered: true
admin_password: PASSWORD_TO_CHANGE
kibanaserver_password: PASSWORD_TO_CHANGE
kibanaserver_user_active: true
Expand Down
7 changes: 1 addition & 6 deletions docs/home/howto/DATABASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,21 +563,16 @@ specification:
count: 2
```

**Default installation will be clustered** - it means, using a configuration like above, Elasticsearch cluster with 2
instances will be created. In order to configure the non-clustered installation of more than one node modify
configuration for Open Distro adding:
**Installation with more than one node will be always clustered** - Option to configure the non-clustered installation of more than one node for Open Distro is not supported.

```yaml
kind: configuration/opendistro-for-elasticsearch
title: OpenDistro for Elasticsearch Config
name: default
specification:
cluster_name: EpiphanyElastic
clustered: False
```

Result of this configuration will be one or more independent nodes of OpenDistro.

By default, Kibana is deployed only for `logging` component. If you want to deploy Kibana
for `opendistro_for_elasticsearch` you have to modify feature mapping. Use below configuration in your manifest.

Expand Down

0 comments on commit 7546377

Please sign in to comment.