Deploy Coveo for Sitecore on the Content Delivery Servers
Deploy Coveo for Sitecore on the Content Delivery Servers
The instructions below presume that you have a setup similar to the one in the Setting up the Sitecore Infrastructure article (see Sitecore Infrastructure Setup).
If your environment is different, read the steps carefully since you will need to tailor some of them to 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 Releases and Downloads).
-
Unzip the
Coveo for Sitecore <SITECORE_VERSION> <BUILD_NUMBER>.zip
. -
Open the
package.zip
file. -
Copy the contents of the
files
folder to the appropriate folders on each CD. Thefiles
folder mimics the folder structure found in the Sitecore website.Sitecore 8
Copy the contents of the
files
folder into the corresponding folders under<SITECORE_INSTANCE_ROOT>\Website\
on each CD.Sitecore 9 and 10
Copy the contents of the
files
folder into the corresponding folders underLocal Disk\inetpub\wwwroot\<SITECORE_INSTANCE>
on each CD.
|
Note
For Azure Web App deployments, consider using a tool like the Kudo console for file and folder manipulations (e.g., browsing, uploading/downloading, copying, editing, renaming, deleting). Refer to this Microsoft blog article for more tips on tools designed for working with files in Azure. |
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 Releases and Downloads).
-
Unzip the appropriate
Coveo for Sitecore SXA <SXA_VERSION(s)> <BUILD_NUMBER>.zip
file, based on the version of Sitecore you’re using. -
Open the
package.zip
file. -
Copy the contents of the
files
folder to the appropriate folders on each CD. Thefiles
folder mimics the folder structure found in the Sitecore website.Sitecore 8
Copy the contents of the
files
folder into the corresponding folders under<SITECORE_INSTANCE_ROOT>\Website\
on each CD.Sitecore 9 and 10
Copy the contents of the
files
folder into the corresponding folders underLocal Disk\inetpub\wwwroot\<SITECORE_INSTANCE>
on each CD.
Step 2: Ensuring Access to the Encryption Keys
Coveo for Sitecore stores the encryption keys in the Properties
table of the core
database.
These 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
database, make sure you have a database replication strategy in place.
Coveo for Sitecore stores the encryption keys 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 (CMs and CDs) to use the same base configuration as the CM1
Sitecore instance.
-
Delete the
Coveo
configuration files folder(s) in each additional Sitecore instance.Sitecore 8
In each additional Sitecore instance, delete the
Coveo
folder located in the<SITECORE_INSTANCE_ROOT>\Website\App_Config\Include\
folder.Sitecore 9 and 10
In each additional Sitecore instance, delete the
Coveo
folders located in the<SITECORE_INSTANCE_ROOT>\App_Config\Include\
and<SITECORE_INSTANCE_ROOT>\App_Config\Modules\
folders. -
Copy the configuration files folder(s) of the
CM1
instance to each additional Sitecore instance.Sitecore 8
Copy the
Coveo
folder located in the<SITECORE_INSTANCE_ROOT>\Website\App_Config\Include\
folder of yourCM1
instance. Paste it into your<SITECORE_INSTANCE_ROOT>\Website\App_Config\Include\
folder of your other instances.Sitecore 9 and 10
Copy the
Coveo
base configuration files folder located in the<SITECORE_INSTANCE_ROOT>\App_Config\Modules\
folder of yourCM1
instance. Paste it into the<SITECORE_INSTANCE_ROOT>\App_Config\Modules\
folder of your other instances.Sitecore 9 and 10
Copy the
Coveo
custom configuration files folder located in the<SITECORE_INSTANCE_ROOT>\App_Config\Include\
folder of yourCM1
instance. Paste it into the<SITECORE_INSTANCE_ROOT>\App_Config\Include\
folder of your other instances.
Step 4: Enabling SwitchMasterToWeb
Sitecore 8
|
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.example
file by removing the.example
extension. -
Enable the Coveo
SwitchMasterToWeb.Coveo.config.example
file by removing the.example
extension. -
Sitecore suggests adding a
pub
database, as illustrated in Sitecore Infrastructure Setup. You should apply the following patches only if you use a different database thanweb
for your CD servers.-
Open the
SwitchMasterToWeb.Coveo.config
file 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
web
database, which will cause an error in the current setup. To change the sites, create a<sites>
section and patch the references to use thepub
database:<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.config
file in a text editor. TheCoveo.SearchProvider.Custom.config
file is located in the<SITECORE_INSTANCE_ROOT>\Website\App_Config\Include\Coveo
folder. -
We recommend you skip the Sitecore login validation and credentials update, to simplify the deployment. Add the following section in the
defaultIndexConfiguration
element:<defaultIndexConfiguration> ... <securityConfiguration type="Coveo.Framework.Configuration.SecurityConfiguration, Coveo.Framework"> <skipSitecoreCredentialsUpdate>true</skipSitecoreCredentialsUpdate> <skipSitecoreLoginCheck>true</skipSitecoreLoginCheck> </securityConfiguration> </defaultIndexConfiguration>
-
Save and close the files.
Step 5: Preventing CDs From Trying to Write to the Property Store Database
In certain circumstances, Coveo for Sitecore may try to write LASTCRITICALINDEXINGEXCEPTION
records to the Property Store.
This will cause errors if you have set the Property Store database to read-only mode.
To prevent these errors, you can set the Coveo for Sitecore CriticalExceptionsDisabled
setting to true
.
The way to do this depends on the Sitecore version you have.
Sitecore 8
-
In the
SwitchMasterToWeb.Coveo.config
file, in the<settings>
element, add the following<setting>
child element:<setting name="Coveo.Framework.CriticalExceptionsDisabled" value="true" />
-
Save your changes.
Sitecore 9 and 10
-
In the
<SITECORE_INSTANCE_ROOT>\App_Config\Include\Coveo\Coveo.SearchProvider.Custom.config
file, try to locate the<settings>
element, a child of the<sitecore>
element. If the<settings>
element is missing, add it.... <sitecore coveo:require="!disabled"> <settings> </settings> ...
-
In the
<settings>
element, add the following<setting>
child element:<setting role:require="ContentDelivery" name="Coveo.Framework.CriticalExceptionsDisabled" value="true" />
-
Save your changes.
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 Validate Connectivity of the New Hosts).