Preparing the v2018 deployment for upgrade
Prepare your v2018 deployment for upgrade to v10.0.1.2 on VMware.
-
Ensure that all subsystems are version
2018.4.1.15. For example:# apic version INFO[0000] Log level: info Control plane: 1.18.0 Appliance base 2.1.3 GitCommitSha:2.1.2-24-g73c36ce Packages: - appliance-base:2.1.3 - appliance-runtime-2.1.3:1.0.0 - subsystem-management:2018.4.1.15 - Make sure the API Connect cluster is healthy. For each subsystem (Management, Developer
Portal, and Analytics) run the following command:
apicup subsys health-check <subsystem_name>If the cluster is healthy, the health-check command returns silently with a
0return code. - Remove any stale upgrade files:
apic clean-upgrade-files - Complete a full backup for the API Connect v2018 Management, Portal,
and Analytics subsystems. See Backing up and restoring. Tip: Ensure your backup archives are valid. For example:
$ tar -tzf <FILENAME>.tar.gz >/dev/nullOn success, the command returns to the command line prompt with no output. If there is a problem with the file, an error similar to the following would be reported:
tar: 0511-169 A directory checksum error on media; -559038737 not equal to 67008. - On the v2018 management subsystem deployment, use the
apicopsutility to ensure the v2018 management database is consistent:Note that
apicopsis distinct fromapicup.Important: Upgrade will fail if theapicopscommand is not successfully completed within 2 hours of starting the management upgrade. If the management upgrade must be run more than once, you must run the command in fix mode each time within 2 hours of starting the management upgrade.- Obtain the latest v2018 release of
apicopsfrom https://github.com/ibm-apiconnect/apicops#latest-v2018-release. - Download the
apicopsbinary to one of the Management cluster servers, and make it executable:chmod +x apicopsSee also
apicopsset up requirements: https://github.com/ibm-apiconnect/apicops#requirements - Run
apicopsas root:# sudo -i # apicops preupgrade -m fix --upgrade_to v10 -l <outputLogFileName>- The
-moption runs the utility in fix mode. Running the utility in fix mode resolves most problems. If the utility identifies a problem it cannot resolve, contact IBM Support. - Set the
-loption to send output to a log file.
- The
- Confirm from the logs that all issues are fixed.
- Obtain the latest v2018 release of
- Make sure cluster is healthy before proceeding:
apicup subsys health-check <management_subsystem_name>If the cluster is healthy, the health-check command returns silently with a
0return code. - Obtain the needed upgrade script and supporting files.
- Go to the What's New in the latest version information page.
- Locate the Note: You can access the latest files from <URL link>. Select the <URL link> to go directly to the Announce page on Fix Central, where you can download files for the latest version of API Connect.
- Download IBM® API Connect <version> scripts and assets required for v2018 > <v10_version_with_latest_iFix> side-by-side upgrades from API Connect Fix Central.
- Decompress the tar file and copy (
scp) thedr-upgradedirectory to the v2018 management system.The directory contains
dr-upgrade-extract.py, which you will use to extract v2018 configuration.
- Ensure that traffic to the management endpoints is stopped before running the python
script.
For example, a load balancer might need to mark the backends as down so that no incoming traffic is accepted.
- Extract the v2018 data that is needed for upgrade. Change directory to the
dr-upgradedirectory and run the python extract script asroot:# sudo -i # python3 dr-upgrade-extract.pyTip: You can optionally run the script in the background:nohup python3 dr-upgrade-extract.py &> extract.log & tail -f extract.log- The script creates
2018-extracted-data.zip. Example output:. . . Extract job is in Running state. Extract job is complete Time elapsed: 0:06:17.397687 Zipped 2018 extracted data and logs under '2018-extracted-data.zip'The amount of time required for the extraction is a function of the amount of data in the v2018 database.
The file
2018-extracted-data.zipcontains your application data in an unencrypted format. This data should be kept secure. The data is required to successfully upgrade to v10. - If the extract script encounters an error, you must cleanup so that the extract script can be
run again if needed. Complete the following steps:
- Zip up the incomplete or failed extracted data and
logs
kubectl get pvc pv-claim-apiconnect-v10-upgrade -ojsonpath='{.spec.volumeName}' | xargs kubectl get pv -ojsonpath='{.spec.local.path}' | xargs zip -r 2018-extracted-data-INCOMPLETE.zip - Delete the extract job:
kubectl delete job apiconnect-v2018-extract - Delete the PVC:
kubectl delete pvc pv-claim-apiconnect-v10-upgrade
- Zip up the incomplete or failed extracted data and
logs
- The script creates
- Save the following files to a location where you can access them later, while installing
the v10 system:
2018-extracted-data.zip- The
apicupproject directory. You must use this project directory on your v10 system.
- Power off the virtual machine with the 2018 system.
- Continue with Upgrading v2018 subsystems to v10.