Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
New Contributor

From HDP-2.5 onwards Ranger installation with Ambari 2.4.0, supports uploading of solrconfig to zookeeper during start of Ranger Admin component. However once default solrconfig.xml is uploaded the modified solrconfig.xml is not uploaded again for the next Ranger Admin start.

To upload modified solrconfig.xml, below manual steps needs to be followed.

1) Edit solrconfig.xml: Ranger solrconfig.xml is located at /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf/solrconfig.xml

2) Upload modified solrconfig.xml under znode used by Ranger Audit: Znode can be found in property ranger.audit.solr.zookeepers as {zookeeper_host}:2181/znode under Ranger Audit Tab.

NOTE: If Ranger is using Ambari Infra solr cloud then default znode is /infra-solr otherwise if it is using externally managed solr cloud znode is /ranger_audits

Use below command to upload, need to also export JAVA_HOME=/usr/jdk64/jdk1.8.0_77

/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string {zookeeper_host}:2181/infra-solr --upload-config --config-dir /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf --config-set ranger_audits 

NOTE: For kerberos env use --jaas-file oprtion and provide the jass file path as /usr/hdp/current/ranger-admin/conf/ranger_solr_jaas.conf

/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string {zookeeper_host}:2181/infra-solr --upload-config --config-dir /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf --config-set ranger_audits --jaas-file /usr/hdp/current/ranger-admin/conf/ranger_solr_jaas.conf

3) Restart Solr Service: If using Ambari Infra, restart Ambari Infra service from Ambari.

NOTE: Using Ambari with HDP-2.6, solrconfig.xml can be modified from Ambari UI as it is exposed under Ranger Service Config tab. It is found under Advanced ranger-solr-configuration in content property entry with label as solr-config template. Restart Ranger Admin Component after saving the modified solrconfig to get it uploaded under znode.

1,830 Views
Comments
Guru

Thanks @mvaradkar for writing this. This is a good find & useful info !

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎03-22-2017 11:23 AM
Updated by:
 
Contributors
Top Kudoed Authors