Deploying Coveo for Sitecore on the Content Delivery Servers
Deploying Coveo for Sitecore on the Content Delivery Servers
This guide is part of the Coveo for Sitecore Scaling Guide and considers that you have a setup similar to the one in that guide.
If not, read the steps carefully since you’ll need to tailor some of them for your environment.
Step 1: Copying the Package to CDs
The Coveo for Sitecore installation package contains several files that are added to the Sitecore website directory.
-
Locate the installation package you used for the content manager (see Downloads).
-
Unzip the
Coveo for Sitecore XX <BUILD_NUMBER>.zip. -
Open the
package.zipfile. -
Copy the contents of the
filesfolder to the appropriate folders on each CD. Thefilesfolder mimics the folder structure found in the Sitecore website.-
For Sitecore 7 and Sitecore 8 deployments, copy the contents of the
filesfolder into the corresponding folders underLocal Disk\inetpub\wwwroot\<SITECORE_INSTANCE>\Website\on each CD. -
For Sitecore 9 deployments, copy the contents of the
filesfolder into the corresponding folders underLocal Disk\inetpub\wwwroot\<SITECORE_INSTANCE>on each CD.
-
Copying Coveo for Sitecore SXA files to CDs
If you’re using SXA, copy the Coveo for Sitecore SXA package files to your CDs the same way you did above.
-
Locate the installation package you used for the content manager (see Downloads).
-
Unzip the appropriate
Coveo for Sitecore SXA <SXA_VERSION(S)> <BUILD_NUMBER>.zipfile, based on the version of Sitecore you’re using. -
Open the
package.zipfile. -
Copy the contents of the
filesfolder to the appropriate folders on each CD. Thefilesfolder mimics the folder structure found in the Sitecore website.-
For Sitecore 8 deployments, copy the contents of the
filesfolder into the corresponding folders underLocal Disk\inetpub\wwwroot\<SITECORE_INSTANCE>\Website\on each CD. -
For Sitecore 9 deployments, copy the contents of the
filesfolder into the corresponding folders underLocal Disk\inetpub\wwwroot\<SITECORE_INSTANCE>on each CD.
-
Step 2: Ensuring Access to the Encryption Keys
Coveo for Sitecore creates a Coveo directory in the Sitecore instance Data directory to store configuration encryption keys (ConfigurationEncryptionKeys\IndexingEncryptionKeys).
These keys must be the same on all the Sitecore instances to be able to decrypt the encrypted configuration elements.
-
Navigate to
Local Disk\inetpub\wwwroot\<SITECORE_INSTANCE>\Data\. -
Copy the folder
Coveoto each CD server in theirDatafolder.
The encryption keys are stored in the Properties table of the core database.
If your CMs and CDs don’t share the same core database, make sure you have a replication strategy in place.
The encryption keys are stored in the Properties table of the core database (for Sitecore versions up to 9.0 inclusively) or the web database (for Sitecore versions 9.1 onwards).
These encryption keys must be the same on all the Sitecore instances to be able to decrypt the encrypted configuration elements.
If your CMs and CDs don’t share the same core/web database, make sure you have a database replication strategy in place.
Step 3: Copying the Configuration Files
Since the index is shared between all the Sitecore instances, you need to configure all the additional Sitecore instances to use the same base configuration as the CM1 Sitecore instance:
-
Delete the additional Sitecore instances
App_Config\Include\Coveofolder. -
Copy the
App_Config\Include\Coveofolder from theCM1Sitecore instance to all the additional Sitecore instances. -
Sitecore 9 Copy the
App_Config\Modules\Coveofolder from theCM1Sitecore instance to all the additional Sitecore instances.
Step 4: Enabling SwitchMasterToWeb
|
|
Note
Sitecore provides a file named
Coveo provides a Both files should be enabled.
To ensure that all indexes are disabled correctly, we recommend that you move Sitecore first parses |
-
Enable the Sitecore
SwitchMasterToWeb.config.examplefile by removing the.exampleextension. -
Enable the Coveo
SwitchMasterToWeb.Coveo.config.examplefile by removing the.exampleextension. -
Open the
SwitchMasterToWeb.Coveo.configfile and apply the following changes:-
You should apply the following patches as only the index definition for the
pubdatabase is used, the others have to be removed:NoteThe CD servers shouldn’t be used to perform indexing tasks. All
<strategy>elements must be removed from the<index>definition.<indexes> <index id="Coveo_master_index"> <patch:delete /> </index> <index id="Coveo_web_index"> <patch:delete /> </index> <index id="Coveo_pub_index"> <strategies> <patch:delete /> </strategies> </index> </indexes> -
In the scenario above, only the
pubandcoredatabases are used on the CD servers. By default, Coveo for Sitecore creates sites using thewebdatabase, which will cause an error in the current setup. To change the sites, create a<sites>section and patch the references to use thepubdatabase:<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> ... <sites> <site name="coveorest"> <patch:attribute name="database">pub</patch:attribute> </site> <site name="coveoanalytics"> <patch:attribute name="database">pub</patch:attribute> </site> <site name="coveo_website"> <patch:attribute name="database">pub</patch:attribute> </site> </sites> </sitecore> </configuration> -
Remove the
sitecore/schedulingelement and itsSynchronizeTopResultsagent, as thewebdatabase isn’t used anymore.
-
-
Open the
Coveo.SearchProvider.Custom.configfile located in theApp_Config\Include\Coveofolder and apply the following changes:-
Coveo for Sitecore (June 2016) A Content Delivery server shouldn’t synchronize the top results or clean up the indexes, as it doesn’t index items. The Coveo for Sitecore agents need to be deleted:
-
Locate the
sitecore/schedulingelement. It should look like this:<scheduling> <agent name="CoveoSynchronizeTopResults"> <DatabasesToSynchronize>master;web;pub</DatabasesToSynchronize> </agent> </scheduling> -
Replace the Top Results agent inner element with
<patch:delete />, as such:<scheduling> <agent name="CoveoSynchronizeTopResults"> <patch:delete /> </agent> </scheduling> -
Also replace the
CleanUpAfterRebuildAgentinner element with<patch:delete />, as such:<scheduling> <agent type="Coveo.CloudPlatformClient.Agents.CleanUpAfterRebuildAgent, Coveo.CloudPlatformClient"> <patch:delete /> </agent> </scheduling>
-
-
Furthermore, we recommend that you skip the Sitecore login validation and credentials update, to simplify the deployment. Add the following section in the
defaultIndexConfigurationelement:<defaultIndexConfiguration> ... <securityConfiguration type="Coveo.Framework.Configuration.SecurityConfiguration, Coveo.Framework"> <skipSitecoreCredentialsUpdate>true</skipSitecoreCredentialsUpdate> <skipSitecoreLoginCheck>true</skipSitecoreLoginCheck> </securityConfiguration> </defaultIndexConfiguration> -
During the initialization, Coveo for Sitecore accesses CES to validate it has been properly initialized. This step isn’t necessary on Content Delivery servers, and should be skipped. Add the following element in the
defaultIndexConfigurationsection:<defaultIndexConfiguration> ... <skipFirstTimeSetupCheck>true</skipFirstTimeSetupCheck> </defaultIndexConfiguration>
-
-
Save and close the files.
-
Enable the Sitecore
SwitchMasterToWeb.config.examplefile by removing the.exampleextension. -
Enable the Coveo
SwitchMasterToWeb.Coveo.config.examplefile by removing the.exampleextension. -
In the Coveo for Sitecore Scaling Guide, a new Pub database was created. You should apply the following patches only if you use a different database than web for your CD servers.
-
Open the
SwitchMasterToWeb.Coveo.configfile and apply the following changes:NoteThe CD servers shouldn’t be used to perform indexing tasks. All
<strategy>elements must be removed from the<index>definition.<indexes> <index id="Coveo_master_index"> <patch:delete /> </index> <index id="Coveo_web_index"> <patch:delete /> </index> <index id="Coveo_pub_index"> <strategies> <patch:delete /> </strategies> </index> </indexes> -
By default, Coveo for Sitecore creates sites using the
webdatabase, which will cause an error in the current setup. To change the sites, create a<sites>section and patch the references to use thepubdatabase:<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> ... <sites> <site name="coveorest"> <patch:attribute name="database">pub</patch:attribute> </site> <site name="coveoanalytics"> <patch:attribute name="database">pub</patch:attribute> </site> <site name="coveo_website"> <patch:attribute name="database">pub</patch:attribute> </site> <site name="website"> <patch:attribute name="database">pub</patch:attribute> </site> </sites> </sitecore> </configuration>
-
-
Open the
Coveo.SearchProvider.Custom.configfile located under theApp_Config\Include\Coveofolder, and apply the following changes:-
Coveo for Sitecore (June 2016) A CD shouldn’t clean up the indexes as it doesn’t index items. The
CleanUpAfterRebuildAgentagent needs to be deleted:-
Locate the
CleanUpAfterRebuildAgentagent element. It should look like this:<agent type="Coveo.CloudPlatformClient.Agents.CleanUpAfterRebuildAgent, Coveo.CloudPlatformClient"> <indexesToCleanUp>Coveo_master_index;Coveo_web_index;Coveo_pub_index</indexesToCleanUp> </agent> -
Replace the whole element with the following one to patch delete the agent:
<agent type="Coveo.CloudPlatformClient.Agents.CleanUpAfterRebuildAgent, Coveo.CloudPlatformClient"> <patch:delete /> </agent>
-
-
Furthermore, we recommend that you skip the Sitecore login validation and credentials update, to simplify the deployment. Add the following section in the
defaultIndexConfigurationelement:<defaultIndexConfiguration> ... <securityConfiguration type="Coveo.Framework.Configuration.SecurityConfiguration, Coveo.Framework"> <skipSitecoreCredentialsUpdate>true</skipSitecoreCredentialsUpdate> <skipSitecoreLoginCheck>true</skipSitecoreLoginCheck> </securityConfiguration> </defaultIndexConfiguration>
-
-
Save and close the files.
What’s next?
You’re now done with deploying Coveo for Sitecore, and you should test your connection to make sure everything is working (see Validating Connectivity of the New Hosts).