Deploy custom modules

Version: 10.5

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:

  1. Build a new layer on top of the mssql-init image.

  2. Copy the module dacpacs from the module asset image into the c:\resources\module_name_data folder.

  3. Create a Kubernetes specification file for your custom mssql-init image and add the module name to the DATABASES_TO_DEPLOY variable:

    • Name - DATABASES_TO_DEPLOY

    • Value - module_name

    Note

    The value of the DATABASES_TO_DEPLOY environment variable will instruct the custom mssql-init job to deploy only the dacpac files of the corresponding module.

  4. Add your custom mssql-init job to the init/kustomization.yaml file.

Add Solr collections to a module

To add a Solr collections module:

  1. Build a new layer on top of the solr-init image.

  2. Add the Solr collections module configuration files from the module assets image to the c:\data folder.

    Note

    You must use the JSON file format for collections. If the module name is sxa, you can, for example, name the Solr collections file cores-sxa.json.

  3. In the Kubernetes specification for the solr-init image, add the custom module to the SOLR_COLLECTIONS_TO_DEPLOY variable.

    Note

    If 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".

If you have suggestions for improving this article, let us know!