Ambari Upgrade Guide
Also available as:
PDF

Upgrade Ranger

  1. Back Up Your Ranger Configuration Directories

    Ranger Admin

    mv /etc/ranger/admin/conf /etc/ranger/admin/conf.saved

    ln -s /usr/hdp/current/ranger-admin/conf /etc/ranger/admin/conf

    ls -la /etc/ranger/admin/

    Ranger Usersync

    mv /etc/ranger/usersync/conf /etc/ranger/usersync/conf.saved

    ln -s /usr/hdp/current/ranger-usersync/conf /etc/ranger/usersync/conf

    ls -la /etc/ranger/usersync

  2. On the Ranger host, update the Ranger Admin install properties file:

    vi /usr/hdp/2.3.x.y-z/ranger-admin/install.properties

    using the values from /usr/hdp/2.2.x.y-z/ranger-admin/install.properties.

    The following table lists the HDP 2.2 property strings and the HDP 2.3 property labels for Ranger:

    HDP 2.2 install.properties

    HDP 2.3 Ambari Web UI > Property Names

    DB_FLAVOR

    DB Settings > DB FLAVOR

    SQL_CONNECTOR_JAR

    Admin Settings > Sql Connector Jar location

    db_root_user

    DB Settings > Ranger DB root user

    db_root_password

    DB Settings > Ranger DB root password

    db_host

    DB Settings > Ranger DB host

    db_name

    DB Settings > Ranger DB name

    db_user

    DB Settings > Ranger DB username

    db_password

    DB Settings > Ranger DB password

    audit_db_name

    DB Settings > Ranger Audit DB name

    audit_db_user

    DB Settings > Ranger Audit DB username

    audit_db_password

    DB Settings > Ranger Audit DB password

    policymgr_external_url

    Ranger Settings > External URL
  3. Copy the SQL_CONNECTOR_JAR in install.properties to the following directory:

    /usr/hdp/2.3.x.y-z/ranger-admin/ews/lib

  4. Copy the ranger-admin-default-site.xml file:

    cp /usr/hdp/2.3.x.y-z/ranger-admin/ews/webapp/WEB-INF/classes/conf.dist/ranger-admin-default-site.xml /usr/hdp/2.3.x.y-z/ranger-admin/conf

  5. Copy the security-applicationContext.xml file:

    cp /usr/hdp/2.3.x.y-z/ranger-admin/ews/webapp/WEB-INF/classes/conf.dist/security-applicationContext.xml /usr/hdp/2.3.x.y-z/ranger-admin/conf

  6. Export the RANGER_ADMIN_HOME and JAVA_HOME environment variables.

    export RANGER_ADMIN_HOME=/usr/hdp/2.3.x.y-z/ranger-admin

    export JAVA_HOME=/usr/jdk64/jdk1.7.0_67

  7. On the Ranger host, run the Ranger Admin dba_script and db_setup python scripts, as follows:

    python /usr/hdp/2.3.x.y-z/ranger-admin/dba_script.py -q

    python /usr/hdp/2.3.x.y-z/ranger-admin/db_setup.py

  8. From Ambari Web UI, select Ranger > Summary and click on the Ranger Admin component link. Choose Start from the Ranger Admin drop-down menu.

  9. Choose Ok to confirm Ranger Admin start.

  10. On the Ranger host, run the dba_setup patch script, as follows:

    python /usr/hdp/2.3.x.y-z/ranger-admin/db_setup.py -javapatch

  11. Create symbolic links and overwrite any existing destination files for the Ranger UserSync service.

    ln -sf /usr/hdp/2.3.x.y-z/ranger-usersync/ranger-usersync-services.sh /usr/bin/ranger-usersync

  12. From Ambari Web UI, select Ranger > Summary and click on the Ranger UserSync component link. Choose Start from the Ranger UserSync drop-down menu.

  13. Choose Ok to confirm Ranger UserSync start.

  14. From Ambari Web UI, select Ranger and choose Restart All from the Service Actions menu.

  15. After Ranger has started, select Run Service Check from the Service Actions menu. Confirm the Service Check passes.