You can update the various 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: Example- Patch Packages Upgrade - 20.1.0
    • Description: Patch Packages Upgrade - 20.1.0
    • Execution Time: 60 seconds
    • Platform: Linux
  4. Paste this following script in the script content:

    !/bin/bash
    set -ex
    
    # Define working directory
    WORKDIR="/tmp"
    PATCH_ARCHIVE="2010patch.tar.gz"
    PATCH_FOLDER="2010patch"
    
    # Move to working directory
    cd "$WORKDIR"
    
    # Download the patch archive
    wget -q "https://opsramp-gateway.s3.us-east-2.amazonaws.com/patching/ubuntu22/vg-2000-UB22-Patch/$PATCH_ARCHIVE"
    
    mkdir -p "$PATCH_FOLDER"
    # Extract the archive
    tar -xzf "$PATCH_ARCHIVE" -C "$PATCH_FOLDER"
    
    # Navigate into the extracted folder
    cd "$PATCH_FOLDER"
    
    # Run the build script
    if [ -f build.sh ]; then
      sh build.sh
    else
      echo "Error: build.sh not found in $PATCH_FOLDER"
      exit 1
    fi
    
    # Check versions
    google-chrome --version
    chromedriver --version
    firefox --version
    geckodriver --version
    runc --version
    apt show python3-django | grep Version

  5. Save the script

  6. Schedule the script execution:

    • Select the script
    • Click Schedule (right panel)
    • Fill in details:
      • Schedule Name
      • Target Resource(s)
      • Schedule Type: One-time
    • Click Save.
  7. Run the Scheduled Script from the Scheduled Script section.

  8. To get the script version :

  9. 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: ruser
  2. Take root access by using the following command and enter password:

sudo su -
3. Run the following command to change directory:

cd /tmp/
4. Download the Patch File:

  1. Untar the downloaded file using the following command:

tar -xvzf 2010patch.tar.gz
6. Run the script using the following commands:

sh build.sh
7. Run the following command to Verify the installed package versions:

dpkg -l | grep chrome
google-chrome --version
chromedriver --version
firefox --version
geckodriver --version
runc --version
apt show python3-django | grep Version

Expected Versions:

PackageExpected Version
Google Chrome143.0.7499.40
Chrome Driver143.0.7499.40
Mozilla Firefox145.0.2
geckodriver0.36.0 (a3d508507022 2025-02-24 15:57 +0000)
runc1.3.3-0ubuntu1~22.04.3
spec: 1.2.1
go: go1.23.1
libseccomp: 2.5.3
Django2:3.2.12-2ubuntu1.24