Packaging and deploying the WebSphere Commerce Search server in the managed configuration

You can package and deploy the WebSphere Commerce Search server in the managed configuration. The managed configuration is a variation of the advanced configuration, but contains streamlined configuration tasks.

About this task

The following list shows the high-level steps that are associated with packaging and deploying the WebSphere Commerce Search server in the managed configuration:
  1. The WebSphere Commerce (WC) and WebSphere Commerce Search (Search) application packages are prepared for deployment.
  2. The WC and Search packages are deployed in the deployment manager.
  3. Post-deployment tasks are run to set up the WebSphere Commerce Search index for the production database.

Procedure

  1. Create a working directory where you place the directory structure for both the WC and Search packages. The remaining steps refer to this directory as the working_dir.
  2. Prepare the WC application package to be deployed.
    1. Create the following directory: working_dir/WC.
    2. Copy the following file:
      • WC_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
      To the following location:
      • working_dir/WC/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
    3. Copy the following directory:
      • WC_installdir/instances/instance_name/search/pre-processConfig
      To the following location:
      • working_dir/WC/search
    4. Create an archive that is called wc.zip that contains all the content of the working_dir/WC directory.
      That is, the root of the wc.zip file contains the following directories:
      • search
      • xml

      Ensure that you include all custom preprocessing XML files inside wc.zip file, so that you retain any previous customizations.

      For example, the wc-dataimport-preprocess.xml, wc-dataimport-preprocess-common.xml, or wc-dataimport-preprocess-fullbuild.xml files.
  3. Prepare the Search application package to be deployed.
    1. Create the following directory: working_dir/Search.
    2. Copy the following file:
      • Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
      To the following location:
      • working_dir/Search/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
    3. Copy the following directory:
      • WC_installdir/instances/instance_name/search/managed-solr
      To the following location:
      • working_dir/Search
    4. Create an archive that is called search.zip that contains all the content of the working_dir/Search directory.
      That is, the root of the search.zip file contains the following directories:
      • managed-solr
      • xml

      If you have customized the search indexing configuration files, ensure that you apply the same customizations to the managed-solr templates where applicable.

      For example, the wc-data-config.xml file under the master and repeater templates, and the schema.xml file under all three templates.
  4. Update the WC application.
    1. On the authoring or staging server where you generated and created the wc.zip file, create a new file that is called UpdateWCApp.jacl with the following content:
      
      $AdminApp update WC_instance_name partialapp {-contents fullPathTowc.zip}
      $AdminConfig save
      
    2. Go to the following directory: WAS_installdir/bin
    3. Run the following command:
      Windows
      
      wsadmin.bat -f pathToUpdateWCApp.jacl -conntype SOAP -port Management_SOAP_connector_port -host hostname_of_dmgr 
      [-username DM_user_name] [-password DM_pasword]
      
      LinuxAIXFor IBM i OS operating system
      
      ./wsadmin.sh-f pathToUpdateWCApp.jacl -conntype SOAP -port Management_SOAP_connector_port -host hostname_of_dmgr 
      [-username DM_user_name] [-password DM_pasword]
      
      

      Where DM_user_name and DM_pasword are required when application security is enabled.

      The Management SOAP connector port number is defined in the deployment manager server's AboutThisProfile.txt file.

      For example: WC_profiledir/logs/AboutThisProfile.txt.

      If the script runs successfully, the message BUILD SUCCESSFUL is displayed in the console.

    4. Verify on the primary node that the WC application is updated to contain the following changed files:
      • WC_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
      • WC_eardir/search
  5. Update the Search application.
    1. On the authoring or staging server where you generated and created the search.zip file, create a new file that is called UpdateSearchApp.jacl with the following content:
      
      $AdminApp update Search_instance_name partialapp {-contents fullPathTosearch.zip}
      $AdminConfig save
      
    2. Go to the following directory: WAS_installdir/bin
    3. Run the following command:
      Windows
      
      wsadmin.bat -f pathToUpdateSearchApp.jacl -conntype SOAP -port Management_SOAP_connector_port -host hostname_of_dmgr 
      [-username DM_user_name] [-password DM_pasword]
      
      LinuxAIXFor IBM i OS operating system
      
      ./wsadmin.sh-f pathToUpdateSearchApp.jacl -conntype SOAP -port Management_SOAP_connector_port -host hostname_of_dmgr 
      [-username DM_user_name] [-password DM_pasword]
      
      

      Where DM_user_name and DM_pasword are required when application security is enabled.

      The Management SOAP connector port number is defined in the deployment manager server's AboutThisProfile.txt file.

      For example: WC_profiledir/logs/AboutThisProfile.txt.

      If the script runs successfully, the message BUILD SUCCESSFUL is displayed in the console.

    4. Verify on the primary node that the Search application is updated to contain the following changed files:
      • Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
      • Search_eardir/managed-solr
  6. Synchronize the updated applications to all cluster members, if they are not already set up to automatically synchronize. For more information, see WebSphere Application Server synchronization process explained.
  7. Back up the applications.
  8. Set up the WebSphere Commerce Search index for the production database, from either the primary node or authoring environment.
    1. Prepare the input properties file.
      The input properties file (loading.properties) is used to update the SRCHCONF and SRCHCONFEXT database tables in production.
      1. Create a file that is called loading.properties that contains the following structure:
        
        dest.db.user=dbuser
        dest.db.userpwd=dbuserpwd
        dest.db.host=dbhostname
        dest.db.server.port=dbport
        dest.db.type=dbtype
        dest.db.schema=dbschema
        dest.db.name=dbname
        dest.search.server.name=search_server_name
        dest.search.server.port=search_port
        dest.search.dir.path=search_path
        
        Where:
        dbuser
        The production database user name.
        dbuserpwd
        The production database user encrypted password.
        dbhostname
        The production database host name.
        dbport
        The production database port.
        dbtype
        The production database type.
        dbschema
        The production database schema name.
        dbname
        The production database name.
        search_server_name
        The search server name for which the index is built.
        search_port
        The search server port.
        search_path
        The prefix of the preprocess directory.
        For example:
        
        dest.db.user=mydbuser
        dest.db.userpwd=mydbuserencruptedpassword
        dest.db.host=mydbhostname
        dest.db.server.port=50000
        dest.db.type=DB2
        dest.db.schema=wcs
        dest.db.name=wcdbname
        dest.search.server.name=myserver.mycompany.com
        dest.search.server.port=3737
        dest.search.dir.path=C:/WEBSPH~1/COMMER~1/instances/demo/search
        
      2. Save your changes and close the file.
    2. Run the setupSearchIndex utility.
      1. Complete one of the following tasks:
        • LinuxAIXLog on as a WebSphere Commerce non-root user.
        • For IBM i OS operating systemLog on with a user profile that has *SECOFR authority.
        • WindowsLog on with a user ID that is a member of the Windows Administration group.
      2. Go to the following directory:
        • WC_installdir\components\foundation\subcomponents\search\bin
        • WebSphere Commerce DeveloperWCDE_installdir\components\foundation\subcomponents\search\bin
      3. Run the setupSearchIndex utility, either from the authoring environment or the production environment:
        To run the utility from the authoring environment, specify the configWCforSolrAdv action and the loading.properties file:
        • WindowssetupSearchIndex.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password -action configWCforSolrAdv -propFile pathToloading.properties
        • LinuxAIXFor IBM i OS operating system./setupSearchIndex.sh -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password -action configWCforSolrAdv -propFile pathToloading.properties
        To run the utility from the production environment, specify the configWCforSolrAdvLocal action:
        • WindowssetupSearchIndex.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password -action configWCforSolrAdvLocal
        • LinuxAIXFor IBM i OS operating system./setupSearchIndex.sh -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password -action configWCforSolrAdvLocal

      For more information about preparing the input properties file and running the utility, see Setting up the WebSphere Commerce Search index structure for a specific master catalog in the managed configuration.

      When each of the cluster members' applications are updated, a rolling restart occurs for all nodes. Then, depending on the topology, if automatic search index replication is set, it starts with all subordinate nodes replicating the index from their master node.

  9. If the master indexing server resides in the authoring server, hence not managed by the same deployment manager that manages the production search cluster, follow the master configuration steps in the following topic to set up replication on the master: Automating WebSphere Commerce Search replication configuration (with or without the repeater).

What to do next

Verify that the search index is replicated to each of the subordinate servers.