Migrating an IBM Cloud Private catalog install to apicup

You can migrate an IBM Cloud Private installation that was done through the ICP catalog to an Install Assist (apicup) installation.

About this task

You can take migration steps and then complete an apicup installation. A sample migration script is provided at the end of this topic. The script shows how to do the migration tasks in Step 1 through Step 5 in the following procedure.

Procedure

  1. Create local directories for the apicup project and extra values.
  2. Copy apicup files from operator pod to the local project directory.
  3. Copy extra values from the operator pod to the local extra values directory.
  4. Update apiconnect-up.yml extra values locations to reference the new extra values directory.
  5. Scale apiconnect-operator StatefulSet to 0 replicas.
  6. Run apicup subsys list to verify all subsystems are present and apicup subsys get <subsystem name> for any desired additional validation.
  7. Follow Deploying with the Install Assist tool to upgrade.
    Note: Depending on the values used for the current analytics and gateway subsystem installations, you may need to add --no-verify true to the apicup subsys install command.
  8. When the subsystems have been successfully upgraded, delete only the top-level ICP catalog helm release with
    helm delete --purge --no-hooks <icp catalog release name>
    Important: You MUST specify --no-hooks. If you omit it, subsystems will be deleted.
    Example migration script:
    #!/bin/bash
    
    APICONNECT_OPERATOR_POD=$(kubectl get pods | grep apiconnect-operator | awk '{print $1}')
    APICONNECT_OPERATOR_STATEFULSET=$(kubectl get statefulsets | grep apiconnect-operator | awk '{print $1}')
    PROJECT_DIRECTORY=$(pwd)/tmp-apiconnect-project
    EXTRA_VALUES_DIRECTORY=$PROJECT_DIRECTORY/extra-values
    
    # create project and extra values directories
    mkdir $PROJECT_DIRECTORY
    
    # create list of apicup files to copy
    FILES=$(kubectl exec -it $APICONNECT_OPERATOR_POD ls | grep yml | tr -d '\r')
    
    # copy apicup files
    echo "copying apicup files to $PROJECT_DIRECTORY local project directory"
    for f in $FILES; do
        kubectl cp $APICONNECT_OPERATOR_POD:/home/apic/$f $PROJECT_DIRECTORY/$f
    done
    
    # copy extra values
    echo "copying extra values files to $EXTRA_VALUES_DIRECTORY"
    kubectl exec $APICONNECT_OPERATOR_POD -- tar cf - "extra-values" | tar xf -
    mv extra-values $PROJECT_DIRECTORY
    
    # update location for extra values files
    sed -i.bak "s#/home/apic/extra-values#$EXTRA_VALUES_DIRECTORY#g" $PROJECT_DIRECTORY/apiconnect-up.yml
    
    # scale apiconnect-operator statefulset to 0 replicas to prevent it from making changes
    kubectl scale --replicas=0 statefulset $APICONNECT_OPERATOR_STATEFULSET