Upgrade the appliance
This document focus on addressing upgrade approaches for new CAP based airgap appliance in TCA3.1.0 release and beyond.
To upgrade existing TCA2.3.x airgap server via legacy airgap scripts still follow up the workflow of "export-->import-->upgrade" approach as what we did in previous releases. This approach is not part of this document.
- Download airgap appliance upgrade bundle ISO image from customer connect website.
Download the image from customer support website and save the image to a folder in airgap applaince. Generally we recommend user to save the image to /data folder on airgap appliance.
- Modify airgap appliance user-inputs.yml config file with path to ISO image.
There's a parameter "local_iso_path" which used to define path to ISO image of airgap appliance upgrade bundle. After login airgap appliance, user need to edit config file of "/usr/local/airgap/scripts/vars/user-inputs.yml" with correct path to upgrade bundle ISO image. Sample of user-inputs.yml ISO image path parameter:
# local_iso_path define the path to upgrade bundle iso local_iso_path: /data/update.iso
Another optional parameter "skip_snapshot" can be set here. When set this parameter to True there will no disk snapshot took during upgrade and then the system cannot be revert to original state after upgrade. By default, the value of this parameter is "no". To enable skip snapshot, set the value to "yes":skip_snapshot: yes
Save the file and exit editor.
- (Optional) Upgrade airgap scripts manuallyFor some scenario such as to upgrade from 3.0.0 airgap appliance to 3.1.0 release, before trigger upgrade process, the airgap scripts need to be manually updated first. Below are the steps to upgrade airgap scripts. Before execute below steps, make sure above step 1 and 2 of upgrade process had been completed.
- Download upgrade scripts from jfrog.
- If no internet access, copy below code block and create a new script with name "upgrade-scripts.sh" in "/usr/local/airgap/scripts/bin/" folder on airgap appliance. And paste the copied code block into new script and save the file.
#!/bin/bash # Broadcom Confidential. Copyright (C) 2024 Broadcom. All Rights Reserved. # The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. root="$(dirname $(realpath $0))/../.." var_file=$root/scripts/vars/user-inputs.yml echo "Upgrading airgap scripts before start upgrade..." local_iso_path=$(yq e '.local_iso_path' $var_file) mount $local_iso_path /mnt/cdrom sleep 2 rpm -ivh /mnt/cdrom/package-pool/airgap_scripts-* --nodeps --force mkdir -p /data/back_scripts mv -f /usr/local/airgap/scripts/vars/user-inputs.yml /usr/local/airgap/user-inputs.yml.merge cp -R /usr/local/airgap/scripts /usr/local/airgap/scripts.`date '+%Y%m%d%H%M%S'` cp -R /data/scripts /usr/local/airgap/ mv /usr/local/airgap/user-inputs.yml.merge /usr/local/airgap/scripts/vars/ cp /usr/local/airgap/scripts/vars/deploy-user-inputs.yml /usr/local/airgap/scripts/vars/deploy-user-inputs.yml.merge sed -i '/^#/d' /usr/local/airgap/scripts/vars/deploy-user-inputs.yml.merge yq eval-all 'select(fileIndex == 0) * select(filename == "/usr/local/airgap/scripts/vars/user-inputs.yml.merge")' /usr/local/airgap/scripts/vars/deploy-user-inputs.yml.merge /usr/local/airgap/scripts/vars/user-inputs.yml.merge > /usr/local/airgap/scripts/vars/user-inputs.yml t31_buildnum=$(yq e '.build_sync' /usr/local/airgap/scripts/vars/deploy-user-inputs.yml.merge) t30_buildnum=$(yq e '.build_sync' /usr/local/airgap/scripts/vars/user-inputs.yml) sed -i "s/$t30_buildnum/$t31_buildnum/g" /usr/local/airgap/scripts/vars/user-inputs.yml t31_release=$(yq e '.products[].versions' /usr/local/airgap/scripts/vars/deploy-user-inputs.yml.merge) t30_release=$(yq e '.products[].versions' /usr/local/airgap/scripts/vars/user-inputs.yml) sed -i "s/$t30_release/$t31_release/g" /usr/local/airgap/scripts/vars/user-inputs.yml chown -R admin:users /usr/local/airgap mv /data/scripts /data/back_scripts/scripts.`date '+%Y%m%d%H%M%S'` umount /mnt/cdrom sleep 2 echo "airgap scripts upgrade done!"
- Upgrade scripts.
bash /usr/local/airgap/scripts/bin/upgrade-scripts.sh
- Kick off upgrade process
After save the config file now user can starts the upgrade by executing command below:
agctl upgrade
Once upgrade session starts up user can monitor the ansible output logs in folder /usr/local/airgap/logs/ and check CAP upgrade logs under folder "/var/log/vmware/capengine/cap-update/workflow.log" for more details.