Task 11.1 Description

SIBAYAN BAG
3 min readMar 30, 2021

🔰 Configure Hadoop and start cluster services using Ansible Playbook

First we will configure hadoop master:-

Let see that the hadoop is install or not in the master system…..

Command:- rpm -q hadoop

Now update the inventory with both master and slave ip :-

Now write the ansible playbook for configure Hadoop Slave :-

  1. Code for taking relevant input from the user :-

2. Install Java software :-

3. Install Hadoop Software :-

4. Creating Directory for master node :-

5. Configuring hdfs-site.xml file :-

6. Configuring core-site.xml file :-

7. Start Hadoop Slave service :-

8. Check the service start or not :-

Now run the yml file:-

command : ansible-playbook file_name.yml

Now we need to configure Master Node :-

All the steps is same as the Slave node but one extra step we need to do that is formatting the directory in the name node.

Code for Master Node :-

Now run the code :-

command : ansible-playbook file_name.yml

Now Let see that the Slave is Successfully connected or nor i.e successfully contributed the storage or not..

To Do this just add small piece of yml code to the playbook :-

Now Let see the Output :-

Hence Slave is successfully contributed the storage…..

Task Completed !!!

Thank You For Reading !!

--

--