Ranger Policy Migration Tool

There are multiple service repositories present in each service after the migration from Ambari to Cloudera Manager. The new repository name appears as cm_* and contains the basic defaults installed for new deployments, in addition to being properly integrated with the other services under Cloudera Manager management.

Use the Ranger policy migration tool to migrate the old policies to the new repository created by the Ranger Service. To download the ranger policy migration tool, see Software download matrix
  • Usage
    Usage: ranger_policy_migration.py [options]
  • Options:
     -h, --help            show this help message and exit
        -l LOG, --log=LOG     Activity Log
  • Connection:
       URL, User and password information needed to connect to Ranger
        -u HOST_URL, --ranger-host-url=HOST_URL
        Ranger Host Base URL
        -n USER, --username=USER
        Username
        -p PASSWORD, --password=PASSWORD
        Password
        -c CREDENTIALS, --credentials=CREDENTIALS
        Credentials File
      
  • Repo Details:
       Repositories details for migration
        -f REPO_FROM, --from-repo=REPO_FROM
        Ranger Repository "from" Name
        -t REPO_TO, --to-repo=REPO_TO
        Ranger Repository "to" Name
        -m METHOD, --migration-method=METHOD
        Migration Method: m(move) or u(upsert). u is default
  • Migration Control:
    
        Optional, define include/exclude policy "id's" to handle
        
        -e EXCLUDE_POLICIES, --exclude-policies=EXCLUDE_POLICIES
        Comma separated list of policy id's to exclude
        -i INCLUDE_POLICIES, --include-policies=INCLUDE_POLICIES
        Comma separated list of policy id's to include