🔰 Configure Hadoop and start cluster services using Ansible Playbook

Rishabh
3 min readMar 21, 2021

--

In this task we will configure 1-namenode/Master and2-datanode/Slave nodes and start the cluster services using ansible playbook.

Pre-requisite: For same Use-Case
a. Centos-8
b. jdk-8u171-linux-x64.rpm
c. hadoop-1.2.1–1.86_x64.rpm
d. Ansible installed and configured
e. sshpass must be installed

STEP-1: Update the IP in Ansible Inventory

Here Group load-balancer will be configured as Namenode and Hadoop group as Datanode

STEP-2: Creating a Playbook to do the task

Before we run it we have used some template file so we have to create it that’s lead us to our 3rd step

STEP-3: Creating required template files

These template file has to be created in the same directory where playbook is to make it easier.

To use hadoop data node and slave node we must have these files configured and it is located in /etc/hadoop/ directory
In core-site.xml we need to pass the Masters Ip with port number

Similarly modifying the hdfs-site.xml using Jinja code.

STEP-4: Finally Running the Playbook

STEP-5: Checking for the result

Above we can see that Namenode and Data node are perfectly established
let’s use the dfs-admin command to check even more.

# hadoop dfsadmin -report

Thanks everyone who you guys enjoyed and learned.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Rishabh
Rishabh

Written by Rishabh

Student from B.tech 2nd Year, A proud ARTH learner, love new technologies, Curious about many thing, likes to explore places, love eating pizza and much more.

No responses yet

Write a response