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
- Navigate to Automation > Scripts v2.
- Create a Script Category (Global, Partner-specific, or Client-specific).
- 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
- 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
- Click on Parameters and add the following parameters to the script.
Note
Make sure that you create the parameters in the order listed below, and provide variable values according to your specific requirements. - Save the script
- Schedule the script execution:
- Select the script
- Click
Schedule
(right panel) - Fill in details:
- Schedule Name
- Target Resource(s)
- Schedule Type:
One-time
- Ensure all parameter values are correctly set.
Note
If you are using a custom namespace or a custom repository, ensure you specify the repository name and provide the corresponding repository username and password. - Click Save.
- Run the Scheduled Script from the Scheduled Script section.
- 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:
- Login to Gateway using:
gateway-admin
if nextgen gateway running with Ubuntu 22 only. - 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
Save the file.
Run the script using the following command:
a. Command with namespace and reposiotry
Examples:./updater.sh <namespace> <repository>
- With default namespace and default repository
./updater.sh <namespace> <repository>
- With custom namespace and default repository
./updater.sh <namespace> <repository>
Note
Replacegateway-namespace
with your actual gateway namespace. - With custom namespace and custom repository with no credentials
./updater.sh <namespace> <repository>
Note
Replacegateway-namespace
andcustom-repository
with your actual namespace and repository URL.
b. Command with namespace and custom repository with authorization
Example./updater.sh <namespace> <repository_name> < repository_username < repository_password>
sh updater.sh gateway-namespace custom-repository repository_username repository_password
Note
Replace the placeholders with your actualnamespace
,repository URL
,username
, andpassword
.- With default namespace and default repository
Verify the Webprobe Helm version (should be
19.2.1
).helm list | grep webprobe
Access the Webprobe container:
kubectl exec -it -n <namespace> webprobe-0 -- bash
Check the installed Chrome and Edge versions:
msedgedriver --version chromedriver --version geckodriver --version dpkg -l | grep -E "chrome|edge"
Expected Versions:
Package | Expected Version |
---|---|
Google Chrome | 138.0.7204.168-1 |
Microsoft Edge | 138.0.3351.95-1 |