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 |
Before you begin
For all upgrade paths, complete these steps.
- Download required installer packages.Download all required kits from MHS and place them in the same directory (
<kits_location>):AppScan360_SingleVMsetup_v2.2.0.runAppScan360_v2.2.0.runAppScan360_ASRA_v2.2.0.runAppScan360_DTCS_v2.2.0.run(required for DAST scan features)AppScan360_SCA_v2.2.0.run(optional)
- Set up
kubectlaccess (if needed).Ifkubectl get podsis not working, set thekubeconfigpath before running any installer commands:export KUBECONFIG=/home/automation/.kube/config - Reuse previous answers and update for v2.2.0.
- Copy
as360-aio-answers.envfrom the previous installation:- Source:
aioWorkspace/audit/as360-aio-answers.env - Destination:
<kits_location>
- Source:
- 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.
- Copy
- Copy certificates (if applicable).
If you are carrying custom certificates from the previous installation, copy the
certsfolder to the current<kits_location>. - 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.
Backup behavior:cd <kits_location> sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --backup- Backup archives are saved under
<kits_location>/backup. - Typical files are:
ascp-pv-<timestamp>.tar.gzsca-pv-<timestamp>.tar.gz.
- Backup archives are saved under
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:
- Prepare the existing deployment.Run
prepareUpgradeto remove olderingress-nginxandcert-managerresources that conflict with the new Gateway API and Istio based setup:cd <kits_location> sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD prepareUpgrade - Run the upgrade in modular mode.
Run the installer in modular mode and resume from the first (
ipr) step:
When prompted for the installation mode, select 2 (cd <kits_location> sudo ./AppScan360_SingleVMsetup_v2.2.0.run -- $PWD --modularResume from component and continue forward), then select 1 (ipr) as the starting component to resume from. - Restore PV backupRun 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 |
|
| Backup PV data |
|
| Prepare environment (v2.0.x only) |
|
| Run upgrade via modular (v2.0.x) |
|
| Run upgrade (v2.1.x) |
|