Migrate to Operator Based Deployment on Kubernetes On-premise Cluster

This section describes how to upgrade to Operator-based Deploy solution from the Helm Charts-based solution on Kubernetes On-premise cluster.

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
  • The 10.0 Helm Chart that was used to install the Deploy application
  • Back up of the Release application and Kubernetes cluster configuration
  • Keep the port 4516 free.

    Backup and Restore

Before you upgrade to Kubernetes Operator-based solution, you must back up your existing database so that you can revert back to the earlier state in case of upgrade failures.

Note: We recommend that you use an external database instance (for example, PostgreSQL) for production grade installations. To back up the PostgreSQL database running on a virtual machine, use the native PostgreSQL commands—pg_dump and pg_restore.

Step 1—Check the status of the Helm Chart installation

Run the following command:

helm status <product name>

Sample Output

Helm Installation Status

Step 2—Verify the pods running on the cluster

Run the following command:

kubectl get pods

Sample Output

Running Pods

Step 3—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


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

    xl version

Step 4—Upgrade the Operator

  1. Run the following command:

    xl op --upgrade

    A set of questions is displayed.

  2. To continue with the upgrade, perform the actions described in the following table:

    Note: The default values is displayed within square brackets ([])

Question Action Default Value
Select the setup mode Use the Up/Down arrow keys to choose one of the setup modes, and press Enter:
  • advanced—to specify custom values
  • quick—to quickly run the setup with default values
Note: We recommend advanced setup mode for Helm to Operator upgrade.
Select the Kubernetes setup where the digitalai Devops will be installed or uninstalled Use the Up/Down arrow keys to select the platform from the list—PlainK8SCluster [Plain multi-node K8s cluster]. Press Enter. NA
Do you want to use kubernetes current-context from ~/.kube/config ? If you want to use Kubernetes configuration, type y for Yes. Otherwise, type n for No. Press Enter.
Note: For on-premise cluster, always type Y (Yes).
Do you want to use an existing Kubernetes namespace? If you want to use Kubernetes namespace, type y for Yes. Otherwise, type n for No. Press Enter.
Note: For Helm to Operator upgrade, always type y for Yes.
Enter the name of the existing Kubernetes namespace where the XebiaLabs DevOps Platform will be installed, updated or undeployed Type the name of the Kubernetes namespace where the Helm Chart is deployed or press Enter to select default. default
Product server you want to perform upgrade for Use the Up/Down arrow keys to choose daiDeploy [Digital.ai Deploy] NA
Enter the repository name(eg: <repositoryName>/<imageName>:<tagName>) Type the repository name to download Deploy image, and press Enter to select xebialabs xebialabs
Enter the image name(eg: <repositoryName>/<imageName>:<tagName>) Type the image name of the product—xl-deploy, and press Enter. xl-deploy
Enter the image tag(eg: <repositoryName>/<imageName>:<tagName>) Type the image tag of the product (version number), for example 10.3.0, and press Enter. 10.0.0
Select the type of the upgrade you want Use the Up/Down arrow keys to choose one of the types of upgrades, and press Enter:
  • operatorToOperator [Operator to Operator]
  • helmToOperator [Helm to Operator]

Note: To upgrade from Helm-based solution to Operator-based solution, select helmToOperator [Helm to Operator].
Operator image to use Type the operator image name along with repository and tag, and press Enter.
Note: Get the latest Operator Docker image for Release from the official docker hub repository site.
Enter the helm release name Type the name of the release product installed using the Helm Chart, for example, dai-xld-onprem.
Note: To get the helm release name, run the following command in a separate command shell—helm ls, and copy the name of the Helm release
A preview of the enter values is displayed.
  1. Type y for Yes—to confirm the values. Otherwise, type n for No—to modify the values. After you confirm, the system starts the local Deploy instance. This process will take some time.
    After the process completes, the Helm-based release product is uninstalled, and the Operator-based release product is installed.
    Note: The local Instance of Deploy will run on 4516 port; therefore, ensure you have the port 4516 free. Deployment status can be monitored on the local Deploy GUI. To access local deploy, use: http://localhost:4516, and log in using the default username and password.

Step 5—Register the load balancer/node port services external IP

  1. Run the following command:

    kubectl get ingress

    Sample Output

    Register load balancer

  2. Register your Load balancer external IP under the appropriate DNS.
    After the registration, you can verify the newer version of the release (Operator-based product) using the same link that you used to access the earlier version (Helm-chart based release product).
  3. Replace the NodePort with the updated node port. To get the details about the services and the node port, run the following command:

    kubectl get svc.