1. Upgrade

Deployment

Version: 10.5

The Sitecore Container Deployment Package contains two sets of the upgrade container artifacts – one for Docker Compose and one for Kubernetes.

Docker Compose deployment

To deploy the Sitecore upgrade container in Docker Compose:

  1. In Docker for Windows, switch to Windows container mode.

  2. Download and extract the Sitecore Container Support Package from the Sitecore Developer Portal and store it on your local workstation.

  3. In Windows Explorer, go to the folder that you extracted the Sitecore Container Support Package to and open the folder with the Docker Compose upgrade artifacts for your Windows version and the Sitecore topology that you want to upgrade, for example, \compose\ltsc2022\upgrade\xp1.

  4. In the topology folder, run the compose-init.ps1 script.

    This script updates the environment configuration file with the appropriate values for all the environment variables including the SQL user name, SQL password, SQL Server address, and the Sitecore license file.

    For more information about running the script to prepare for the deployment, see the relevant Installation Guide for Developer Workstation with Containers.

  5. Open the docker-compose.upgrade.yml file.

    Study this file to get a better understanding of the container and connection strings needed to upgrade the databases.

  6. Update the connection strings as required.

  7. In the Windows console, go to the folder that contains the docker-compose.upgrade.yml file and run the following Docker Compose command:

    docker compose -f .\docker-compose.upgrade.yml --env-file .\upgrade.env up

    The --env-file parameter was introduced in Docker Compose 1.25.0.

    Docker Compose pulls the mssql-upgrade image from the Sitecore Container Registry and deploys the container which immediately starts the upgrade process.

    When the upgrade process is completed, the upgrade container stops.

  8. To check the status of the Docker container, run the following command:

    docker compose -f .\docker-compose.upgrade.yml --env-file .\upgrade.env ps

    This command provides the current status of the upgrade container.

Kubernetes deployment

To deploy the Sitecore upgrade container to the Azure Kubernetes Service, you must have a Kubernetes cluster.

To create a new Azure Kubernetes Service (AKS) cluster with a Windows Server node pool, you can use the Azure command-line interface (Azure CLI) or the Azure portal UI. The AKS cluster must contain one Windows Server 2022 or later node pool with one or more nodes and the cluster must have access to the Docker registry with the upgrade images.

For more information about using the Azure CLI to create a AKS cluster, see the Azure AKS documentation.

Configure the kubectl context cluster

Kubectl is the Kubernetes command-line tool and allows you to run commands against Kubernetes clusters.

To configure the kubectl context cluster:

  1. Log in to the Azure CLI and set a subscription.

    az login

    az account set --subscription "Your subscription"

  2. Get the credentials for the Kubernetes cluster that was created with the AKS cluster.

    az aks get-credentials --resource-group sc10aks --name sc10cluster

Deploy the Sitecore upgrade job

To deploy the Sitecore upgrade job:

  1. Ensure that all the secrets files (.txt) in the ./configuration folder are updated according to the requirements listed in Appendix B – The Kubernetes secrets list.

  2. From the root folder of the desired topology, run the following command:

    kubectl apply -k .\

    This command:

    • deploys the secrets
    • populates the ConfigMap values
    • pulls the Sitecore upgrade container image from the Sitecore Container Registry
    • deploys the Sitecore upgrade job

    The databases upgrade process starts immediately.

  3. Wait until the status of the job is Complete/OK.

  4. To check the status of the job with details, run the following command:

    kubectl get pods –o wide

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