Configure Managed Cloud

Abstract

Learn how to configure your Managed Cloud solution to best suit the needs of your organization.

This topic describes how to scale, size, and tune your Managed Cloud container solutions. It describes how to find and work with the configuration files in the infrastructure and application repositories.

You might want to customize your Azure Kubernetes Service (AKS) cluster size, SQL database, and/or Azure Container Registry (ACR) tier size.

To manage the size of Azure components:

  1. In the Infrastructure repository, go to: .\config\resources\resources.json

    resources.json example
  2. Manage the AKS cluster size, SQL database, and/or ACR tier size by updating the following parameters:

    Parameter

    Description

    windows_vm_size

    The Windows VM AKS size.

    windows_scaled_vm_size

    The Windows Scaled VM Size. Used for more efficient scaling of Content Delivery and XDBCollection pods.

    windows_node_count

    The amount of Windows nodes. A minimum of two windows nodes is required to support in-place node upgrades.

    windows_scaled_node_count

    The amount of Windows nodes for scaled resources. Could be set to 0 for some SKU tiers. If the value is 0, scaled pods (cd and xdb collection) are deployed to regular Windows VMs.

    linux_node_count

    The amount of Linux nodes.

    windows_node_priority

    The node priority for Windows. For production scenarios always use regular.

    size_gb

    SQL pool size in Gb.

    sku_capacity

    SQL pool SKU capacity.

    sku_name

    SQL pool SKU name.

    sku_family

    SQL pool SKU family.

    sku_tier

    SQL pool SKU tier.

    sku

    ACR tier size.

You can use Planned Maintenance to schedule maintenance windows for your AKS cluster. Planned Maintenance lets you schedule weekly maintenance windows and minimizes workload impact. Once scheduled, all your maintenance will occur during the window you selected.

To add a maintenance window:

  • In Azure CLI, add the az aks maintenanceconfiguration command:

    az aks maintenanceconfiguration add -g MyResourceGroup --cluster-name myAKSCluster --name default --weekday Monday  --start-hour 1

You can manage the limits of every Sitecore deployment pod in the AKS cluster.

To tune limits for AKS pods:

  1. In the Application repository, open .\config\resources\resources.json. You can see the list of all pods running in the AKS cluster. For example:

    Pods in resources.json example
  2. Tune the pods by updating the following parameters:

    Parameter

    Description

    replicas

    The number of Sitecore replicas.

    request_memory

    The default pod memory.

    request_cpu

    The default pod CPU.

    limit_memory

    The maximum pod memory limit.

    limit_cpu

    The maximum pod CPU limit.

By default, for nonproduction environments, Azure Kubernetes Service uses the Regular instance type of Virtual Machines. If you think the Regular instance is not appropriate for your nonproduction setup, you must switch the Windows node type to Spot. They are cheaper than regular Virtual Machines and can be evicted at any time. This makes Spot instances ideal for nonproduction test environments, but not so much for production.

To switch the Windows node type from Regular to Spot:

  • Go to config/resources/resources.json and change the windows_node_priority to Spot.

    Windows node priority in resources.json

To store custom images, Sitecore uses Private Azure Container Registry (ACR). Private ACR is created as part of Sitecore Managed Cloud Infrastructure.

To add an image to Private ACR:

  1. Build a new version of an image based on an existing Sitecore image.

  2. Push your image to Private ACR.

  3. Update the docker-images.json file with the new image.

    Important

    To change docker-images.json, you must create a pull request to main.

To update external images:

  • Update docker-images.json with a new image version.

The application pipeline runs automatically and applies new images from the file as soon as the main branch is updated.

Deploy new images by running the Application pipeline

The Application pipeline uses a set of images to deploy the Sitecore environment. All image names and locations are specified in the Application repository .\config\docker-images\docker-images.json file. Sitecore uses Ansible to deploy your Docker container images. To deploy, Ansible gathers the images from the docker-images.json file located here:

application\config\docker-images

This file contains a list of images that are required to deploy the Sitecore application. It also includes Sitecore roles and external images for monitoring, logging, and alerting.

Warning

For minor upgrades of Sitecore role images to a newer version (upgrades that do not contain breaking changes and database upgrades), do not update init container images, such as sql- and solr-init.

You must replace the specific image in: application\config\docker-images.json.

The docker-images.json file has the following structure:

{
  ...
  "sitecore": {
    "sitecore role name": "{image repository}/{role name}:{image tag}"
  }
  ...
  "entity name": {
     "image name": "{image repository}/{role name}:{image tag}"
   } 
  ...
}

To update Sitecore images:

  • Go to application\config\docker-images and open the docker-images.json file. You can replace existing roles with your custom images based on existing base Sitecore images.

By default, all parameters are configured based on the original Sitecore topology size. In the .\sku\ folder, there are sets of predefined Sitecore topology sizes. You can use these configuration files to scale topology sizes.

As soon as you commit changes to the main branch, the Infrastructure or Application pipeline is triggered automatically and applies changes from the file. If you must apply a new topology size, make the relevant changes in the Infrastructure repository first. Wait until the Infrastructure pipeline is completed successfully and then apply the necessary changes to the Application repository..\config\resources\resources.json

To change the topology size:

  • In the Infrastructure repository, copy .\sku\resources.{size}.json and rename the file to resources.json.

Before you deploy your Sitecore installation, you must change the administrator password to a strong password. After you change these credentials, you must update the following secrets in the Azure Key Vault:

  • Sitecore administrator username: sitecore-admin-username

  • Sitecore administrator password: sitecore-admin-password