Single virtual machine upgrade

Upgrade a single virtual machine installation of AppScan 360° to v2.2.x.

Introduction

Upgrade is supported for custom (production) deployments only. Express installations must be installed as if new.

Supported upgrade paths:

Initial version Upgrade path
2.0.x --modular, resuming from cert-manager step
2.1.x --upgrade
Note: Upgrade is supported only for Custom/Production mode deployments. Express/POC deployments must be reinstalled as a fresh installation.
Note: Go through the full list of supported command-line options to upgrade with right options, see Command line support for single virtual machine installation.

Before you begin

For all upgrade paths, complete these steps.

  1. Download required installer packages.
    Download all required kits from MHS and place them in the same directory (<kits_location>):
    • AppScan360_SingleVMsetup_v2.2.0.run
    • AppScan360_v2.2.0.run
    • AppScan360_ASRA_v2.2.0.run
    • AppScan360_DTCS_v2.2.0.run (required for DAST scan features)
    • AppScan360_SCA_v2.2.0.run (optional)
  2. Set up kubectl access (if needed).
    If kubectl get pods is not working, set the kubeconfig path before running any installer commands:
    export KUBECONFIG=/home/automation/.kube/config
  3. Reuse previous answers and update for v2.2.0.
    1. Copy as360-aio-answers.env from the previous installation:
      • Source: aioWorkspace/audit/as360-aio-answers.env
      • Destination: <kits_location>
    2. Add the following new required property to the answers file for v2.2.0:
      AS360_AIO_DATABASE_TYPE='SqlServer'

      By doing this, the installer automatically applies the existing configuration from your prior deployment—including database, registry, and shared storage details—so you won't be prompted to enter them again.

      Note: If you could not to reuse the previous answers file, ensure that your responses to the installation survey questions match those from the previous installation exactly.
  4. Copy certificates (if applicable).

    If you are carrying custom certificates from the previous installation, copy the certs folder to the current <kits_location>.

  5. Export PV backups before upgrade (must be taken to restore post upgrade in case of data loss)
    Export persistent volume data before making any changes to the deployment.
    cd <kits_location>
    sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --backup
    Backup behavior:
    • Backup archives are saved under <kits_location>/backup.
    • Typical files are:
      • ascp-pv-<timestamp>.tar.gz
      • sca-pv-<timestamp>.tar.gz.

Upgrade from AppScan 360° version 2.0.x

The version 2.0.x upgrade path requires an additional preparation step to clear legacy ingress resources before running the upgrade in modular mode.

To upgrade from AppScan 360° version 2.0.x to version 2.2.x:

  1. Prepare the existing deployment.
    Run prepareUpgrade to remove older ingress-nginx and cert-manager resources that conflict with the new Gateway API and Istio based setup:
    cd <kits_location>
    sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD prepareUpgrade
  2. Run the upgrade in modular mode.

    Run the installer in modular mode and resume from the first (ipr) step:

    cd <kits_location>
    sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --modular
    When prompted for the installation mode, select 2 (Resume from component and continue forward), then select 1 (ipr) as the starting component to resume from.
  3. Restore PV backup
    Run below commands to restore old Scans data saved in backup to new version
    POD=$(sudo kubectl get pods -n hcl-appscan-ascp --no-headers | grep scanners | awk 'NR==1{print $1}')
    
    sudo kubectl exec -n hcl-appscan-ascp "$POD" -- sh -c "rm -rf /app/backup-restore/ascp && mkdir -p /app/backup-restore/ascp"
    
    # Point to the backup file path in below command
    BACKUP_FILE="./backup/ascp-pv-backup.tar.gz"
    
    sudo kubectl cp "$BACKUP_FILE" "hcl-appscan-ascp/${POD}:/app/backup-restore/ascp-pv-backup.tar.gz"
    
    sudo kubectl exec -n hcl-appscan-ascp "$POD" -- sh -c "tar -xzf /app/backup-restore/ascp-pv-backup.tar.gz -C /app/backup-restore/ascp && rm -f /app/backup-restore/ascp-pv-backup.tar.gz"
    
    # Copy data to respective folders
    sudo kubectl exec -n hcl-appscan-ascp "$POD" -- sh -c "mkdir -p /storagemount/Scans /storagemount/Apps && cp -an /app/backup-restore/ascp/storagemount/Scans/* /storagemount/Scans/ && cp -an /app/backup-restore/ascp/storagemount/Apps/* /storagemount/Apps/"
    
    # Verify post copy
    sudo kubectl exec -n hcl-appscan-ascp "$POD" -- ls -la /storagemount/Scans
    

Upgrade from AppScan 360° version 2.1.x

The v2.1.x upgrade path does not require environment preparation. Run the upgrade directly.

cd <kits_location>
sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --upgrade

Quick command summary

Action Command
Set kubectl access
export KUBECONFIG=/home/automation/.kube/config
Backup PV data
sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --backup
Prepare environment (v2.0.x only)
sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD
                prepareUpgrade
Run upgrade via modular (v2.0.x)
sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --modular
Run upgrade (v2.1.x)
sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --upgrade