This documentation provides the necessary steps to do a manual reinstallation of ranger-admin in Ranger 0.5.0. Sometime if we wanted to have a fresh ranger-admin installation, to clean up the usersync or to have a brand new ranger-admin to work on, the following options are there to work on.
The following step are to be followed to re-install ranger-admin.
Option 1: This option is to remove the ranger schemas from the database, reinstall the ranger-admin and start the ranger-admin/ ranger- usersync via Ambari.
- Update below properties in file /usr/hdp/<version>/ranger-admin/install.properties
- DB_FLAVOR
- SQL_CONNECTOR_JAR
- db_root_user
- db_root_password
- db_host
- db_name
- db_user
- db_password
- audit_db_name
- audit_db_user
- audit_db_password
- policymgr_external_url
- Export below env variable
- export RANGER_ADMIN_HOME=/usr/hdp/<version>/ranger-admin
- export JAVA_HOME=/usr/jdk64/jdk1.7.0_67
- Run python /usr/hdp/<version>/ranger-admin/dba_script.py -q
- Run python /usr/hdp/<version>/ranger-admin/db_setup.py
- From ambari update the new values for corresponding above properties(point 1) in DB Settings accordion in Ranger config.
- User can also check test connection with new db name given in point 1) using Test Connection Button.
- From ambari start Ranger Admin component.
- Run python /usr/hdp/<version>/ranger-admin/db_setup.py -javapatch
- Then start Ranger Usersync component from ambari.
- Once these steps are done, finally restart Ranger service and then do Ranger service check from ambari.
Option 2: This option is to remove the Ranger Service from Ambari and reinstall via Ambari. You must save the Ranger-admin , Ranger- Usersync configuration you already have
- Delete the Ranger component from Amabri
- curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE http://`hostname -f`:8080/api/v1/clusters/cl1/services/RANGER
- Delete ranger db from the databases.
- After deleting , reinstall ranger component via Amabri.