The Solr Service
You can install the Solr service through the Cloudera Manager installation wizard, using either parcels or packages, and have the service created and started as part of the first run installation wizard. See Installing Search.
If you elect not to include the Solr service using the installation wizard, you can you the Add Service wizard to perform the installation. The wizard will automatically configure and start the dependent services and the Solr service. See Adding a Service for instructions.
The following sections describe how to configure other CDH components to work with the Solr service.
Configuring Sentry Authorization for Solr
Configuring Sentry Authorization for Solr
- Ensure the following requirements are satisfied:
- Cloudera Search 1.1.1 or later or CDH 5 or later.
- A secure Hadoop cluster.
- Create the policy file sentry-provider.ini as an HDFS file. When you create the policy file sentry-provider.ini follow the instructions in the Policy File section in Configuring Sentry for Search (CDH 4) or Configuring Sentry for Search (CDH 5). The file must be owned by owned by the solr user in the solr group, with perms=600. By default Cloudera Manager assumes the policy file is in the HDFS location /user/solr/sentry. To configure the location:
- Go to the Solr service.
- Click the Configuration tab.
- Under the Service-Wide category, select Sentry and modify the path in the Sentry Global Policy File property.
- Click Save Changes.
- Under the Service-Wide category, go to the Policy File Based Sentry section.
- Check Enable Sentry Authorization Using Policy Files, then click Save Changes.
- Restart the Solr service.
Configuring the Flume Morphline Solr Sink for Use with the Solr Service
To use a Flume Morphline Solr sink, the Flume service must be running on your cluster. See the Flume Near Real-Time Indexing Reference (CDH 4) or Flume Near Real-Time Indexing Reference (CDH 5)for information about the Flume Morphline Solr Sink and The Flume Service.
- Go to the Flume service.
- Click the Configuration tab.
- Expand the Agent default role group and click the Flume-NG Solr Sink category.
- Edit the following settings, which are templates that you must modify for your deployment:
- Morphlines File (morphlines.conf) - Configures Morphlines for Flume agents. You must use $ZK_HOST in this field instead of specifying a ZooKeeper quorum. Cloudera Manager automatically replaces the $ZK_HOST variable with the correct value during the Flume configuration deployment.
- Custom MIME-types File (custom-mimetypes.xml) - Configuration for the detectMimeTypes command. See the Cloudera Morphlines Reference Guide for details on this command.
- Grok Dictionary File (grok-dictionary.conf) - Configuration for the grok command. See the Cloudera Morphlines Reference Guide for details on this command.
Once configuration is complete, Cloudera Manager automatically deploys the required files to the Flume agent's process directory when it starts the Flume agent. Therefore, you can reference the files in the Flume agent configuration using their relative path names. For example, you can use the name morphlines.conf to refer to the location of the Morphlines configuration file.
Deploying Solr with Hue
- Go to the Hue service.
- Click the Configuration tab.
- Search for the word "snippet". This will display a set of Hue advanced configuration snippet properties.
- Add information about your Solr host to the Hue Server Configuration Advanced Configuration Snippet for hue_safety_valve_server.ini found under the
[search] ## URL of the Solr Server solr_url=http://SOLR_HOST:8983/solr
category. For example, if your hostname is SOLR_HOST, you might add the following: - Click Save Changes to save your advanced configuration snippet changes.
- Restart the Hue Service.
- Stop the Hue service.
- From the command line do the following:
cd /opt/cloudera/parcels/CDH 4.3.0-1.cdh4.3.0.pXXX/share/hue
(Substitute your own local repository path for the /opt/cloudera/parcels/... if yours is different, and specify the appropriate name of the CDH 4.3 parcel that exists in your repository.)-
./build/env/bin/python ./tools/app_reg/app_reg.py --install /opt/cloudera/parcels/SOLR-0.9.0-1.cdh4.3.0.pXXX/share/hue/apps/search
sed -i 's/\.\/apps/..\/..\/..\/..\/..\/apps/g' ./build/env/lib/python2.X/site-packages/hue.pth
where python2.X should be the version you are using (for example, python2.4).
- Start the Hue service.
<< The Sentry Service | The Spark Service >> | |