If you are here, you already know that Apache Ranger is becoming an universal Authorization Framework for most of the data platforms in the CLOUD.  To make it easier for new Ranger users to try the Apache Ranger in action, we have created a docker based setup process that will take few steps to make the Apache Ranger running on your system (in few mins).

software prerequisites

Here are the pre-requisites to run Apache Ranger on your system: 

  • You must have a latest version of Docker and Docker-Compose installed on your system
  • You should be able to run BASH (shell) script from your system

Downloading Apache Ranger

With these simple requirements, you can start  downloading the latest version of Apache Ranger using the following command:

Downloading Apache Ranger
mkdir -p ${HOME}/git
cd ${HOME}/git
git clone https://github.com/apache/ranger.git

Bring up Apache Ranger (Builds if needed)

Once you have latest Apache Ranger on your system, you can start the setup of Apache Ranger by following commands below:

Running Apache Ranger - in few minutes ...
cd ${HOME}/git/ranger
# Enable only necessary services to be run along with CORE ranger services
export ENABLED_RANGER_SERVICES="tagsync,hadoop,hbase,kafka,hive,knox,kms" 
# Execute this command to bring the services up (after successful build if it is not already build)
./ranger_in_docker up

The above commands should build the Apache Ranger from the source and creates necessary Docker Containers to run them in Docker. First time startup may take approx. 10 minutes to build all necessary docker container(s) and sub-sequent startup will take less than two minute. Once the process completes successfully, you should be able to login into Apache Ranger UI using http://{hostname_of_docker}:6080 with appropriate credential displayed on the screen.

As specified in the ENABLED_RANGER_SERVICES variables, additional services are also created as docker containers and runs with ranger plugin(s) installed and configured to work with the Ranger instance. You can login into these services (e.g.: Apache Hive Service)  and execute appropriate  (e.g.: Hive SQL) commands to see how Apache Ranger is enforcing your Authorization Policies and also, creates necessary audit records to provide an Enterprise Data Governance Framework.

Shutdown Apache Ranger & related services

If you want to turn off the Apache Ranger & its related services, please follow the instruction below:

Stop Dockers associated with Apache Ranger
# Go to the directory where we downloaded the Apache Ranger
cd ${HOME}/git/ranger
# Execute this command to bring services down 
./ranger_in_docker down

You can always bring the services up by following the instruction specified in section:  Bring up Apache Ranger (Builds if needed)

List of Ranger Services & its LISTEN port

#Service NameListen PortCore Ranger Service ?
1ranger6080/tcpY (ranger engine - 3.0.0-SNAPSHOT version)
2ranger-postgres5432/tcpY (ranger datastore)
3ranger-solr8983/tcpY (audit store)
4ranger-zk2181/tcpY (used by solr)
5ranger-usersync-Y (user/group synchronization from Local Linux/Mac)
6ranger-kms9292/tcpN (needed only for Encrypted Storage / TDE)
7ranger-tagsync-N (needed only for Tag Based Policies to be sync from ATLAS)

List of Data Engine Services (protected by Apache Ranger) & its LISTEN port

#Service NameListen PortService Description


Apache Hadoop 3.3.0
Protected by Apache Ranger's Hadoop Plugin

Apache HBase 2.4.6
Protected by Apache Ranger's HBase Plugin


10000/tcpApache Hive 3.1.2
Protected by Apache Ranger's Hive Plugin
4Kafka6667/tcpApache Kafka 2.8.1
Protected by Apache Ranger's Kafka Plugin
5Knox8443/tcpApache Knox 1.4.0
Protected by Apache Ranger's Knox Plugin

If you have any questions, please feel free to reach us via Ranger User Group Community. 
Subscribe to Apache Ranger User Group by sending an email to  user-subscribe@ranger.apache.org  

  • No labels