Skip to main content
Version: Release 23.1

Install or Upgrade—Deploy or Release—On Azure AKS

Prerequisites

Important: If you want to enable the TLS protocol in your cluster, you must have the TLS secret created in the namespace before you start the installation or upgrade. This means that you must create the namespace first, create the TLS secret in that namesapce, and use the same namespace and TLS secret during the installation or upgrade of Digital.ai Deploy or Release.

The xl kube install and xl kube upgrade wizards let you go with the default (latest) docker image tags available when you install or upgrade Digital.ai Deploy or Release. However, here are the Docker Hub links to verify all the the available image tags.

Step 1—Prepare for Installation

You must set up your system for installation, which include installing the kubectl, the required CLIs, and so on.

Install and Configure the kubectl, XL CLI, Azure CLI, and yq

See:

Step 2—Set up the Azure AKS Cluster

This step involves tasks such as setting up the resource group, creating a TLS private key, creating the AKS cluster and connecting to it, creating Azure File and Azure Disk storage classes, and setting up the domain name.

Note: The instructions to set up the cluster are indicative of the process. You may have to keep abreast of the latest developments with regards to the cloud platform you work with and set up the cluster to suit your requirements.

Create the Resource Group

Run the az group create command to create a resource group. Here's an example.

❯ az group create --name xld-operator-group --location germanywestcentral
{
"id": "/subscriptions/.../resourceGroups/xld-operator-group",
"location": "germanywestcentral",
"managedBy": null,
"name": "xld-operator-group",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null,
"type": "Microsoft.Resources/resourceGroups"
}

Create TLS Public and Private Keys

Run the ssh-keygen command to generate the public and private keys. Here's an example.

ssh-keygen -f ssh-key-xld-operator-cluster -N "" -m pem

Use the use public file ssh-key-xld-operator-cluster.pub public key when you create your Azure AKS cluster.

Create the Azure AKS cluster.

Run the az aks create command to create the AKS cluster. Here's an example with the TLS key added to it.

❯ az aks create --resource-group xld-operator-group  --name xld-operator-cluster --node-count 1 --enable-addons monitoring --ssh-key-value ssh-key-xld-operator-cluster.pub

Here's the example output for the above command:

AAD role propagation done[############################################]  100.0000%{
"aadProfile": null,
...
"sku": {
"name": "Basic",
"tier": "Free"
},
"tags": null,
"type": "Microsoft.ContainerService/ManagedClusters",
"windowsProfile": null
}

For more information, see Deploy an Azure Kubernetes Service cluster using the Azure CLI.

Connect to the Cluster

Run the az aks get-credentials command to connect to the cluster.

Here's an example.

❯ az aks get-credentials --resource-group xld-operator-group --name xld-operator-cluster
Merged "xld-operator-cluster" as current context in /Users/johndoe/.kube/config

Verify the Cluster Nodes

❯ kubectl get node

Create the Storage Classes

  1. Verify the default storage classes.

    kubectl get storageclass
  2. Create two new storage classes—azurefile and azuredisk—using the kubernetes.io/azure-file and kubernetes.io/azure-disk provisioners. Here are the two example yaml files for creating these two storage classes.

    azure-file-sc.yaml

    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
    name: xld-operator-azurefile
    provisioner: kubernetes.io/azure-file
    mountOptions:
    - dir_mode=0777
    - file_mode=0777
    - uid=0
    - gid=0
    - mfsymlinks
    - cache=strict
    - actimeo=30
    parameters:
    skuName: Standard_LRS

    azure-disk-sc.yaml

    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
    name: xld-operator-azuredisk
    provisioner: kubernetes.io/azure-disk
    reclaimPolicy: Delete
    volumeBindingMode: WaitForFirstConsumer
    parameters:
    storageaccounttype: Standard_LRS
  3. Apply these yaml files.

    ❯ kubectl apply -f azure-file-sc.yaml
    storageclass.storage.k8s.io/xld-operator-azurefile created

    ❯ kubectl apply -f azure-disk-sc.yaml
    storageclass.storage.k8s.io/xld-operator-azuredisk created
  4. Set the default storage class.

    ❯ kubectl patch storageclass xld-operator-azurefile -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
    storageclass.storage.k8s.io/xld-operator-azurefile patched

    ❯ kubectl patch storageclass default -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
    storageclass.storage.k8s.io/default patched
  5. Update all occurrences of storageClass spec in the CRD to xxx-operator-azurefile value with the following PostgreSQL specs as exceptions, which would use the xxx-operator-azuredisk storage class.

    spec.postgresql.common.global.storageClass
    spec.postgresql.global.storageClass
    spec.postgresql.persitence.storageClass

Set up the Domain Name

Set up the Azure DNS with your fully qualified domain name. See Apply a DNS label to the service.

Step 3—Install Digital.ai Deploy or Release

  1. Run the xl kube install command. For more information about flags to skip prompts, enable additional logging, and so on, see xl kube install Command Reference.
  2. Answer the questions in the installation wizard.
  3. When prompted, select Azure AKS as the Kubernetes setup where the Digital.ai Devops Platform will be installed. For more information, see
  4. Complete the installation.
  5. Log on to the Deploy or Release server and verify the installation.

Upgrade Deploy or Release on Azure AKS

The following upgrade scenarios are supported:

  • Upgrading existing sites that were created using Helm Charts
  • Upgrading existing sites that were created using Operator

Backup and Restore

  • Before you upgrade existing Deploy or Release sites using the Operator-based installer, you must back up your volumes, databases, and file systems so that you can revert to the earlier state in case of upgrade failures.
  • Back up your data according to your organization's backup policies.
  • For more information, see AWS Backup.

Upgrade Digital.ai Deploy or Release

  1. Run the xl kube upgrade command. For more information about flags to skip prompts, enable additional logging, and so on, see xl kube upgrade command reference
  2. Answer the questions in the upgrade wizard.
  3. When prompted, select AWS EKS as the Kubernetes setup where the Digital.ai Devops Platform will be upgraded. For more information, see:
  4. Complete the upgrade.
  5. Log on to the Deploy or Release server and verify the installation.