Create your ElasticSearch cluster in four steps

elasticsearch

In this blog post, we show how to install an ElasticSearch Cluster on any cloud in four easy steps. If you’re new to ElasticSearch, it is a powerful open source search and analytics engine that makes it easy to explore, query, and manipulate big data. It’s built on top of Apache Lucene, a Java search engine library. To process large amounts of data, it helps to configure ElasticSearch as a cluster on which different ElasticSearch nodes process data in parallel.

To install an ElasticSearch cluster on a Linux distribution using ElasticBox, you just need our ElasticSearch box where you can adjust configuration parameters to suit your scenario.

Get to know some ElasticSearch cluster concepts

First, let’s go over some of the concepts in our cluster configuration:

  • Shard is the Lucene instance that stores each document (data) also known as primary shards.
  • Number of replicas are the number of shards with a copy of the primary shard.
  • Data nodes are those on which ElasticSearch distributes primary and replica shards.
  • Master node is the one in charge of managing cluster operations. Although not recommended, you can configure a master node to act as a data node.

Deploy an ElasticSearch cluster in ElasticBox

  1. Click New Instance and select the ElasticSearch box. 
    select-elasticsearch-box
  2. In the next step, create a deployment profile, which lets you pick deployment options such as a cloud provider, datacenter, number of instances, network and firewall rules, and the like. Pay special attention to Instances as they determine the number of nodes that form your ElasticSearch cluster. Save the profile.
    create-dep-profile
  3. Back in the instance dialog, expand ElasticSearch to see the variables for this deployment. Set the number of shards, replica sets, master election policy of your cluster and click Deploy.
    enter-variable-dep-values
  4. Now ElasticBox starts deploying the instances and gives you an endpoint. If you like, you can edit any of the deployment variables or scripts even after deploying using the instance Lifecycle Editor. BOOM DONE! There you go, we have a 4-node ElasticSearch cluster running in a matter of minutes.
    see-deployed-cluster

Optionally, test the cluster

To test that your ElasticSearch cluster is working, and all the configuration details are correct, you can execute the following call to the ElasticSearch REST API.

 curl -XPOST http://<INSTANCE_IP>:<REST_PORT>/_cluster/health?pretty

This command should output something similar to “{cluster_name: ebx_cluster, status: green, number_of_nodes: 4, number_of_data_nodes: 4, …}”.

Remember that you can always reconfigure your ElasticSearch cluster settings using the ElasticSearch API. Don’t hesitate to contact us if you’d like to us to share the ElasticSearch cluster box with you.

Hacker News

Categories: Cloud Application Management, Cloud Computing, Cool Features & Tutorials, ElasticBox
Tags: , , , , , , ,