Packaging and deploying the WebSphere Commerce search server in the managed configuration
About this task
- The WebSphere Commerce (WC) and WebSphere Commerce search (Search) application packages are prepared for deployment.
- The WC and Search packages are deployed in the deployment manager.
- Post-deployment tasks are run to set up the WebSphere Commerce search index for the production database.
Procedure
- Create a working directory where you will place the directory structure for both the WC and Search packages. The remaining steps will refer to this directory as the working_dir.
- Prepare the WC application package
to be deployed.
- Create the following directory: working_dir/WC.
- Copy the following file:
- WC_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
- working_dir/WC/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
- Copy the following directory:
- WC_installdir/instances/instance_name/search/pre-processConfig
- working_dir/WC/search
- 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.
- Prepare the Search application package
to be deployed.
- Create the following directory: working_dir/Search.
- Copy the following file:
- Search_eardir/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
- working_dir/Search/xml/config/com.ibm.commerce.catalog-ext/wc-search.xml
- Copy the following directory:
- WC_installdir/instances/instance_name/search/managed-solr
- working_dir/Search
- 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.
- Update the WC application.
- 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
- Go to the following directory: WAS_installdir/bin
- Run the following command:
wsadmin.bat -f pathToUpdateWCApp.jacl -conntype SOAP -port Management_SOAP_connector_port -host hostname_of_dmgr [-username DM_user_name] [-password DM_pasword]
./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.
- 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
- 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:
- Update the Search application.
- 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
- Go to the following directory: WAS_installdir/bin
- Run the following command:
wsadmin.bat -f pathToUpdateSearchApp.jacl -conntype SOAP -port Management_SOAP_connector_port -host hostname_of_dmgr [-username DM_user_name] [-password DM_pasword]
./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.
- 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
- 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:
- 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.
- Back up the applications.
- Set up the WebSphere Commerce search index for the production
database, from either the primary node or authoring environment.
- Prepare the input properties file.The input properties file (loading.properties) is used to update the SRCHCONF and SRCHCONFEXT database tables in production.
- Create a file that is called loading.properties that
contains the following structure:
Where: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
- 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
- Save your changes and close the file.
- Create a file that is called loading.properties that
contains the following structure:
- Run the setupSearchIndex utility.
- Complete one of the following tasks:
- Log on as a WebSphere Commerce non-root user.
- Log on with a user profile that has *SECOFR authority.
- Log on with a user ID that is a member of the Windows Administration group.
- Go to the following directory:
- WC_installdir\components\foundation\subcomponents\search\bin
- WCDE_installdir\components\foundation\subcomponents\search\bin
- 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:
- setupSearchIndex.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password -action configWCforSolrAdv -propFile pathToloading.properties
- ./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:- setupSearchIndex.bat -instance instance_name -masterCatalogId masterCatalogId -dbuser db_user -dbuserpwd db_password -action configWCforSolrAdvLocal
- ./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.
- Complete one of the following tasks:
- Prepare the input properties file.
- 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).