Install Deploy on Azure AKS Cluster

This section describes the procedure of fresh installation of the Deploy application on Azure AKS cluster using operator-based installer.

Intended Audience

This guide is intended for administrators with cluster administrator credentials who are responsible for application deployment.

Before You Begin

The following are the prerequisites required to migrate to the operator-based deployment:

  • Docker version 17.03 or later
  • The kubectl command-line tool
  • Access to a Kubernetes cluster version 1.17 or later
  • Kubernetes cluster configuration

Step 1—Create a folder for installation tasks

Create a folder on your workstation from where you will execute the installation tasks, for example, DeployInstallation.

Step 2—Download the Operator ZIP

  1. Download the Operator ZIP file from the Deploy/Release Software Distribution site.
  2. Extract the ZIP file to the DeployInstallation folder.

Step 3—Update the Azure AKS Cluster Information

To deploy the Deploy application on the Kubernetes cluster, update the infrastructure.yaml file parameters (Infrastructure File Parameters) in DeployInstallation folder with the parameters corresponding to the kubeconfig file (AWS EKS Kubernetes Cluster Configuration File Parameters) as described in the table below. You can find the Kubernetes cluster information in the default location ~/.kube/config. Ensure the location of the kubeconfig configuration file is your home directory.

Note: The deployment will not proceed further if the infrastructure.yaml is updated with wrong details.

Infrastructure File Parameters Azure AKS Kubernetes Cluster Configuration File Parameters Steps to Follow
apiServerURL server Enter the server details of the cluster.
caCert certificate-authority-data Before updating the parameter value, decode to base 64 format.
tlsCert client-certificate-data Before updating the parameter value, decode to base 64 format.
tlsPrivateKey client-key-data Before updating the parameter value, decode to base 64 format.

Step 4—Update the default Digitial.ai Deploy Custom Resource Definitions.

  1. Update the daideploy_cr file as described in the following table:

    Note: For deployments on test environments, you can use most of the parameters with their default values in the daideploy_cr.yaml file.

    Parameter Description
    K8sSetup.Platform Platform on which to install the chart. For the Azure AKS cluster, you must set the value to AzureAKS.
    haproxy-ingress.controller.service.type The Kubernetes Service type for haproxy. Or nginx-ingress.controller.service.type: The Kubernetes Service type for nginx. The default value is NodePort. You must set the value to LoadBalancer for the Azure AKS cluster.
    ingress.hosts DNS name for accessing UI of Digital.ai Deploy.
    xldLicense Convert the license file for Digital.ai Deploy to the base64 format.
    RepositoryKeystore Convert the license file for Digital.ai Deploy to the base64 format.
    KeystorePassphrase The passphrase for the RepositoryKeystore.
    postgresql.persistence.storageClass Storage Class to be defined as PostgreSQL.
    rabbitmq.persistence.storageClass Storage Class to be defined as RabbitMQ.
    Persistence.StorageClass The storage class that must be defined as Azure AKS cluster.

    Note: For deployments on production environments, you must configure all the parameters required for your Azure AKS production setup in the daideploy_cr.yaml file. The table in Step 4.3 lists these parameters and their default values, which can be overridden as per your setup requirements and workload. You must override the default parameters, and specify the parameter values with those from the custom resource file. The following table describes the parameters and their default values.

  2. Update the daideploy_cr.yaml file with the license and keystore details:

    1. Convert the Deploy license and the repository keystore files to the base 64 format.
    2. Run the following commands:

      • To convert the xldLicense into base 64 format, run:

        cat <License.lic> | base64 -w 0
      • To convert RepositoryKeystore to base64 format, run:

        cat <keystore.jks> | base64 -w 0

        Note: The above commands are for Linux-based systems. For Windows, there is no built-in command to directly perform Base64 encoding and decoding. But you can use the built-in command certutil -encode/-decode to indirectly perform Base64 encoding and decoding.

  3. Update the default parameters as described in the following table:

    Note: The following table describes the default parameters in the Digital.ai daideploy_cr.yaml file. If you want to use your own database and messaging queue, refer Using Existing DB and Using Existing MQ topics, and update the daideploy_cr.yaml file. For information on how to configure SSL/TLS with Digital.ai Deploy, see Configuring SSL/TLS.

    Parameter
    Description Default
    K8sSetup.Platform Platform on which to install the chart. Allowed values are PlainK8s and AzureAKS PlainK8s
    XldMasterCount Number of master replicas 3
    XldWorkerCount Number of worker replicas 3
    ImageRepository Image name xebialabs/xl-deploy
    ImageTag Image tag 10.2
    ImagePullPolicy Image pull policy, Defaults to Always if image tag is latest,set to IfNotPresent Always
    ImagePullSecret Specify docker-registry secret names. Secrets must be manually created in the namespace NA
    haproxy-ingress.install Install haproxy subchart. If you have haproxy already installed, set install to false FALSE
    haproxy-ingress.controller.kind Type of deployment, DaemonSet or Deployment Deployment
    haproxy-ingress.controller.service.type Kubernetes Service type for haproxy. It can be changed to LoadBalancer or NodePort LoadBalancer
    ingress.Enabled Exposes HTTP and HTTPS routes from outside the cluster to services within the cluster TRUE
    ingress.annotations Annotations for ingress controller kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/proxy-connect-timeout: “60”
    nginx.ingress.kubernetes.io/proxy-read-timeout: “60”
    nginx.ingress.kubernetes.io/proxy-send-timeout: “60”
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/session-cookie-name: SESSION_XLD
    nginx.ingress.kubernetes.io/ssl-redirect: “false”
    ingress.path You can route an Ingress to different Services based on the path /xl-deploy(/
    ingress.hosts DNS name for accessing ui of Digital.ai Deploy NA
    AdminPassword Admin password for xl-deploy Admin
    xldLicense Convert xl-deploy.lic files content to base64 NA
    RepositoryKeystore Convert keystore.jks files content to base64 NA
    KeystorePassphrase Passphrase for keystore.jks file NA
    resources CPU/Memory resource requests/limits. User can change the parameter accordingly NA
    postgresql.install postgresql chart with single instance. Install postgresql chart. If you have an existing database deployment, set install to false. TRUE
    postgresql.postgresqlUsername PostgreSQL user (creates a non-admin user when postgresqlUsername is not postgres) postgres
    postgresql.postgresqlPassword PostgreSQL user password postgres
    postgresql.postgresqlExtendedConf.listenAddresses Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications *
    postgresql.postgresqlExtendedConf.maxConnections Maximum total connections 500
    postgresql.initdbScriptsSecret Secret with initdb scripts contain sensitive information
    Note: This parameter can be used with initdbScriptsConfigMap or initdbScripts. The value is evaluated as a template.
    postgresql-init-sql-xld
    postgresql.service.port PostgreSQL port 5432
    postgresql.persistence.enabled Enable persistence using PVC TRUE
    postgresql.persistence.storageClass PVC Storage Class for postgresql volume NA
    postgresql.persistence.size PVC Storage Request for PostgreSQL volume. 50 Gi
    postgresql.persistence.existingClaim Provides an existing PersistentVolumeClaim, the value is evaluated as a template. NA
    postgresql.resources.requests CPU/Memory resource requests requests: memory: 250m memory: cpu: 256m
    postgresql.nodeSelector Node labels for pod assignment {}
    postgresql.affinity Affinity labels for pod assignment {}
    postgresql.tolerations Toleration labels for pod assignment []
    UseExistingDB.Enabled If you want to use an existing database, change postgresql.install to false. FALSE
    UseExistingDB.XL_DB_URL Database URL for xl-deploy NA
    UseExistingDB.XL_DB_USERNAME Database User for xl-deploy NA
    UseExistingDB.XL_DB_PASSWORD Database Password for xl-deploy NA
    rabbitmq.install Install rabbitmq chart. If you have an existing message queue deployment, set install to false. TRUE
    rabbitmq.extraPlugins Additional plugins to add to the default configmap rabbitmqjmstopic_exchange
    rabbitmq.replicaCount Number of replicas 3
    rabbitmq.rbac.create If true, create and use RBAC resources TRUE
    rabbitmq.service.type Type of service to create ClusterIP
    UseExistingMQ.Enabled If you want to use an existing Message Queue, change rabbitmq.install to false FALSE
    UseExistingMQ.XLD_TASK_QUEUE_USERNAME Username for xl-deploy task queue NA
    UseExistingMQ.XLD_TASK_QUEUE_PASSWORD Password for xl-deploy task queue NA
    UseExistingMQ.XLD_TASK_QUEUE_NAME URL for xl-deploy task queue NA
    UseExistingMQ.XLDTASKQUEUEDRIVERCLASS_NAME Driver Class Name for xl-deploy task queue NA
    HealthProbes Would you like a HealthProbes to be enabled TRUE
    HealthProbesLivenessTimeout Delay before liveness probe is initiated 60
    HealthProbesReadinessTimeout Delay before readiness probe is initiated 60
    HealthProbeFailureThreshold Minimum consecutive failures for the probe to be considered failed after having succeeded 12
    HealthPeriodScans How often to perform the probe 10
    nodeSelector Node labels for pod assignment {}
    Tolerations Toleration labels for pod assignment []
    Persistence.Enabled Enable persistence using PVC TRUE
    Persistence.StorageClass PVC Storage Class for volume NA
    Persistence.Annotations Annotations for the PVC {}
    Persistence.AccessMode PVC Access Mode for volume ReadWriteOnce
    Persistence.XldExportPvcSize XLD Master PVC Storage Request for volume. For production grade setup, size must be changed 10Gi
    Persistence. XldWorkPvcSize XLD Worker PVC Storage Request for volume. For production grade setup, size must be changed 10Gi

Step 5—Download and set up the XL CLI

  1. Download the XL-CLI binaries.

    wget https://dist.xebialabs.com/public/xl-cli/$VERSION/linux-amd64/xl

    Note: For $VERSION, substitute with the version that matches your product version in the public folder.

  2. Enable execute permissions.

    chmod +x xl
  3. Copy the XL binary in a directory that is on your PATH.

    echo $PATH

    Example

    cp xl /usr/local/bin
  4. Verify the release version.

    xl version

Step 6—Set up the XL Deploy Container instance

  1. Run the following command to download and start the Digital.ai Deploy instance:

    Note: A local instance of Digital.ai Deploy is used to automate the product installation on the Kubernetes cluster.

    docker run -d -e "ADMIN_PASSWORD=admin" -e "ACCEPT_EULA=Y" -p 4516:4516 --name xld xebialabs/xl-deploy:10.2
  2. To access the Deploy interface, go to:
    http://<host IP address>:4516/

Step 7—Activate the deployment process

Go to the root of the extracted file and run the following command:

xl apply -v -f digital-ai.yaml

Step 8—Verify the deployment status

  1. Check the deployment job completion using XL CLI.
    The deployment job starts the execution of various tasks as defined in the digital-ai.yaml file in a sequential manner. If you encounter an execution error while running the scripts, the system displays error messages. The average time to complete the job is around 10 minutes.

    Note: The running time depends on the environment.

    Deployment Status

    To troubleshoot runtime errors, see Troubleshooting Operator Based Installer.

Step 9—Verify if the deployment was successful

To verify the deployment succeeded, do one of the following:

  • Open the Deploy application, go to the Explorer tab, and from Library, click Monitoring > Deployment tasks

    Successful Deploy Deployment
  • Run the following commands in a terminal or command prompt:

    Deployment Status Using CLI Command

Step 10—Perform sanity checks

Open the Deploy application and perform the required deployment sanity checks.