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.
-
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 isweblogs_config
:solrctl config --create weblogs_config_temp weblogs_config \ -p immutable=false
-
Delete the existing instance directory.
solrctl instancedir --delete [***EXISTING INSTANCEDIR***]
For example:solrctl instancedir --delete weblogs_config
-
Create a config using the same name as the instance directory you just deleted,
based on the temporary config you created earlier.
Replacesolrctl config --create [***NEW CONFIG***] [***TEMPORARY NEW CONFIG***] \ -p immutable=false
[***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
-
Delete the temporary config:
solrctl config --delete [***TEMPORARY NEW CONFIG***]
For example:solrctl config --delete weblogs_config_temp
-
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