Search Results for

    Show / Hide Table of Contents

    Sideloading RPS Patches

    Last updated on April 20, 2021.

    Last Reviewed and Approved on PENDING REVIEW

    This how-to article explains how RPS Administrators and experienced Patch Manager roles can manually stage or position RPS patches to RPS child nodes, in case of Content Delivery Network (CDN) service disruption.

    The activity described below is called Sideloading, which is an acceptable workaround. The method requires remote access to RPS servers and use of PowerShell.

    Intended Audience

    RPS Administrators and Patching roles are users of RPS who need to use this article.

    Overview

    RPS Patching roles routinely build patch streams and patches for deployment to RPS child nodes.

    If the Content Delivery Network (CDN) service communication is disabled, patches may not deploy from RPS parent to RPS child nodes. However, other RPS services will still let the CMDB (Configuration Management Database) update, and will continue to synchronize with the local, child node CMDBs. This is useful so that the local (child) node has a file path to the CDN file location, so that the RPS user can copy the patch files to that location.

    In this case the RPS user can manually follow the process below.

    Note

    CDN notation in this article will mix between CDN, Cdn, and cdn.

    Process

    1. Logon to a RPS server.

    2. Start an administrative PowerShell session.

    3. Perform these four steps:

      1. Get the file hash of the RPS patch.

      2. Get the Folder Resource ID.

      3. Join file paths together.

      4. Copy the RPS patch to the CDN file location.

    Step 1: Get the File Hash of the RPS Patch

    $filePath = 'C:\Packages\Firefox 70.0.zip'
    
    # Calculate the file hash to get the Resource ID
    $resourceId = [Guid]::new([Rps.Api.Utils.HashingUtils]::ComputeMD5Hash($filePath))
    
    Note

    When a patch is created, it creates an MD5 Hash ID.

    Step 2: Get the Folder Resource ID

    Note

    The folder ID is the reverse GUID of the Resource Item.

    # Get the folder ID. FolderId is the reverse of the content Resource Item.
    $folderId = [Rps.Api.Utils.HashingUtils]::Reverse($newContent.Id)
    

    Step 3: Join File Paths Together

    # Get CDN Folder
    $localNode = Get-RpsLocalNode
    $cdnPath = $localNode.CdnPath
    
    # Get CDN folder path to store file
    $cdnFolderPath = Join-Path -Path $cdnPath -ChildPath $folderId
    

    Now that we have the full path to the local CDN, we can copy the RPS patch contents over.

    Step 4: Copy the RPS Patch to the CDN File Location

    # Copy item
    Copy-Item -Path $filePath -Destination $cdnFolderPath -Force
    

    Example

    $filePath = 'C:\Packages\Firefox 70.0.zip'
    
    # Calculate the file hash to get the Resource ID
    $resourceId = [Guid]::new([Rps.Api.Utils.HashingUtils]::ComputeMD5Hash($filePath))
    
    # Get the folder ID. FolderId is the reverse of the content Resource Item.
    $folderId = [Rps.Api.Utils.HashingUtils]::Reverse($newContent.Id)
    
    # Get CDN Folder
    $localNode = Get-RpsLocalNode
    $cdnPath = $localNode.CdnPath
    
    # Get CDN folder path to store file
    $cdnFolderPath = Join-Path -Path $cdnPath -ChildPath $folderId
    
    # Copy item
    Copy-Item -Path $filePath -Destination $cdnFolderPath -Force
    
    In This Article
    Back to top Generated by DocFX