This document provides the scripts and procedures for updating CA certificates in Classic Gateway 21.0.0 version. Follow the applicable procedure to apply the updated CA certificates.

  • 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- CA certificates Upgrade
    • Description: Patch script to update CA certificates
    • Execution Time: 60 seconds
    • Platform: Linux
  4. Paste this following script in the script content:

    #!/bin/bash
    
    set -x
    
    # Must run as root (dpkg inside build.sh requires root privileges)
    if [ "$(id -u)" -ne 0 ]; then
      echo "This script must be run as root: sudo $0"
      exit 1
    fi
    
    WORKDIR="/tmp"
    PATCH_ARCHIVE="2126_classic_manualpatch.tar.gz"
    PATCH_FOLDER="2126patch"
    
    cd "$WORKDIR" || exit 1
    
    # Download the patch bundle; abort if it fails
    wget -q "https://opsramp-gateway.s3.us-east-2.amazonaws.com/patching/ManualPatch/2126/$PATCH_ARCHIVE"
    if [ ! -s "$PATCH_ARCHIVE" ]; then
      echo "Error: failed to download $PATCH_ARCHIVE"
      exit 1
    fi
    
    # Clean any previous extraction before re-extracting
    rm -rf "$PATCH_FOLDER"
    mkdir -p "$PATCH_FOLDER"
    tar -xvzf "$PATCH_ARCHIVE" -C "$PATCH_FOLDER"
    
    cd "$PATCH_FOLDER" || exit 1
    
    if [ -f build.sh ]; then
      sh build.sh
    else
      echo "Error: build.sh not found in $PATCH_FOLDER"
      exit 1
    fi 

  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 2126_classic_manualpatch.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 ca-

Expected Output:

ii  ca-certificates                        20260816ubuntu0.22.04.1

Expected Versions:

PackageExpected Version
CA Certificates20260816ubuntu0.22.04.1