Community Articles

Find and share helpful community-sourced technical articles.
avatar

Prerequisites

1) Service Ambari Infra installed -> Ranger will use Ambari Infra's SolrCloud for Ranger Audit

9902-screen-shot-2016-11-29-at-33941-pm.png

2) MySQL installed and running (I'll use Hive's Metastore MySQL instance * MySQL is one of the many DB options)

9903-screen-shot-2016-11-29-at-34907-pm.png

Installing Apache Ranger using Ambari Infra (SolrCloud) for Ranger Audit

1) Find the location of mysql-connector-java.jar (assume /usr/share/java/mysql-connector-java.jar) run the following command on the Ambari server

sudo ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar 

2) In Ambari, click Add Service

9904-screen-shot-2016-11-29-at-35401-pm.png

3) Choose Ranger and click Next

9905-screen-shot-2016-11-29-at-35439-pm.png

4) Choose "I have met all the requirements above." and click Proceed (this was done in #1 above)

9906-screen-shot-2016-11-29-at-35558-pm.png

5) Assign master(s) for "Ranger Usersync" and "Ranger Admin" and click Next

6) Assign Slaves and Clients - since we did not install Apache Atlas, Ranger TagSync is not required and click Next

7) Customize Services -> Ranger Audit, click on "OFF" to enable SolrCloud

Before clicking:

9907-screen-shot-2016-11-29-at-40043-pm.png

After clicking:

9908-screen-shot-2016-11-29-at-40437-pm.png

😎 Customize Services -> Ranger Admin, enter "Ranger DB host" the DB you chose (in my case, I chose MySQL) and a password "Ranger DB password" for the user rangeradmin *Ranger will automatically add the user "rangeradmin"

9909-screen-shot-2016-11-29-at-40702-pm.png

Add the proper credentials for a DB user that has administrator credentials (this administrator will create the user rangeradmin and Ranger tables)

MySQL create an administrator user *Note: rcicak2.field.hortonworks.com is the server where Ranger is being installed

CREATE USER 'ryan'@'rcicak2.field.hortonworks.com' IDENTIFIED BY 'lebronjamesisawesome';

GRANT ALL PRIVILEGES ON *.* TO 'ryan'@'rcicak2.field.hortonworks.com' WITH GRANT OPTION;

9910-screen-shot-2016-11-29-at-41658-pm.png

Click Next

9) Review -> Click Deploy

* Install, Start and Test will show you the progess of Ranger installing

10) Choose Ranger in Ambari

9911-screen-shot-2016-11-29-at-42235-pm.png

11) Choose "Configs" and "Ranger Plugin" and select the services you'd like Ranger to authorize (You'll need to restart the service after saving changes)

9912-screen-shot-2016-11-29-at-42352-pm.png

2,906 Views