Extracting the v2018 source data on Kubernetes and OpenShift

Run the save_v2018_source_configuration.py script to gather the source deployment's configuration settings.

Before you begin

Complete the steps described in Migration preparation.

About this task

Note: It is recommended that you keep the console output of all python scripts that are run. On most MacOS and Linux environments, appending the following to the end of the command saves the output to the specified file:
2>&1 | tee <output filename>

Procedure

  1. Verify and fix any inconsistencies in the Management database by running the apicops preupgrade command:
    apicops preupgrade -m fix --upgrade_to v10 -l apicopsOutput.txt

    This commands checks for known data issues and cleans up the data. The time the command takes to run depends on the size of the management database. apicops reports any problems that it is unable to fix at the end of the apicopsOutput.txt output file. If apicops reports any problems, open a support case and include the apicopsOutput.txt file, do not attempt the migration until the case is resolved.

  2. Extract the v2018 data by running the save_v2018_source_configuration.py script.
    Note: The extract script must be run within 2 hours of running the apicops health check.
    On Kubernetes, if all subsystems are in the same namespace, run:
    python3 save_v2018_source_configuration.py -n <namespace> -u admin -p <password> -s <platform_api_endpoint> -r admin/default-idp-1 --storage_class <storage class> -registry_secret <image_pull_secret> -extract_image <extract_image_url>
    On OpenShift, if all subsystems are in the same namespace, run:
    python3 save_v2018_source_configuration.py -ocp -n <namespace> -u admin -p <password> -s <platform_api_endpoint> -r admin/default-idp-1 --storage_class <storage class> -registry_secret <image_pull_secret> -extract_image <extract_image_url>
    Where
    • <namespace> is your v2018 deployment's namespace.
    • <password> is the Cloud Manager UI admin password.
    • <platform_api_endpoint> is the FQDN of the platform api endpoint that is defined for your v2018 deployment. To find this run:
      • OpenShift:
        oc get routes -n <apic namespace> | grep platform-api
      • Kubernetes:
        kubectl get ingress -n <apic namespace> | grep platform-api
      Or get this value from the apiconnect-up.yml file in your project directory.
    • <storage class> is the name of the storage class your v2018 API Connect deployment is using. Get this value from the apiconnect-up.yml file in your project directory.
    • <image_pull_secret>: Is the secret used to pull the API Connect images. Get this value from the apiconnect-up.yml file in your project directory.
    • <extract_image_url>: is the URL of the API Connect extract load image ibm-apiconnect-management-v2018-to-v10-extract. To find the full URL, list all images in your registry. The extract load image URL looks like this:
      <registry_server>/ibm-apiconnect-management-v2018-to-v10-extract@sha256:521c4c4a36bf08cd9544084aa69f333f751376c89d0bd51fbe85d27ac00e893f
      Note: This image is one of the v10 images that you loaded during migration preparation: Migration preparation.
    Example (Kubernetes):
    python3 save_v2018_source_configuration.py -n apicsrc -u admin -p cuISlavSuFImPjwW5cjmMJwLZt -s api.ops-isl.jp-tok.apiconnect.cloud.ibm.com -r admin/default-idp-1 --storage_class apic-mz-ibmc-block-gold-monthly -registry_secret apiconnect-image-pull-secret -extract_image apic-dev-docker-local.artifactory.swg-devops.com/ibm-apiconnect-management-v2018-to-v10-extract@sha256:6ec184f756e03f916b1bb1b22952d8ecc2dff1b445b3c81b9fa943d775ab665a
    If Management, Portal, and Gateway subsystems are in different namespaces, use -mgmt_ns, -ptl_ns, and -gw_ns to specify each. Example (Kubernetes):
    python3 save_v2018_source_configuration.py -mgmt_ns <management_namespace> -ptl_ns <portal_namespace> -a7s_ns <analytics_namespace> -gw_ns <gateway_namespace> -u admin -p <password> -s <platform_api_endpoint> -r admin/default-idp-1 --storage_class <storage class> -registry_secret <image_pull_secret> -extract_image <extract_image_url>
    Note: Command help for the script is available with --help:
    python3 save_v2018_source_configuration.py --help
  3. The save script creates a data directory and two yaml files that are called gateway_portal_mapping.yaml and provider_org_credentials.yaml. Copy the data directory and the two yaml files to your v10 apicv10install directory.

What to do next

Install your target v10 deployment: