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

Deploying the WebSphere Commerce search server locally in the standard configuration

You can deploy the search server on your WebSphere Commerce server by running the feature enablement scripts. This script deploys the search server locally on a separate application server profile. This enables the WebSphere Commerce server to statically bind to the local dedicated search server and avoid outgoing network communications to a remote machine.

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.
  • WebSphere Commerce DeveloperEnsure that the test server is stopped and that Rational Application Developer is not running.
  • 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 is being deployed on 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.
Note: If you have completed the Enabling starter store enhancements task, you can skip to step 7.

Procedure

  1. Complete one of the following tasks:
    • SolarisLinuxAIXLog on as a WebSphere Commerce non-root user.
    • WindowsLog on with a user ID that is a member of the Windows Administration group.
    • For IBM i OS operating systemLog on with a user profile that has *SECOFR authority.
  2. Navigate to the following directory:
    • WC_installdir/bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  3. Start the server1 instance:
    • SolarisLinuxAIX./startServer.sh server1
    • WindowsstartServer.bat server1
  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 [-DsolrHome=solrhome] Feature Pack 3[-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] Feature Pack 5[search_server_config]
    • SolarisLinuxAIX./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password [-DsolrHome=solrhome] Feature Pack 3[-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] Feature Pack 5[search_server_config]
    • For IBM i OS operating system./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml -DinstanceName=instance_name -DfeatureName=foundation -DdbUserPassword=db_password Introduced in Feature Pack 3[-DSolrWASAdminUser = solr_wasadminuser] [-DSolrWASAdminPassword = solr_wasadminpassword] Feature Pack 5[-Dscchost=HostForScheduledJobs] Feature Pack 5[search_server_config]
    • WebSphere Commerce DeveloperenableFeature.bat -DfeatureName=foundation [-DsolrHome=solrhome]
    Where:
    solrhome
    Optional: 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:
    • WebSphere Commerce DeveloperWCDE_installdir/search/solr/home
    • SolarisLinuxAIXWindowsWC_installdir/instances/instance_name/search/solr/home
    Feature Pack 3
    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 has been 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:
    For Standard configurations, the feature enablement configures Solr with the following values:
    Solr configuration after enablement for Standard configurations
    Field Value
    Profile name ${instanceName}_solr
    Cell name ${instanceName}_search_cell
    Node name ${instanceName}_search_node
    Application name solr

    Feature Pack 4Solr_instanceName

    Application server name solrServer
    Virtual host VH_${instanceName}_search
    Search virtual host port 3737
    Web server definition name solrWebserver
    Context root /solr
    Data source name WebSphere Commerce Search ${dbType} DataSource ${instanceName}
    JDBC provider name WebSphere Commerce Search ${dbType} JDBC Provider ${instanceName}
    Test URL http://web_server:3737/solr

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

  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 additional information.
    • For IBM i OS operating systemThe message BUILD SUCCESSFUL is displayed in the console and in the WC_instance_root/instances/instance_name/logs/enablefoundation_timestamp.log file. See this file for additional information.
    • WebSphere Commerce DeveloperThe message enableFeature.bat completed is displayed in the command window. See the file WCDE_installdir\logs\enableFeature.log for additional information.
  6. 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.
  7. Restart the search server.
    1. Navigate to the following directory:
      • For IBM i OS operating systemSolarisLinuxAIXWAS_installdir/profiles/Solr_profiledir/bin
      • WindowsWAS_installdir\profiles\Solr_profiledir\bin
      where Solr_profiledir is the directory created for the WebSphere Application Server profile that is used by a WebSphere Commerce search instance.
    2. Stop the server.
      • For IBM i OS operating systemSolarisLinuxAIX./stopServer.sh solrServer
      • WindowsstopServer.bat solrServer
    3. Start the server.
      • For IBM i OS operating systemSolarisLinuxAIX./startServer.sh solrServer
      • WindowsstartServer.bat solrServer
  8. Test your search deployment by navigating to the following URL:
    Note: Ensure your search server is running.
    • WebSphere Commerce Developerhttp://localhost/solr/Default/select?q=*%3A*
    • SolarisLinuxAIXWindowshttp://localhost:3737/solr/Default/select?q=*%3A*
    If successful, you should receive a response resembling 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>