If you are already using a cluster gateway, this article will guide you to migrate existing cluster gateway to nextgen gateway using custom repository.

Prerequisites

Make sure the cluster gateway is registered to opsramp cloud and micro k8s is running.

Micro k8s status:

bootstrap
Pods status:
bootstrap

Prerequisites for Offline Migration of Clustered Gateway

Run the following commands before start migrating cluster gateway to nextgen gateway offline.

  1. Download the offline images tar.

wget https://storage.googleapis.com/opsramp_cluster_gateway_asserts/collector-cli/Offline/offline-images.tar.gz
2. Untar the images by using the following command.

tar -xvzf offline-images.tar.gz
cd offline-images
3. Create a directory by using the following command.

sudo mkdir -p /var/cgw/asserts_k3s/images/
4. Use the following command to copy the images.

sudo cp * /var/cgw/asserts_k3s/images/

Migration of Clustered Gateway to NextGen Gateway

Run the following commands to migrate the existing clustered gateway to nextgen gateway:

  1. Download the migration script.
wget https://storage.googleapis.com/opsramp_cluster_gateway_asserts/collector-cli/Migration/cluster-nextgen.tar.gz
  1. Untar the script using the following command.
tar -xvzf cluster-nextgen.tar.gz
  1. Run the build.sh file to setup and configure the required files in the host machine.
cd cluster-nextgen
sudo sh build.sh
  1. Make sure all the required files and binaries are available before running the migration script.

    bootstrap

  2. Run the migration script using the following command.

    • For common repository: Customers using OpsRamp repository can run the below command.

      sudo sh migrate.sh

    • For custom repository: Customers using their own custom repository can run the below command.

      sudo sh migrate.sh <repo>
      
      Example: sh migrate.sh hub.opsramp.com

    • For custom repository with credentials: Customers using their own custom repository with credentials can run the below command.

      sudo sh migrate.sh <repo> <username> <password>
      
      Example: sudo sh migrate.sh hub.opsramp.com 'admin' 'password'

  3. Run the following command to start using kubernetes.

    Example for Rancher k3s:

    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

Post Migration Checks

Follow the steps below, to verify if the migration process is successful.

  1. Run the following command to check for the pod status.
kubectl get pods
bootstrap
  1. See tunnel status in the cloud.
bootstrap
  1. After migration is completed, perform the following steps to ensure that the SDK apps were installed.

    • Login to vprobe container.
    kubectl exec -it nextgen-gw-0 -c vprobe -- bash
    • Run the following command to check the sdk app location.

    ls /opt/gateway/content/repo/
    bootstrap

  2. After the migration, check to see if apps are running with discovery and monitoring data.

bootstrap

OpsRamp Collector Bootstrap Tool

Refer to OpsRamp Collector Bootstrap Tool if you want to setup and configure the OpsRamp collector bootstrap tool in different environments with different OS flavours (Linux, Windows, and Mac).

Troubleshooting

How to resolve the dpkg error?

If you identify the following dpkg error while migrating the cluster-gateway to the nextgen-gateway, proceed with the steps below.

bootstrap

  1. Run the following command to see if any processes are running under dpkg.
    sudo lsof /var/lib/dpkg/lock
    bootstrap
  2. Run the following command to kill the running process.
    sudo kill -9 {$PID}
    bootstrap
  3. Remove the /var/lib/dpkg/lock folder using following command.
    sudo rm /var/lib/dpkg/lock
  4. Run the OpsRamp Agent installation script manually.
    sudo sh agent_install.sh
    bootstrap