The Managed Cloud Standard pipelines

Abstract

Describes the pipelines that are involved with Managed Cloud for containers.

Each Sitecore Managed Cloud client has the following pipelines to control their solution: Application, Infrastructure, Frontdoor, Pod restart, Node restart, Windows node upgrade, Sitecore license update, Cluster upgrades, Cluster version upgrades, update alertmanager email notification and Unlock Terraform state. You can modify the existing pipelines or add your own.

You use the Application pipeline to deliver application code. It deploys Ansible scripts to set up the Azure Kubernetes Service (AKS) pods containing each running container. You must use the Application repository to customize your Sitecore solution and to customize your Managed Cloud instance. You must build customized containers with your application elements, upload them to the Azure Container Registry (ACR), and change references to use your new customized images..

You can trigger the pipeline automatically and manually.

You use the Infrastructure pipeline to deliver infrastructure code. It deploys Terraform scripts to read the configuration and synchronize all elements of the deployment to match the settings in the configuration files. After the pipeline has run successfully, the Infrastructure Terraform state file is stored in an Azure Storage account.

You can trigger the pipeline automatically and manually.

You use the Frontdoor pipeline to deploy Terraform scripts to read the configuration and synchronize all elements of the deployment to match the settings in the configuration files. When the pipeline has run successfully, the Frontdoor Terraform state file is stored in an Azure Storage account. After the Frontdoor configuration is updated, you must trigger the Frontdoor pipeline manually .

You use the restart Sitecore deployments pipeline to restart a Sitecore solution without downtime. For example, you can use it to get your app working again if your container reports an error and the Kubernetes (k8s) can not handle it.

To restart a specific deployment, run the pipeline and choose the target deployment:

MCC-pod_restart.png

You use the reboot node pipeline to restart Kubernetes nodes, for example, to complete an operating system update. The pipeline has two options: restart Windows or/and Linux node types.

You can choose the type of scale set to restart (Windows or Linux) and trigger a pipeline.

Note

All nodes for a target node type are restarted simultaneously and you must expect downtime for about 5 minutes.

MCC-node_reboot.png

Note

If you extended your solution with a Kubernetes deployment (for a Sitecore module or another service), the Node reboot pipeline may fail because of a Kubernetes deployment restart timeout. To mitigate this issue, you must extend the progressDeadlineSeconds value.

You use the Windows node upgrade pipeline to upgrade the AKS Windows node pool OS image. For more information, see the Microsoft Azure documentation. You can check upgrade availability using Azure CLI.

You use the update Sitecore license pipeline to upgrade the Sitecore license for the existing deployment. To update the license, you must copy the Sitecore license content and paste it into the Azure devops parameter field while running the pipeline. The license is updated without downtime.

It is important to regularly use the Cluster upgrades pipeline to check which Kubernetes releases are available for your cluster. This makes sure that you have the latest version of AKS including latest patches and bug fixes. For more information, please refer to the Microsoft documentation.

Note

The Cluster upgrades pipeline checks updates that are available for your current minor AKS version within your location.

Cluster version upgrade

You use the Cluster version upgrade pipeline to upgrade the AKS cluster. This pipeline runs with no downtime.

Note

This topic assumes you have permission to run the DevOps cluster version upgrade pipeline.

The pipeline upgrades the following to the newer versions:

  • The control panel

  • The Linux node pool

  • The Windows node pool

Note

If the pipeline fails, contact Sitecore Support to resolve the issue.

Note

To upgrade from 1.21 to 1.22. follow instruction in the Knowledge Base article: How to upgrade Sitecore Managed Cloud Containers solutions to AKS 1.22.

If you have a secondary MCC environment with a Disaster Recovery(DR) managed hot scenario setup and DR version lower than v1.14.31 you must make a change to the Cluster version upgrade pipeline before you upgrade the AKS cluster.

Note

This topic assumes you have permission to access and write to your DevOps Infrastructure repository.

Make the following changes to support Disaster Recovery(DR) managed hot scenario setup in your secondary environment:

  1. In the IInfrastructure repo clone the main branch and make a new branch.

  2. In the new IInfrastructure branch open the file /pipelines/cluster-version-upgrade.yaml and add the following snippet to the end of the file.

           - task: AzureCLI@2
    2        inputs:
    3          azureSubscription: $(azure_subscription_id)
    4          scriptType: 'pscore'
    5          scriptLocation: 'scriptPath'
    6          scriptPath: 'pipelines/scripts/cluster-version-upgrade.ps1'
    7          arguments: |
    8            -InfrastructureId $(dr-infrastructure-id) `
    9            -KeyvaultName $(azure_key_vault_name) `
    10            -KubernetesVersion ${{ parameters.kubernetes_version }}
    11        displayName: Upgrade Secondary AKS cluster

    Make sure indentation is same as other lines. The updated file must look like this:

    DR_upgrade_cluster.png
  3. Commit and push the local branch file changes to your remote repo. Then create a pull request and get approvals, as per the normal development process.

    Once the changes have been merged into the main branch you can run the Cluster version upgrade pipeline with the preferred Kubernetes version.

  4. In AzureDevOps, click Pipeline in the left menu blade.

  5. Click the Cluster version upgrade pipeline.

    If you cannot see the pipeline, search in All tab.

  6. Click Run pipeline.

  7. In the Run pipeline dialog, ensure that the Branch/tag is set to main.

  8. Enter your preferred version of Kubernetes.

  9. Click Run.

DR_upgrade_pipeline.png

You use the update alertmanager email notification pipeline to configuring email notifications for a custom set of recipients in the alertmanager.

To configure email notifications:

  1. Open the update alertmanager email notification pipeline and fill required parameters:

    update alertmanager email notification​, run pipeline dialog
  2. Enable or disable email notifications.

  3. Enter the SMTP server host and port to use for sending emails.

  4. Enter the user name of the SMTP server.

  5. Enter the password for the SMTP server.

  6. Enter the email address of the sender.

  7. Enable or disable TLS for sending emails.

  8. Enter a comma-separated list of the email addresses that the notifications from the alertmanager should be sent to.

When the pipeline has finished, run the application pipeline.

When the application pipeline is finished, run the following command to restart the alertmanager deployment:

kubectl rollout restart deployment alertmanager -n monitoring

Unlock Terraform state

You use the unlock terraform state pipeline to unlock terraform state for Infrastructure or Frontdoor.

MC_-_run_pipeline_3.png