[Recipes] Getting Started with Elasticsearch on Elastic Cloud

Problem: 

Need to setup a new Elasticsearch cluster on Elastic Cloud. Elastic Cloud is the hosted version of Elasticsearch and Kibana from Elastic.co.

Solution Summary: 

Elastic Cloud from Elastic.co support AWS and GCP platforms currently. We can sign up for a 14 day trial and then create a cluster on the platform of our choice without much explicit configuration. 

Prerequisites: 

NA

Solution Steps: 

  1. Go to https://www.elastic.co/cloud.

  2. Click on “Try” option, provide email address and register. Once you verify email and set password you will be ready to get started.

  3. Currently, starts when you create a cluster and not when you create the account. This is the description of services available for free as part of the standard package:

    1. During the 14 day free trial period, you get access to provision a cluster with 4GB memory, 96GB storage and high availability (HA) across two zones, at no cost. You also get a chance to explore Shield, Watcher, Marvel, and Graph. After the free trial period is over, you need to add a credit card to continue using Elastic Cloud.

  4. Click on Create Cluster and select options.

    1. Following selections cannot be changed for the trial:

      1. 4 GB Ram, 96 GB Storage

      2. SSD

      3. 2 Data Centers

    2. Select following from changeable options:

      1. AWS

      2. US East (N Virginia) region

      3. Latest ES. Currently it is 6.2.4

        1. Currently there is a warning for 6.x versions: Note that if you are using Transport Client to connect to Elasticsearch, it is not currently supported for this version. While we work on adding support for this, you can continue to use Elasticsearch's Java client as a workaround.

      4. Enable Automatic Index Creation

        1. If you index a document to an index that does not exist, should it automatically be created?

      5. Allow wildcards for destructive actions.

        1. Should destructive actions like deleting an index require explicit index names?

      6. Leave default selections under ‘Plugins’. But read all descriptions.

      7. Do not provide any user settings but give a name for cluster: Buddy ES Demo.

  5. Click on Create

    1. You may see a message on left with the price details, but it is not applicable for the trial. Moreover, you have not provided the credit card anyway.

    2. You should see following on success:

      1. Username: elastic

      2. Password

      3. Cloud ID:

        1. The Cloud ID simplifies sending data to your cluster on Elastic Cloud. It helps you started with Beats and Logstash quickly.

      4. It may take some more time for your cluster to get started and ready for use.

  6. Anytime, you can click on ‘Clusters’ option on the top bar to see your cluster details such as:

    1. Elasticsearch URL

    2. Kibana URL

    3. Cloud ID

    4. Cluster ID

    5. Dashboard Tab (Kibana)

    6. Node details with following message:

      1. Your cluster is composed of one or more nodes. Nodes will be in different zones to ensure high availability. When your capacity grows big enough, there will be multiple nodes per zone.

      2. Memory pressure is the percentage used of the "old gen" memory pool. If this is high (≥75%), expensive garbage collections will be more frequent. If memory pressure is high, the cluster should be upgraded to have more memory.

      3. There will be a tiebreaker node that does not hold any data and prevents a problem called split bran problem. There will also be two data nodes.

    7. Cluster Performance Metrics

      1. Currently it provides following options:

        1. CPU Usage

        2. CPU Credits

        3. Number of Requests

        4. Search Response Times (ms)

        5. Index Response Times (ms)

        6. Memory Pressure per Node

        7. GC Overhead per Node

      2. It also provides few notes:

        1. Request statistics and response times are aggregated every five minutes. Response times are in milliseconds.

        2. These metrics tell you about cluster performance on Elastic Cloud. To monitor how Elasticsearch itself is performing, use the X-Pack monitoring features (or use Marvel for versions before 5.0).

  7. Finally, you can verify the cluster with an HTTP request. You may use curl in mac to send request. 

    1. curl -u elastic:<password> <endpoint>

      You should see a response similar to this:

      {

        "name" : "instance-0000000000",

        "cluster_name" : "a90e37df8c46a175b099da856ed66e74",

        "cluster_uuid" : "Jwhb3edNRj2gP3MrSbYi8A",

        "version" : {

          "number" : "6.2.4",

          "build_hash" : "ccec39f",

          "build_date" : "2018-04-12T20:45:38.450286Z",

          "build_snapshot" : false,

          "lucene_version" : "7.2.1",

          "minimum_wire_compatibility_version" : "5.6.0",

          "minimum_index_compatibility_version" : "5.0.0"

        },

        "tagline" : "You Know, for Search"

      }

  8. You can also verify the same from Kibana, which you will see in detail in the next note.

  9. After the installation (or once you login again) you can click on ‘Clusters’ option on the top bar to see your cluster details.

Recipe Tags: 

Learn Serverless from Serverless Programming Cookbook

Contact

Please first use the contact form or facebook page messaging to connect.

Offline Contact
We currently connect locally for discussions and sessions at Bangalore, India. Please follow us on our facebook page for details.
WhatsApp (Primary): (+91) 7411174113
Phone (Escalations): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About

CloudMaterials is my blog to share notes and learning materials on Cloud and Data Analytics. My current focus is on Microsoft Azure and Amazon Web Services (AWS).

I like to write and I try to document what I learn to share with others. I believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream