ElasticSearch Cluster: Data Node

For setting up an Elastic-only Node (Data Node) to your EnterMedia cluster download our EnterMedia Docker Elastic script at:

$ cd && curl -Lo entermedia-docker-elastic.sh docker-elastic.entermediadb.org

The Elastic-only node requires access to the repos path in the data shared volume of the cluster. You can NFS mount the same data volume and setup a link to the repos path. Repo shared resource needs to be linked to /media/cluster/cluster-name/XX/repos. Now that you have the shared repos path in place, run the script as root user with the following parameters to create the Elastic-only node:

entermedia-docker-elastic.sh NODE_ID NODE_NAME CLUSTER_NAME ELASTIC_MASTER PUBLISH_HOST
$ sudo ./entermedia-docker-elastic.sh 45 un2-cluster 192.168.100.100 192.168.100.200
  • NODE_ID - Elastic-only node id.
  • NODE_NAME - Elastic-only node name.
  • CLUSTER_NAME - Cluster id we are connecting to.
  • ELASTIC_MASTER - Cluster master node host.
  • PUBLISH_HOST - Elastic-only node publishing host.

Once the docker instance is built, you can verify the startup sequence with the logs command (/media/cluster/cluster-name/XX/logs.sh) and verify cluster stats with the health script (/media/cluster/cluster-name/XX/health.sh).

$ /media/cluster/cluster-name/30/health.sh
{
  "cluster_name" : "unique-cluster",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 50,
  "active_shards" : 100,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}

Alternatively you can mount the repos path with SSHFS in the Elastic-only node with the help of a Docker plugin.