Ranger Admin Settings
On the Customize Services page, select the Ranger Admin tab, then use the DB Flavor drop-down to select the database type that you are using with Ranger.
Enter the database server address in the Ranger DB Host box.
Table 3.1. Ranger DB Host
DB Flavor Host Example MySQL <HOST[:PORT]> c6401.ambari.apache.org
or
c6401.ambari.apache.org:3306
Oracle <HOST:PORT:SID> c6401.ambari.apache.org:1521:ORCL <HOST:PORT/Service> c6401.ambari.apache.org:1521/XE PostgreSQL <HOST[:PORT]> c6401.ambari.apache.org
or
c6401.ambari.apache.org:5432
MS SQL <HOST[:PORT]> c6401.ambari.apache.org
or
c6401.ambari.apache.org:1433
SQLA <HOST[:PORT]> c6401.ambari.apache.org
or
c6401.ambari.apache.org:2638
Ranger DB name -- The name of the Ranger Policy database, i.e. ranger_db. Please not that if you are using Oracle, you must specify the Oracle tablespace name here.
Driver class name for a JDBC Ranger database -- the driver class name is automatically generated based on the selected DB Flavor. The table below lists the default driver class settings. Currently Ranger does not support any third party JDBC driver.
Table 3.2. Driver Class Name
DB Flavor Driver class name for a JDBC Ranger database MySQL com.mysql.jdbc.Driver Oracle oracle.jdbc.driver.OracleDriver PostgreSQL org.postgresql.Driver MS SQL com.microsoft.sqlserver.jdbc.SQLServerDriver SQLA sap.jdbc4.sqlanywhere.IDriver Ranger DB username and Ranger DB Password -- Enter the user name and passwords for your Ranger database server. The following table describes these settings in more detail. You can use the MySQL database that was installed with Ambari, or an external MySQL, Oracle, PostgreSQL, MS SQL or SQL Anywhere database.
Table 3.3. Ranger DB User Name Settings
Property Description Default Value Example Value Required? Ranger DB username The username for the Policy database. rangeradmin rangeradmin Yes Ranger DB password The password for the Ranger Policy database user. PassWORd Yes JDBC connect string
Important Currently the Ambari installer generates the JDBC connect string using the
jdbc:oracle:thin:@//host:port/db_name
format. You must replace the connection string as described in the following table:Table 3.4. JDBC Connect String
DB Flavor Syntax Example Value MySQL jdbc:mysql://DB_HOST:PORT/db_name jdbc:mysql://c6401.ambari.apache.org:3306/ranger_db Oracle For Oracle SID:
jdbc:oracle:thin:@DB_HOST:PORT:SID
jdbc:oracle:thin:@c6401.ambari.apache.org:1521:ORCL For Oracle Service Name:
jdbc:oracle:thin:@//DB_HOST[:PORT][/ServiceName]
jdbc:oracle:thin:@//c6401.ambari.apache.org:1521/XE PostgreSQL jdbc:postgresql://DB_HOST/db_name jdbc:postgresql://c6401.ambari.apache.org:5432/ranger_db MS SQL jdbc:sqlserver://DB_HOST;databaseName=db_name jdbc:sqlserver://c6401.ambari.apache.org:1433;databaseName=ranger_db SQLA jdbc:sqlanywhere:host=DB_HOST;database=db_name jdbc:sqlanywhere:host=c6401.ambari.apache.org:2638;database=ranger_db Setup Database and Database User
If set to Yes -- The Database Administrator (DBA) user name and password will need to be provided as described in the next step.
Note Ranger does not store the DBA user name and password after setup. Therefore, you can clear these values in the Ambari UI after the Ranger setup is complete.
If set to No -- A No indicates that you do not wish to provide Database Administrator (DBA) account details to the Ambari Ranger installer. Setting this to No continues the Ranger installation process without providing DBA account details. In this case, you must perform the system database user setup as described in Setting up Database Users Without Sharing DBA Credentials, and then proceed with the installation.
Note If No is selected and the UI still requires you to enter a user name and password in order to proceed, you can enter any value -- the values do not need to be the actual DBA user name and password.
Database Administrator (DBA) username and Database Administrator (DBA) password -- The DBA username and password are set when the database server is installed. If you do not have this information, contact the database administrator who installed the database server.
Table 3.5. DBA Credential Settings
Property Description Default Value Example Value Required? Database Administrator (DBA) username The Ranger database user that has administrative privileges to create database schemas and users. root root Yes Database Administrator (DBA) password The root password for the Ranger database user. root Yes If the Oracle DB root user Role is SYSDBA, you must also specify that in the Database Administrator (DBA) username parameter. For example, if the DBA user name is
orcl_root
you must specifyorcl_root AS SYSDBA
.Note As mentioned in the note in the previous step, if Setup Database and Database User is set to No, a placeholder DBA username and password may still be required in order to continue with the Ranger installation.
The following images show examples of the DB settings for each Ranger database type.
Note To test the DB settings, click Test Connection. If a Ranger database has not been pre-installed, Test Connection will fail even for a valid configuration.
MySQL
Oracle -- if the Oracle instance is running with a Service name.
Oracle -- if the Oracle instance is running with a SID.
PostgreSQL
MS SQL
SQL Anywhere