Administer > Administering WebSphere Commerce search > Deploy WebSphere Commerce search > Deploying the WebSphere Commerce search server
Deploy the WebSphere Commerce search server remotely (advanced deployment mode)
Overview
You can deploy the search server remotely by running the feature enablement scripts. This script deploys the search server remotely, depending on the environment.
For more information, see the following Redbook:
WebSphere Commerce V7.0 Feature Pack 2: Search solution overview and deployment
Deployment options
For this task, only the Advanced deployment option applies. See Deploy WebSphere Commerce search for more information.
- Embedded
- Deploys search as part of the WebSphere Commerce Application.
- Standard
- Creates and deploys a separate search profile and Web module on the same machine as the WebSphere Commerce profile.
- Advanced
- Prepares the deployment package to copy and run the deployment scripts on a remote search machine, where a search profile and Web module is deployed.
Before you begin
- Log on as the non-root user.
- Verify the 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 you have installed the following WebSphere Commerce Feature Pack:
- WebSphere Commerce Feature Pack 2
Procedure
- Prepare the WebSphere Commerce machine:
- Complete one of the following tasks:
- Log on as a WebSphere Commerce non-root user.
- Log on with a user ID that is a member of the Windows Administration group.
- Navigate to the following directory:
- WC_INSTALL/bin
- Start the server1 instance:
- ./startServer.sh server1
- startServer.bat server1
- Run the enablement script:
For enabling WebSphere Commerce search:
- config_ant.bat -buildfile WC_INSTALL/components/common/xml/enableFeature.xml -DinstanceName=instance -DfeatureName=foundation -DdbUserPassword=db_password [-DremoteSearchEngine=true] [-DsolrHome=solrhome]
- ./config_ant.sh -buildfile WC_INSTALL/components/common/xml/enableFeature.xml -DinstanceName=instance -DfeatureName=foundation -DdbUserPassword=db_password [-DremoteSearchEngine=true] [-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:
- WC_INSTALL/instances/instance/search/solr/home
Setting [-DremoteSearchEngine=true] indicates that the Advanced deployment option applies.
For enabling WebSphere Commerce search store enhancements, see Enable starter store enhancements for more information.
- Verify the script runs successfully. If the script runs successfully:
- The message BUILD SUCCESSFUL is displayed in the console and in the WC_INSTALL/instances/instance/logs/enablefoundation_timestamp.log file. See the file WC_INSTALL/instances/instance/logs/enablefoundation_timestamp.log for additional information.
- Prepare the remote machine:
- Copy the following directory from the WebSphere Commerce machine:
- WC_INSTALL/components/foundation/subcomponents/search
- To the directory on the remote machine:
- working_dir/search
- Install WebSphere Application Server and create a default profile.
- Install the database client that matches the WebSphere Commerce machine's database. Update the Path and CLASSPATH as necessary.
- Open the following file:
- working_dir/search/deploy/properties/solr-deploy.properties
- Review the property values that were generated during feature enablement and update them if necessary.
- Run the following command to the deploy Solr WAR. The command creates a WebSphere Application Server profile, all necessary objects, and deploys the WAR:
- Navigate to the following directory:
- WAS_installdir/bin
- Run the deployment script:
- ws_ant.sh –buildfile working_dir/search/deploy/deploySearch.xml -DdbUserPassword=dbuserpwd [-DsolrHome=solrhome]
- ws_ant.bat –buildfile working_dir/search/deploy/deploySearch.xml -DdbUserPassword=dbuserpwd [-DsolrHome=solrhome]
Where:
- dbuserpwd
- The password for the user connecting to the database.
- 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:
- WC_INSTALL/instances/instance/search/solr/home
- Configure the Web server for the Solr application. Using a separate Web server requires you to install and configure another Web server and point it to the Solr profile plugin file.
Currently, the configuration steps do not include the steps for configuring non-IHS Web servers such as IIS and SunOne. For other types of Web servers, consult the respective documentation to update the configuration accordingly.
To configure the Web server for the Solr application, complete the following steps:
- Update the Web server configuration:
- For IBM HTTP Server, open the configuration file httpd.conf
- Add: Listen host_name:3737
- Point the plugin file to PROFILE_HOME/config/cells/instance_search_cell/nodes/instance_search_node/server1/solrWebserver/plugin-cfg.xml
- For Search Term Associations to function properly when deploying search remotely, complete the following steps:
- Create the mappings from the WebSphere Commerce server to the remote server:
- NFS mount from the WebSphere Commerce server to the Solr server.
- Map from the WebSphere Commerce server to the Solr server.
- Open the WebSphere Commerce configuration file and locate the SolrSearch node.
- Change solrHome to the directory of the solr search home mapped or mounted:
For example, in Windows: <SolrSearch solrHome="W:/WebSphere/search/solr/home"/>
- Propagate your changes to the WebSphere Commerce configuration file.
- Test the search deployment by navigating to the following URL:
Ensure the search server is running.
http://host_name: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>
What to do next
After deploying your search server, perform the following tasks:
- Set up the WebSphere Commerce search index structure for a specific master catalog
- Preprocessing the WebSphere Commerce search index data
- Accept the WebSphere Commerce search index
You must consider reviewing the following task to secure the search server:
Related tasks
Deploy the WebSphere Commerce search server locally (standard deployment mode)
Deploy the WebSphere Commerce search server remotely (Developer)