2. Analysis Cockpit Setup

2.1. Prerequisites

Elasticsearch Cluster setup requires:

  • A fully functional installation of Analysis Cockpit version 3.4

  • At least two additional nodes with a similar high-end spec

  • High-performance low-latency networking between all nodes

2.2. Analysis Cockpit preparation

After installation, the Analysis Cockpit runs with a single local Elasticsearch instance as usual. To prepare it for use with a cluster, run es-cluster-install.sh:

nextron@cockpit3:~$ sudo /etc/nextron/analysiscockpit3/es-cluster-install.sh

The script will configure Elasticsearch in the following way:

  • The Analysis Cockpit node continues to be the master node but data is automatically moved away from it once possible.

  • SSL certificates are used for authentication of nodes.

  • Any number of data nodes can be added with exactly the same configuration and certificate (as long as they are reachable).

2.3. Resulting Elasticsearch configuration

The Elasticsearch configuration can be found in /etc/elasticsearch/elasticsearch.yml. It will look like the following:

 1cluster.name: elasticsearch
 2cluster.routing.allocation.exclude._name: elastic-test-01.nextron
 3path.data: /var/lib/elasticsearch
 4path.logs: /var/log/elasticsearch
 5node.roles: [ master, data, ingest ]
 6http.host: _local:ipv4_
 7transport.host: _site:ipv4_
 8discovery.seed_hosts: [ elastic-test-01.nextron ]
 9discovery.zen.minimum_master_nodes: 1
10cluster.initial_master_nodes: [ elastic-test-01.nextron ]
11xpack.security.transport.ssl.enabled: true
12xpack.security.transport.ssl.verification_mode: certificate
13xpack.security.transport.ssl.client_authentication: required
14xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
15xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

The configuration:

  • designates the Analysis Cockpit node as the (only) cluster master.

  • automatically moves existing data away from the Analysis Cockpit node, and distributes it across the other nodes.

  • TLS security is enabled so that nodes authenticate by certificate.

2.4. Cluster Node configuration script

In addition to reconfiguring the Analysis Cockpit, es-cluster-install.sh will create a script es-node-install.sh that contains the required configuration for additional nodes to join the cluster.

2.5. Restarting Elasticsearch

Finally, restart elasticsearch so that it picks up the new configuration:

nextron@cockpit3:~$ sudo systemctl restart elasticsearch