Plugin Templates

Plugin templates are used to create or update service repositories. These templates can be edited then invoked with either:

Warning

This interface is still a “work-in-progess”.

Create service repository

Bash
$ ranger-cli service create --config <service-name>-service.json

Update existing service repository

Bash
$ ranger-cli service update --config <service-name>-service.json --service-id 12345

HDFS

HDFS service JSON template file.

hdfs-service.json
{
    "name": "cl1_hdfs",
    "description": "hdfs service client",
    "isEnabled": true,
    "type": "hdfs",
    "configs": {
        "username": "hdfs",
        "password": "hdfs",
        "fs.default.name": "hdfs://hadoop.example.com",
        "hadoop.security.authorization": true,
        "hadoop.security.authentication": "kerberos",
        "hadoop.security.auth_to_local": "RULE:[1:$1@$0](ambari-qa-hadoop.example.com@EXAMPLE.COM)s/.*/ambari-qa/",
        "dfs.datanode.kerberos.principal": "dn/m1.hadoop.example.com@EXAMPLE.COM",
        "dfs.namenode.kerberos.principal": "nn/m1.hadoop.example.com@EXAMPLE.COM",
        "dfs.secondary.namenode.kerberos.principal": "nn/m1.hadoop.example.com@EXAMPLE.COM",
        "hadoop.rpc.protection": "authentication",
        "ambari.service.check.user": "ambari-qa",
        "tag.download.auth.users": "hdfs",
        "policy.download.auth.users": "hdfs"
    }
}

Hive

Hive service JSON template file.

hive-service.json
{
    "name": "cl1_hive",
    "description": "hive service client",
    "isEnabled": true,
    "type": "hive",
    "configs": {
        "username": "hive",
        "password": "hive",
        "jdbc.driverClassName": "org.apache.hive.jdbc.HiveDriver",
        "jdbc.url": "jdbc:hive2://localhost:10500",
        "ambari.service.check.user": "ambari-qa",
        "tag.download.auth.users": "hive",
        "policy.download.auth.users": "hive",
        "policy.grantrevoke.auth.users": "hive"
    }
}