Configuring the search client in Content Deployer

Modify the client configuration file, cd_client_conf.xml , to configure the interaction between Content Deployer and to the IQ Query microservice . In this file, you can specify configuration strings as hardcoded values or as parameters.

About this task

Procedure

  1. On your Content Delivery server environment, access the configuration location of your Content Deployer.
  2. By default, the Discovery Service is assumed to be running on the same machine as the Content Deployer microservice, on the default port, 8082 with default Discovery Service URL: http://localhost:8082/discovery.svc. If the Discovery Service runs on a different host or uses a different port (or both), set an environment variable called discoveryurl to that URL.
  3. By default, the Token Service is assumed to be accessible through the cduser account, using the default password. Do one or both of the following:
    • If you are using a different user account to connect to the Token Service, in the file cd_client_conf.xml , set the value of the ClientId attribute of the TokenService element to either that user account name, or to a string of the format ${ENVVAR}, where ENVVAR is the name of an environment variable whose value is the account name, and save your changes to the file.
    • If you are using a different password to connect to the Token Service (and RWS strongly recommends that you do), create an environment variable called cduserpassword, set to the encrypted version of that password.
  4. RWS strongly recommends entering any sensitive strings, such as passwords, in encrypted form. You can obtain the encrypted form of a sensitive string by doing the following:
    1. In a command shell, navigate to a location that contains the files udp-core-BUILD.jar and udp-common-util-BUILD.jar, where BUILD is the JAR file's build number. For example, you can find these files on the installation media in the folder Content Delivery\roles\api\rest\java\lib\
    2. Depending on your operating system, enter one of the following commands:
      Windows operating systems
      java -cp udp-core-BUILD.jar;udp-common-util-BUILD.jar com.tridion.crypto.Encrypt INPUT 
      Unix operating systems
      java -cp udp-core-BUILD.jar:udp-common-util-BUILD.jar com.tridion.crypto.Encrypt INPUT 

      where INPUT is the unencrypted string. (You may wish to redirect output to a file for easy copy-pasting of the tool's response.)

      The tool returns the following kind of response:
      Configuration value = encrypted:9FUJ9CP81Oj63VhnJxcqx//pW3fP4bekeupIexctzcs=

      where the encrypted string is encrypted:9FUJ9CP81Oj63VhnJxcqx//pW3fP4bekeupIexctzcs=

  5. If you want to change the timeouts for this client, you can set the following environment variables:
    Environment variableDescriptionDefault
    indexconnectiontimeoutThe time (in milliseconds) after which the connection is considered to have timed out10000
    indexreadtimeoutThe time (in milliseconds) after which an attempt to read from a socket is considered to have timed out30000
    indexwritetimeoutThe time (in milliseconds) after which an attempt to write to a socket is considered to have timed out30000
    indexmaxidleconnectionsThe maximum allowed number of idle connections30
  6. RWS strongly recommends that you register all your microservices as Capabilities with the Discovery Service. Only if, for some reason, you have not registered the Index Service as a Capability, you can directly configure the URLs for this service in this client configuration file. To configure the IQ Index Service URL, ensure the presence of an IndexService element within the ServiceConfig element, with a ServiceUri attribute set to either a hardcoded URL of the service, or to a string of the format ${ENVVAR}, where ENVVAR is the name of an environment variable whose value is the URL of the IQ index service. The IQ Index service URL has the form http://HOST:PORT/index.svc, where HOST is the name of the host machine on which the service runs, and PORT is the port number of the service (defaults to 8097).
    For example, the configuration for the service URL using direct URLs can look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ServiceConfig ....>   
    			<!--
            The location of Index service. Used when Index Service capability was not registered in a discovery service.
        -->
     
        <IndexService ServiceUri="http://localhost:8097/index.svc"/>
    </ServiceConfig>
  7. If, for some reason, your Elasticsearch index for indexing does not have the default name udp-index, ensure the presence of a DefaultIndex element within the ServiceConfig element, with an IndexName attribute set to either a hardcoded custom index name, or to a string of the format ${ENVVAR}, where ENVVAR is the name of an environment variable whose value is your custom index name.
  8. If, for some reason, you want to use a custom indexing client, different from the one supplied by RWS, com.sdl.delivery.iq.index.client.DefaultIndexingClient, ensure the presence of an IndexClient element within the ServiceConfig element, with a Class attribute set to either a hardcoded fully qualified Java classname of your custom class, or to a string of the format ${ENVVAR}, where ENVVAR is the name of an environment variable whose value is the fully qualified Java classname of your custom class.
  9. If you've modified, cd_client_conf.xml , save and close it.