While implementing Kerberos security on a small CDH5 cluster (each machine running CentOS 6.4) recently, I ended up making quite a few configuration changes manually on few of the nodes in my cluster. The changes I made resulted in my cluster becomming unstable with few nodes having different configuration (from how I had set up my non-secure Hadoop cluster initially using CDH parcels). I had lost track of some changes I made, and decided to uninstall cloudera manager, CDH software and data.
Following steps specified in ‘Uninstalling Cloudera Manager and CDH’ did not uninstall the software completely. I had to take the following steps to uninstall CDH5 cluster(running on CentOS 6.4 which was installed using parcels):
Step 1) Stop all Cluster services from Cloudera Manager Admin Web page.
Step 2) Stop all Cloudera Management Services.
Step 3) Remove downloaded parcels which were used for installlation purpose. On Cloudera Manager Admin console, click on Parcel indicator icon in the top navigation bar. For each installed parcel, deactive the parcel followed by removing it.
Step 4) Uninstall Cloudera Manager Server. Since I installed cloudera manager server using using cloudera-manager-installer.bin, I had to use the following command:
$ sudo /usr/share/cmf/uninstall-cloudera-manager.sh
All the steps below MUST be executed on each node in the cluster.
Step 1) Stop Cloudera Manager Agent using the following command:
$ sudo service cloudera-scm-agent hard_stop
Step 2) Uninstall software by executing the follwoing command:
$ sudo yum remove ‘cloudera-manager-*’
$ sudo yum clean all
Remove data files and Cloudera Manager from each node in cluster.
Step 1) Remove cloudera Manager data. When you install Cloudera Manager, it creates a partition on each agent host and mounts it as cm_processes. You will have to un mount cm_processes using the following command:
$ sudo umount cm_processes
Step 2) Remove Cloudera Manager data by running the following command:
$ sudo rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera* /var/log/cloudera* /var/run/cloudera*
Please note that if you do not unmount cm_processes as described in Step 1, you will get error meaasge ‘rm: cannot remove `/var/run/cloudera-scm-agent/process’: Device or resource busy’
Step 3) Remove CDH data by executing following commands:
$ sudo rm -Rf /dfs /mapred /yarn (please change these paths based on how you setup your cluster)
$ sudo rm -Rf /var/lib/flume-ng /var/lib/hadoop* /var/lib/hue /var/lib/oozie /var/lib/solr /var/lib/sqoop*
Step 4) Kill the following Cloudera/Hadoop eco-system processes (if running ) on each node:
hdfs
mapred
cloudera-scm
hbase
hue
zookeeper
oozie
hive
impala
flume
Step 5) Remove any remaining Cloudera specific files by executing the following command:
$ sudo rm -Rf /opt/cloudera /etc/hadoop /etc/cloudera-scm-agent /etc/hive /var/run/hdfs-* /var/lib/hive /var/lib/alternatives/hive-conf /etc/alternatives/hive-conf /var/run/hbase /var/log/impalad /var/run/impala /var/lib/impala /var/run/sqoop2 /var/run/solr /var/run/zookeeper /var/run/hadoop-httpfs /var/lib/alternatives/hadoop-conf /etc/alternatives/hadoop-conf
Step 6) Remove Cloudera Manager lock file by executing the following command:
$ sudo rm /tmp/.scm_prepare_node.lock
Step 7) Stop and remove any external databases that you might have setup for Hive metastore, Oozie.
You have successfully un-installed CDH5 and removed all associated data as well as configuration files. In my next blog, I will describe steps to create secure a CDH cluster with Kerberos (including steps on how to set up a new KDC which will be used for securing the cluster).
Do you have blog for setting up Kerberos?
LikeLike
You will find necessary details at https://niksammy.wordpress.com/2014/05/08/securing-hadoop-with-kerberos/
LikeLike
Excellent – nice and cons ice. Thanks very much for providing this for us.
LikeLike