DevOps Classroomnotes 09/Dec/2022

Elastic Search Installation

  • Elastic Stack Architecture
    Preview
  • Refer Here for the video for your system setup on Windows.

Configuring your ssh-key as private key

  • On your laptop. Launch Powershell/Terminal as Administrator
ssh-keygen
  • in your <home-directory>\.ssh => id_rsa (private key) and id_rsa.pub (public key)
  • AWS

    • Navigate to the EC2 service
    • Select Key Pairs => Actions => Import Key Pair
      Preview
      Preview
  • Azure:
    • Create ssh keys resource
      Preview
      Preview

Steps

  • Installation on Ubuntu Refer Here and if you have to use Redhat based linux Refer Here
  • Create an ec2 instance as discussed in the classroom
  • Now login into ec2 instance
  • The installation approach which we are following is apt based Refer Here
  • Execute the following commands
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
sudo apt-get install apt-transport-https
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt-get update && sudo apt-get install elasticsearch -y
  • Once we install elastic search
--------------------------- Security autoconfiguration information ------------------------------

Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.

The generated password for the elastic built-in superuser is : BkrPd6l_azZAUGlds*3h

If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token-here>'
after creating an enrollment token on your existing cluster.

You can complete the following actions at any time:

Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.

Generate an enrollment token for Kibana instances with
 '/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.

Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.

-------------------------------------------------------------------------------------------------
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
 sudo systemctl daemon-reload
 sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
 sudo systemctl start elasticsearch.service
  • In the previous versions of elastic search was insecure but in latest versions it is secure by default. Refer Here
  • Lets try to start elastic search
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl status elasticsearch.service

Preview
* We need to open 9200 port. Lets open this in AWS EC2 security groups
Preview
* Elastic search will have configuration files in /etc/elasticsearch
* The configuration file needs to be changed to make this cluster up /etc/elasticsearch/elasticsearch.yml
* We will fix this in the next sesion

  • Elastic Search:
    • Is built on top of Apache lucene Refer Here and is written in JAVA
    • Lucene was built to search text from larger docs.

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube