Created on 04-23-201609:46 PM - edited 09-16-202201:34 AM
Note - I did receive few complaints about this script that it's failing on new Ambari versions, It happened because of change in kerberos payload. I have modified the script and it works like a charm again for new versions. Please continue to provide me the feedback! 🙂
Disclaimer - "Please do not use unless you know what u r doing! Test on Dev. cluster before using on production systems" 🙂
Automated Kerberos Installation and Configuration – For this post, I have written a shell script which uses Ambari APIs to configure Kerberos on HDP Single or Multinode clusters. You just need to clone our github repository and modify property file according to your cluster environment, execute setup script and phew!! Within 5-10 minutes you should have your cluster completely secured by Kerberos! Cool isn’t it?
Detailed Steps(Demo on HDP Sandbox 2.4):
1. Clone our github repository Ambari server in your HDP Cluster
Note - This script will install and configure KDC on your Ambari Server.
3. Copy setup_kerberos.sh and ambari.props to the host where you want to setup KDC Server
4. Edit and modify ambari.props file according to your cluster environment
Note - In case of multinode cluster, Please don't forget to add comma separated list of hosts as a value of KERBEROS_CLIENTS variable.
Sample output for my Sandbox
[root@sandbox ambari]# cat ambari.props
##### Notes #####
#1. KERBEROS_CLIENTS - Comma separated list of Kerberos clients in case of multinode cluster
#2. Admin princial is admin/admin and password is hadoop
5. Start installation by simply executing setup_kerberos.sh
1. Please run setup_kerberos.sh from KDC_HOST only, you don’t need to setup or configure KDC, this script will do everything for you.
2. If you are running script on Sandbox then please turn OFF maintenance mode for HDFS and turn ON maintenance mode for Zepplin Notebook before executing the script.
1. Before Script execution
2. Script execution is in progress
3. Script execution has finished
Please comment if you have any feedback/questions/suggestions. Happy Hadooping!!