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:
- 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 place the directory structure for both the
WC and Search packages. The remaining steps 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
To the following location:
- 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
To the following location:
-
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:
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
To the following location:
- 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
To the following location:
-
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:
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:
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
-
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:
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
-
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:
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
- Save your changes and close the file.
-
Run the setupSearchIndex utility.
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.
-
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.