Deploy custom modules
For Sitecore components, by default, you deploy only the Solr collections and dacpacs included in the platform. In Sitecore 10.1 and later versions you can also deploy custom modules.
If the module you want to deploy requires database updates and/or custom Solr collections, you might need to build a new layer on top of the mssql-init and/or solr-init images. You must use the module assets image as a source for the module dacpacs and Solr collections configuration files.
Add database updates to a module
To add the module database updates:
-
Build a new layer on top of the
mssql-initimage. -
Copy the module dacpacs from the module asset image into the
c:\resources\module_name_datafolder. -
Create a Kubernetes specification file for your custom
mssql-initimage and add the module name to the DATABASES_TO_DEPLOY variable:-
Name - DATABASES_TO_DEPLOY
-
Value -
module_name
NoteThe value of the DATABASES_TO_DEPLOY environment variable will instruct the custom
mssql-initjob to deploy only the dacpac files of the corresponding module. -
-
Add your custom
mssql-initjob to theinit/kustomization.yamlfile.
Add Solr collections to a module
To add a Solr collections module:
-
Build a new layer on top of the
solr-initimage. -
Add the Solr collections module configuration files from the module assets image to the
c:\datafolder.NoteYou must use the JSON file format for collections. If the module name is
sxa, you can, for example, name the Solr collections filecores-sxa.json. -
In the Kubernetes specification for the
solr-initimage, add the custom module to the SOLR_COLLECTIONS_TO_DEPLOY variable.NoteIf you add more than one module to one of the variables, you must separate the module names with commas. For example, SOLR_COLLECTIONS_TO_DEPLOY="sxa,jss".