Converting instance directories to configs

Cloudera Search supports converting existing deployments that use instance directories to use configs. This allows you to implement access control using ZooKeeper Access Control Lists and Ranger.

  1. Create a temporary config based on the existing instance directory.
    solrctl config --create [***TEMPORARY NEW CONFIG***] [***EXISTING INSTANCEDIR***] \
    -p immutable=false

    Replace [***TEMPORARY NEW CONFIG***] with a config name and [***EXISTING INSTANCEDIR***] with the name of the instancedir you want to convert.

    For example, if the instance directory name is weblogs_config:
    solrctl config --create weblogs_config_temp weblogs_config \
    -p immutable=false
  2. Delete the existing instance directory.
    solrctl instancedir --delete [***EXISTING INSTANCEDIR***]
    For example:
    solrctl instancedir --delete weblogs_config
  3. Create a config using the same name as the instance directory you just deleted, based on the temporary config you created earlier.
    solrctl config --create [***NEW CONFIG***] [***TEMPORARY NEW CONFIG***] \
    -p immutable=false
    Replace [***NEW CONFIG***] with the name of the instancedir you just deleted and [***TEMPORARY NEW CONFIG***] with the name of the temporary config created earlier in this procedure.
    For example:
    solrctl config --create weblogs_config weblogs_config_temp \
    -p immutable=false
  4. Delete the temporary config:
    solrctl config --delete [***TEMPORARY NEW CONFIG***]
    For example:
    solrctl config --delete weblogs_config_temp
  5. Reload the affected collection:
    solrctl collection --reload [***COLLECTION NAME***]

    Replace [***COLLECTION NAME***] with the name of the collection you want to reload.

    For example:
    solrctl collection --reload weblogs