Configuring Hadoop cluster with Ansible
In this article, we will be automating the setup of Hadoop cluster using Ansible.
Prerequisite setup requires Ansible installed on VM or use pip3 install ansible command to install it.
Here's my inventory file in which Datanode IP and Namenode IP is setup:
And here's the ansible-playbook in which I have installed Java and Hadoop software, and editing of the files are also done using automation:
Here's the playbook for the namenode of hadoop cluster
Now will run the ansible playbook command to configure our namenode
Now, our namenode has been successfully configured in one of the OS, and we can check this by using "jps" command in our namenode OS
After this, we will configuring our datanode and the ansible playbook for the same is shown below!
Now, we will run our ansible playbook for datanode which will be configured in two OS.
Finally, our hadoop cluster has been successfully configured and we can check this by using namenode IP with the port no of hadoop i.e. 50070
Also we can check this through command-line of datanode or namenode by using the following command:
Hence, proved that our hadoop cluster has been configured.
Thankyou for reading!
Devops Engineer
4 年does this code is present in git hub?