Lab2 (1)

pdf

School

Centennial College *

*We aren’t endorsed by this school

Course

101

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

3

Uploaded by HighnessBraveryButterfly42

Report
SRT411: Digital Data Analysis Winter 2023 pg. 1 SRT411: Lab 02 (5%) Creating an Elasticsearch Cluster Objective In this lab, you will create an ES cluster with multiple nodes. What to do To complete this lab, these objectives must be completed: Work with clusters, nodes and data you have in Elasticsearch. Each student will create a cluster of three Elasticsearch nodes, one will be the master and the other two will be the data nodes. To change and check the basic cluster configurations. Set the index pattern to configure which indices to analyze. Students will use both the console and Kibana to work on this lab. Tasks Task 0: Create a report 1. Create a word document, and write the details of your lab completion in it. This will serve as proof that the lab was satisfactorily completed. 2. Each heading should be a task (Task 1, Task 2, etc.), with screenshots and descriptions that prove the task was completed satisfactorily. Fill these headings out as you complete the lab. Task 1: Create & Test the cluster Use the machine you have created in the last lab and edit the “elasticsearch.yml” file to set the following values: Node name: “srt411master Master.node: “true” Cluster: “srt411” Network.host: xxx.xxx.xxx.xxx Create another two Linux servers with ES installed [ No need to install other components like Logstash and Beats ]. The second and third machines are the two new data nodes that will join the master node called “ srt411master ”.The following configuration must be set by editing “ elasticeasrch.yml” file: 1. [ Machine 2 ] Node name: “srt411data1 Node.master: “false” Node.data: “true” Cluster: “srt411” Network.host: xxx.xxx.xxx.xxx 2. [ Machine 3 ] Node name: “srt411data2 Node.master: “false” Node.data: “true” Cluster: “srt411” Network.host: xxx.xxx.xxx.xxx Two additional values, needs to be set for all three machines are: discovery.zen.ping.unicast.hosts [Put IP addresses for all 3 machines here separated by “,” ] cluster.initial_master_nodes: IP address of the master node. Once all the THREE machines are properly configured, start the master node first and then the data nodes. Take screenshots as how you are starting your machines and in which order ?
SRT411: Digital Data Analysis Winter 2023 pg. 2 After all the three nodes are up and running, show the configuration for each node to verify their status, health and other cluster information. You can use the curl Get command on the terminal and can make use of the browser. Take screen shots of your terminal as well as the web browser displaying the machine configurations. Elasticsearch default heap size is 1GB, change the min and max heap size to 512 MB(ideally half of the available RAM size) for each node, needs to restart the nodes to make changes in effect. Modify the “kibana.yml” to listen to the ES servers. For this task, you need to take screenshots and include in your report. Don’t forget to tag the screen with your student id and timestamp while taking screen shots. Task 2: Data Query Use Kibana console for this task: Write the command to query how many indices are there in the cluster and what are their names? Write the command to query all documents in all indices of your cluster. By default, only the first 10 rows will be displayed. Write the command to create a new index named “ mydata”. Write the command to add the following two documents in the index called “ mydata ” one by one. Use _doc for the type and their respective ids. You have to provide ids while putting the data in Elasticsearch. Look for PUT and POST commands and should be able to identify the difference and pick the right command for this step. Id title category date first_name last_name company 1 Better query execution Engineering 15-Jul-21 Adrien Grand Elastic 2 The Story of Sense 28-May-21 Boaz Leskes Write the GET command to retrieve the document with id of 1 and type _doc from the myData” index. Write the command to delete the document with id 2 from the “ myData” index. Verify it was deleted by trying to GET it again, record the response. Take screenshots of each command and the result of execution and include in your report. Task 3: Index Management Take screenshot of showing the cluster health and information about your nodes using index management. Task 4:Answer the following Question What is a cluster and node in Elasticsearch? What are the main differences between master and data nodes? Which type of nodes hold the documents? Describe how ES stores data? Describe the benefits of JSON objects. Compare a traditional RDBMS and ES for data storage.
SRT411: Digital Data Analysis Winter 2023 pg. 3 Demonstration & Deliverables Submit the written report in pdf format . Demonstrate that all nodes in your cluster are up and running and you have all the required data added. Reference Links 1. https://www.elastic.co/guide/en/elasticsearch/reference/current/add-elasticsearch-nodes.html 2. https://kifarunix.com/setup-multi-node-elasticsearch-cluster/ 3. https://www.edureka.co/blog/elk-stack-tutorial/ 4. https://www.lynda.com/course-tutorials/Learning-Elastic-Stack/704137-2.html 5. https://logz.io/learn/complete-guide-elk-stack/#installing-elk
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help