Feature Pack 4Feature Pack 2WebSphere Commerce DeveloperFeature Pack 5Feature Pack 3WindowsFeature Pack 6

Deploying the WebSphere Commerce Developer search server remotely

The search server is deployed in the development environment in an embedded configuration by default. If you prefer to run the search server outside of the WebSphere Commerce application, for example, to reduce the memory footprint of the development environment, you can change it to a remote deployment.

The development environment remote deployment includes running search as a Java EE application server in WebSphere Application Server, on a remote machine from the developer's development environment machine. That is, the search server is deployed on the remote WebSphere Application Server machine.

Before you begin

Ensure that you completed the following tasks, in order:
  1. Enable WebSphere Commerce Developer Feature Pack 2, 3, 4, 5, or 6 using either a DB2 or Oracle database.
  2. Published a search-supported WebSphere Commerce starter store, such as the Madisons, Elite, or Aurora starter store.

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.

Procedure

Prepare your remote machine:
  1. Copy the Solr.war directory on your WebSphere Commerce machine from WCDE_installdir/components/foundation/wc.ear.ext to WCDE_installdir/components/foundation/subcomponents/search/Solr
  2. Copy the following directory from your WebSphere Commerce machine:
    • WCDE_installdir/components/foundation/subcomponents/search/Solr
    To the following 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 and create a default profile.
  4. Install the database client that matches the WebSphere Commerce machine's database. Update the Path and CLASSPATH as necessary.
  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 to match the Web server you are using.
  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:
      • ws_ant.bat -buildfile working_dir/search/deploy/deploySearch.xml -DdbUserPassword=dbuserpwd [-DsolrHome=solrhome] Feature Pack 3[-DSolrWASAdminUser=solr_wasadminuser -DSolrWASAdminPassword=solr_wasadminpassword] Feature Pack 5[search_server_config]
      Where:
      dbuserpwd
      The password for the user that is connecting to the database.
      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:
      • working_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
    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:
    Tip: If the deployment script fails with an error for a missing META-INF/application.xml file from the JACL script, create a file archive for Solr.war and place it in the working_dir/search/solr directory and attempt the deployment again.
  8. 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.
  9. Restart the search server instance:
    Stop the search server instance:
    • stopServer.bat solrServer
    Start the search server instance:
    • startServer.bat solrServer
  10. Test your search deployment by navigating to the following URL:
    Note: Ensure that your search server is running
    • http://host_name/solr/Default/select?q=*%3A*
    If successful, you should 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>