Preparing the v2018 deployment for upgrade

Prepare your v2018 deployment for upgrade to v10.0.1.2 on VMware.

Before you move from v2018 to v10, ensure that you have reviewed Upgrade overview and requirements
On your v2018 deployment, gather the API Connect information that is needed to restore v2018 configuration onto a new v10.0.1.2 deployment.
  1. 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
  2. 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 0 return code.

  3. Remove any stale upgrade files:
    apic clean-upgrade-files
  4. 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/null 

    On 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.
  5. On the v2018 management subsystem deployment, use the apicops utility to ensure the v2018 management database is consistent:

    Note that apicops is distinct from apicup.

    Important: Upgrade will fail if the apicops command 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.
    1. Obtain the latest v2018 release of apicops from https://github.com/ibm-apiconnect/apicops#latest-v2018-release.
    2. Download the apicops binary to one of the Management cluster servers, and make it executable:
      chmod +x apicops

      See also apicops set up requirements: https://github.com/ibm-apiconnect/apicops#requirements

    3. Run apicops as root:
      # sudo -i
      # apicops preupgrade -m fix --upgrade_to v10 -l <outputLogFileName>
      • The -m option 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 -l option to send output to a log file.
    4. Confirm from the logs that all issues are fixed.
  6. 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 0 return code.

  7. Obtain the needed upgrade script and supporting files.
    1. Go to the What's New in the latest version information page.
    2. 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.
    3. 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.
    4. Decompress the tar file and copy (scp) the dr-upgrade directory to the v2018 management system.

      The directory contains dr-upgrade-extract.py, which you will use to extract v2018 configuration.

  8. 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.

  9. Extract the v2018 data that is needed for upgrade. Change directory to the dr-upgrade directory and run the python extract script as root:
    # sudo -i
    # python3 dr-upgrade-extract.py
    
    Tip: 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.zip contains 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:
      1. 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
      2. Delete the extract job:
        kubectl delete job apiconnect-v2018-extract
      3. Delete the PVC:
        kubectl delete pvc pv-claim-apiconnect-v10-upgrade
  10. Save the following files to a location where you can access them later, while installing the v10 system:
    • 2018-extracted-data.zip
    • The apicup project directory. You must use this project directory on your v10 system.
  11. Power off the virtual machine with the 2018 system.
  12. Continue with Upgrading v2018 subsystems to v10.