You can update the Chrome and Edge packages using one of the following methods:

  • Method 1: Using OpsRamp Agent Remote Script (Recommended)
  • Method 2: Manual Execution

Method 1: Using OpsRamp Agent Remote Script

  1. Navigate to Automation > Scripts v2.
  2. Create a Script Category (Global, Partner-specific, or Client-specific).
  3. Click the Add to create a new script. Provide the following script details:
    • Name: Chrome and Edge Package Upgrade (Example)
    • Description: Patch script to update Chrome and Edge
    • Execution Time: 60 seconds
    • Platform: Linux
  4. Paste this following script in the script content:
    #!/bin/bash
    set -x
    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
    # Minimum version threshold
    MIN_VERSION="17.0.0"
    # Validate input arguments
    if [[ -z "$1" || -z "$2" ]]; then
      echo "Usage: $0 <namespace> <registry-url>"
      echo "Example: $0 default us-central1-docker.pkg.dev"
      exit 1
    fi
    REPO_USER=$3
    REPO_PASS=$4
    # check $3 and $4 are not set
    if [[ -n "$3" && -n "$4" ]]; then
      helm registry login "$2" -u $REPO_USER -p $REPO_PASS
    fi
    # Assign provided arguments
    NAMESPACE="$1"
    REGISTRY="$2"
    # Chart path (with runtime registry)
    CHART_PATH="oci://$REGISTRY/opsramp-registry/gateway-cluster-charts/webprobe"
    # Get current deployed chart version
    CURRENT_VERSION=$(helm list --filter webprobe -n "$NAMESPACE" | awk 'NR==2 {print $9}' | awk -F '-' '{print $NF}')
    # Version comparison function
    version_gte() {
      [ "$1" = "$(printf "%s\n%s" "$2" "$1" | sort -V | tail -n1)" ]
    }
    # Conditionally run Helm upgrade
    if version_gte "$CURRENT_VERSION" "$MIN_VERSION"; then
      echo "Version $CURRENT_VERSION meets or exceeds $MIN_VERSION — proceeding with upgrade..."
      helm upgrade webprobe \
        "$CHART_PATH" \
        --version 19.2.1 -n "$NAMESPACE"
      helm list --filter webprobe -n "$NAMESPACE"
    else
      echo "Version $CURRENT_VERSION is below $MIN_VERSION — skipping upgrade."
    fi
  5. Click on Parameters and add the following parameters to the script.
    ISO download
  6. Save the script
  7. Schedule the script execution:
    • Select the script
    • Click Schedule (right panel)
    • Fill in details:
      • Schedule Name
      • Target Resource(s)
      • Schedule Type: One-time
  8. Ensure all parameter values are correctly set.
  9. Click Save.
  10. Run the Scheduled Script from the Scheduled Script section.
  11. Review Execution Logs from the right-side panel for the status.

Method 2: Manual Execution

Use this if Agent based execution isn’t possible.

Prerequisites

  • Access to the gateway system
  • Appropriate user credentials

Steps for Manual Execution:

  1. Login to Gateway using: gateway-admin if nextgen gateway running with Ubuntu 22 only.
  2. Take root access by using the following command and enter password:

sudo su -
3. Create a new file named update.sh and add the following shell script to it.

#!/bin/bash
set -x

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

# Minimum version threshold
MIN_VERSION="17.0.0"

# Validate input arguments
if [[ -z "$1" || -z "$2" ]]; then
  echo "Usage: $0 <namespace> <registry-url>"
  echo "Example: $0 default us-central1-docker.pkg.dev"
  exit 1
fi

REPO_USER=$3
REPO_PASS=$4

# Login to registry if credentials are provided
if [[ -n "$REPO_USER" && -n "$REPO_PASS" ]]; then
  helm registry login "$2" -u "$REPO_USER" -p "$REPO_PASS"
fi

# Assign provided arguments
NAMESPACE="$1"
REGISTRY="$2"

# Chart path (with runtime registry)
CHART_PATH="oci://$REGISTRY/opsramp-registry/gateway-cluster-charts/webprobe"

# Get current deployed chart version
CURRENT_VERSION=$(helm list --filter webprobe -n "$NAMESPACE" | awk 'NR==2 {print $9}' | awk -F '-' '{print $NF}')

# Version comparison function
version_gte() {
  [ "$1" = "$(printf "%s\n%s" "$2" "$1" | sort -V | tail -n1)" ]
}

# Conditionally run Helm upgrade
if version_gte "$CURRENT_VERSION" "$MIN_VERSION"; then
  echo "Version $CURRENT_VERSION meets or exceeds $MIN_VERSION — proceeding with upgrade..."

  helm upgrade webprobe \
    "$CHART_PATH" \
    --version 19.2.1 \
    -n "$NAMESPACE"

  helm list --filter webprobe -n "$NAMESPACE"
else
  echo "Version $CURRENT_VERSION is below $MIN_VERSION — skipping upgrade."
fi
  1. Save the file.

  2. Run the script using the following command:

    a. Command with namespace and reposiotry

    ./updater.sh <namespace> <repository>
    Examples:

    • With default namespace and default repository
      ./updater.sh <namespace> <repository>
    • With custom namespace and default repository
      ./updater.sh <namespace> <repository>
    • With custom namespace and custom repository with no credentials
      ./updater.sh <namespace> <repository>

    b. Command with namespace and custom repository with authorization

    ./updater.sh <namespace> <repository_name> < repository_username < repository_password>
    Example
    sh updater.sh gateway-namespace custom-repository repository_username repository_password

  3. Verify the Webprobe Helm version (should be 19.2.1).

    helm list | grep webprobe

  4. Access the Webprobe container:

    kubectl exec -it -n <namespace> webprobe-0 -- bash

  5. Check the installed Chrome and Edge versions:

    msedgedriver --version
    chromedriver --version
    geckodriver --version
    dpkg -l | grep -E "chrome|edge"

Expected Versions:

PackageExpected Version
Google Chrome138.0.7204.168-1
Microsoft Edge138.0.3351.95-1