8

Assume the hotfix contains both files and items. If the hotfix is installed via the Sitecore shell, it works as expected until the next build where some or all of the dlls are replaced with the the original files. In order to get the hotfix dlls to stick, it seems that the hotfix must be added to the image itself. What is the best practice method of doing this? This sitecore doc says...

There is a dedicated layer for you to make hotfixes or future customizations in.

But no elaboration on how that is performed. Currently using SC9.3

2 Answers 2

9

If the hotfix contains both files and items, I think it should be installed as if it were a module, following the documented approach in the Add Sitecore Modules section of the Sitecore official documentation.

This approach requires a module to be distributed as asset image. For a normal Sitecore package, you will need to convert it to a web deploy package (WDP) first and then create an asset image for it. The steps to convert a .update Sitecore package to a WDP package are described here. A good tutorial to create an asset image starting from a WDP package is described in this blog post here instead.

Additional Production Considerations

To promote the hotfix to a containerized Kubernetes Sitecore application in production, you will need to implement an additional mssql-init data initialization container to use with a Kubernetes job to deploy the items of the hotfix in the production SQL databases. I recently described the concept and this approach in a blog post here.

2
  • Hi, thank you for the detailed response. Does this process apply for both 9.3 and 10.1 ? Commented Mar 23, 2021 at 11:34
  • 1
    Hi @PaulGeorge, this process applies to both in general, but the available tool powershell scripts in the images between these SC versions are different. The SC 9.3 community images don't have the same scripts available in the official SC 10.x images. For example, the community SQL image contains a script called Install-Databases.ps1 to publish a dacpac file to a SQL server, while a similar script is called DeployDatabases.ps1 in the SC 10 MSSQL image. Commented Mar 23, 2021 at 11:55
0

Since Sitecore XP 10.1.0, Sitecore distributes pre-releases of the next update release to provide customers with fixes for their hotfix requests. The pre-releases are cumulative, and each pre-release contains all the changes that were implemented in the earlier pre-releases in that series. These pre-releases are then all rolled into the next update release, for example, Sitecore XP 10.1 Update 2. You can follow the below steps to deploy the hotfix to the Sitecore docker image:

  • Download the Sitecore pre-release or hotfix package You can do this from the Sitecore website or by contacting Sitecore support. For 10.3, You can download the package from here.
  • Add Dockerfile instructions for each Sitecore required server role To add the Dockerfile instructions for the Content Management (CM) role, on your solution, open the Sitecore runtime Dockerfile for the CM role and add the following instructions to pull the image. Make Sure, ${PARENT_IMAGE} should be applied in the last.
# escape=`
ARG PARENT_IMAGE
# To add pre-release or delta asset image
ARG DELTA_ASSET_IMAGE
# add any other tooling image, like MANAGEMENT_SERVICES_IMAGE
[...]

FROM ${DELTA_ASSET_IMAGE} as deltaAssetImage
# Make sure Parent image or base image should be in the last
FROM ${PARENT_IMAGE}

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

WORKDIR C:\inetpub\wwwroot

# Copy cm resources from pre-releae inage
COPY --from=deltaAssetImage \platform\cm \
  • Update the Docker Compose File To configure the custom image for the CM role in Docker Compose, add the following code to the docker-compose.override.yml file:
cm:
  image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cm:${VERSION:-latest}
  build:
    context: ./docker/build/cm
    args:
      PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
      DELTA_ASSET_IMAGE: ${SITECORE_PRE_REGISTRY}sitecore-xp0-assets:${DELTA_ASSET_IMAGE_VERSION}
  [...]
  • Get the tags from JSON file and update the .env: You can refer to Released-images-sxp-pre-10.3.1-008828-21022023-172356.json from the downloaded hotfix folder and get all the required tags. Update the .env file with these variables :
SITECORE_PRE_REGISTRY=scr.sitecore.com/sxp-pre/
DELTA_ASSET_IMAGE_VERSION=10.3.1.008828.343-10.0.17763.3887-1809
  • Build the images and up the containers: You can log in to the Sitecore instance and check pre-release has been applied. enter image description here

Refer this blog for more details: https://sitecorewithraman.wordpress.com/2023/03/12/apply-hotfix-to-sitecore-docker-images/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.