Feature Pack 4Feature Pack 2Feature Pack 5Feature Pack 3Feature Pack 6

Deploying the WebSphere Commerce search server remotely in the advanced configuration

You can deploy the search server remotely by running the feature enablement scripts. This script deploys the search server remotely, depending on your environment.

Before you begin

  • SolarisLinuxAIXEnsure that you are logged on as the WebSphere Commerce non-root user.
  • For IBM i OS operating systemEnsure that you are logged on as a user that has *SECOFR authority.
  • Ensure that your administrative server is started. For example:
    • If WebSphere Commerce is managed by WebSphere Application Server Deployment Manager (dmgr), start the deployment manager and all node agents. Your cluster can also be started.
    • If WebSphere Commerce is not managed by WebSphere Application Server Deployment Manager (dmgr), start the WebSphere Application Server server1.
  • Ensure that WebSphere Commerce search uses a separate web server. WebSphere Commerce search cannot share a web server with a WebSphere Commerce instance. If you previously configured a web server to be shared by a WebSphere Commerce instance and WebSphere Commerce search, you can follow the support document link in tsdsearchwebserver.html to get instructions for changing your configuration.
  • Determine how you will configure the Web server for the Solr application.

Procedure

  1. Prepare your WebSphere Commerce machine:
    1. Complete one of the following tasks:
      • SolarisLinuxAIXLog on as a WebSphere Commerce non-root user.
      • For IBM i OS operating systemLog on as a user profile that has *SECOFR authority.
      • WindowsLog on with a user ID that is a member of the Windows Administration group.
    2. Ensure that your WebSphere Commerce server is running.
    3. Navigate to the following directory:
      • WC_installdir/bin
    4. Run the enablement script:
      For enabling WebSphere Commerce search:
      • Windowsconfig_ant.bat -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password -DremoteSearchEngine=true Feature Pack 5[search_server_config]
      • For IBM i OS operating systemSolarisLinuxAIX./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password -DremoteSearchEngine=true Feature Pack 5[search_server_config]
      Feature Pack 4Feature Pack 2Feature Pack 5Feature Pack 3Feature Pack 6Note: Setting [-DremoteSearchEngine=true] indicates that the Advanced deployment option applies.

      For more information about enabling WebSphere Commerce search store enhancements, see Enabling starter store enhancements.

    5. Ensure that the script runs successfully.
      If the script runs successfully:
      • SolarisLinuxAIXWindowsThe message BUILD SUCCESSFUL is displayed in the console and in the WC_installdir/instances/instance_name/logs/enablefoundation_timestamp.log file. See the file WC_installdir/instances/instance_name/logs/enablefoundation_timestamp.log for more information.
  2. Prepare your remote machine:
    1. Copy the following directory from your WebSphere Commerce machine:
      • WC_installdir/components/foundation/subcomponents/search
    2. To the directory on your remote machine:
      • working_dir/search

      Where working_dir is a location of your choice on your remote machine for where to copy the WebSphere Commerce search scripts.

    3. Install a supported version of WebSphere Application Server. Then, setup a default WebSphere Application Server profile on the remote machine.
      Note: If you do not setup a default WebSphere Application Server profile, you might encounter the following error:
      WCMD0002E: Command "ws_ant.sh" requires a profile. No default profile exists and a profile name was not specified. 
      Ensure that a default profile exists or use the -profileName parameter to specify the name of an existing profile.

      For more information, see WebSphere Commerce Version 7 software requirements.

    4. Install the database client that matches the WebSphere Commerce machine's database. Update the Path and CLASSPATH as necessary.
      OracleEnsure that the current user environment CLASSPATH includes:
      • Oracle_home/jdbc/lib/ojdbc6.jar
      Where Oracle_home is the full path of Oracle home, for example: /opt/oracle/u01/app/oracle/product/11.1.0/db_1.
    5. Open the following file:
      • working_dir/search/deploy/properties/solr-deploy.properties
    6. Review the property values that were generated during feature enablement and update them if necessary. You must update the web server-related properties on your Solr Web server to match the web server you are using. Also, ensure the WASHostName value is correct for this node as this is important when clustering WebSphere Commerce search.
    7. Run the following command to the deployment Solr WAR. The command creates a WebSphere Application Server profile, all necessary objects, and deploys the WAR:
      1. Navigate to the following directory:
        • WAS_installdir/bin
      2. Run the deployment script:
        • For IBM i OS operating systemSolarisLinuxAIXws_ant.sh -buildfile working_dir/search/deploy/deploySearch.xml -DdbUserPassword=dbuserpwd [-DsolrHome=solrhome] [-DsearchPort=searchServerPort] Feature Pack 3[-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] Feature Pack 5[search_server_config]
        • Windowsws_ant.bat -buildfile working_dir/search/deploy/deploySearch.xml -DdbUserPassword=dbuserpwd [-DsolrHome=solrhome] [-DsearchPort=searchServerPort] Feature Pack 3[-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] Feature Pack 5[search_server_config]
        Where:
        dbuserpwd
        The password for the user who is connecting to the database.
        searchServerPort
        The WebSphere Commerce search port.
        The default value is 3737.
        solrhome
        The location of the Solr home directory path which contains the index data of Solr. The value must be an absolute path.
        The default value is:
        • SolarisLinuxAIXWindowsworking_dir/search/instance_name/search/solr/home
        Feature Pack 3Where:
        solr_wasadminuser
        The WebSphere Application Server administrator user ID for the Solr cell.
        solr_wasadminpassword
        The WebSphere Application Server administrator password for the Solr cell.
        When:
        • A previous version of WebSphere Commerce search is enabled from an earlier Feature Pack version (for example, Feature Pack 2), and
        • WebSphere Application Server administrative security is enabled on the search server and Solr cell, and
        • Feature Pack 4Feature Pack 2Feature Pack 5Feature Pack 3Feature Pack 6When not specifying remoteSearchEngine=true.
      The search_server_config options help automate updating the web server configuration for IBM HTTP Server. If you do not use this option, you must manually configure your web server after you run the enablement script, as described in the next step. When the search_server_config options are used, WebSphere Commerce search helps automate creating the web server configuration. This automation is achieved by passing in more configuration parameters when you run the enablement scripts.
      Important: The automated web server configuration supports IBM HTTP Server (IHS) only. That is, it does not support or include steps for configuring non-IHS web servers such as IIS and SunOne. For other types of web servers, consult the documentation that is provided by the web server vendor to update the configuration.
      This approach includes the following considerations:
      • The WebSphere Commerce search web server's httpd.conf file is automatically created.
      • You can set up a valid configuration where the WebSphere Commerce search and WebSphere Commerce web servers have separate configuration files. That is, you do not need to manually update the plugin-cfg.xml files.
      • If preferred, you do not need to install another copy of IBM HTTP Server. The same installation can be shared with the WebSphere Commerce web server.

        A second IHS process is started to handle search HTTP requests that use the same IHS installation. A second process ensures that the configurations do not collide, while it eases configuration and maintenance.

      Important: You can skip updating the web server configuration if you previously enabled the feature foundation and passed in the search_server_config parameters during the enablement. You can also skip the update if your Solr web server is already configured.
      The following list shows the available parameters with brief explanations of each. Examples can be seen in the following task, along with more-detailed descriptions of each parameter and when it is needed and not needed:The scripts validate the values that are provided for any mandatory parameters. If values for mandatory parameters are blank, the scripts do not proceed. The error message indicates which values must be specified. An example of such an error can be viewed in the following troubleshooting reference:Where search_server_config includes the following parameters that help automate updating the web server configuration for IBM HTTP Server:
  3. Configure the Web server for the Solr application
    The following configuration options are available, depending on your web server and WebSphere Commerce Feature Pack version:
    • Introduced in Feature Pack 2WebSphere Commerce search deployment tasks include steps to manually update the web server configuration for IBM HTTP Server (IHS).
      This approach includes the following considerations:
      • You created the WebSphere Commerce search web server httpd.conf file.
      • A directive to listen on the search virtual host port is added.
      • The web server plug-in is installed on the web server host.
    • Feature Pack 5 or laterWebSphere Commerce search deployment tasks include steps to help automate updating the web server configuration when you use IBM HTTP Server (IHS). This automation is achieved by optionally passing in more configuration parameters when you are running the enablement scripts during the previous step. For more information, see the previous step.
    • For configuring non-IHS web servers such as IIS and SunOne, consult the provided documentation to update the configuration.
  4. Feature Pack 2For Search Term Associations to function properly when deploying search remotely, complete the following steps:
    1. Create the mappings from the WebSphere Commerce server to the remote server:
      • SolarisLinuxAIXNFS mount from the WebSphere Commerce server to the Solr server.
      • WindowsMap from the WebSphere Commerce server to the Solr server.
    2. Open the WebSphere Commerce configuration file and locate the SolrSearch node.
    3. Change solrHome to the directory of the solr search home that is mapped or mounted:

      For instance, in Windows: <SolrSearch solrHome="W:/WebSphere/search/solr/home"/>

    4. Propagate your changes to the WebSphere Commerce configuration file.
  5. Test your search deployment by navigating to the following URL:
    Note: Ensure that your search server is running.
    
    http://host_name:3737/solr/Default/select?q=*%3A*
    
    If successful, you receive a response that resembles the following snippet:
    
    <response>
    -
    <lst name="responseHeader">
    <int name="status">0</int>
    <int name="QTime">140</int>
    -
    <lst name="params">
    <str name="q">*:*</str>
    </lst>
    </lst>
    <result name="response" numFound="0" start="0"/>
    </response>