Migrating from a Vendor-rated Data Manager Based Solution to a Rating Engine Based Solution

For installations with Vendor-rated Data Manager, migration is necessary to a CloudBlue Commerce solution based on a combination of Usage Collector, Rating Orchestrator, and Rating Engine.

To migrate from a Vendor-rated Data Manager based solution to a Rating Engine based solution:

  1. Upgrade Rating Engine and Order Management to the necessary versions.

  2. Shift the existing service plans for which usage is reported using Vendor-rated Data Manager to Rating Engine. For the instructions, refer to the Shifting Existing Service Plans and Subscriptions to Rating Engine section. If you do not know which plans to shift, postpone this step until you run precheck in step 4 and get the list of such service plans.

  3. Stop importing usage reports to Vendor-rated Data Manager:

  4. Wait until all existing reports are processed (when they are processed, the ChargeProcessing task will create billing orders). To check that all existing reports have been processed, do the following:

    1. Download the template.yaml file and place it to the node with access to Kubernetes where CloudBlue Commerce is deployed.

    2. Create the precheck.sh file with the following content and place it to the same location.

    3. Run the following command:

      sh precheck.sh "<usage-collector-version>" "bss-db" "5432" "<kubernetes-namespace>" "<url docker repo>"

      Where:

      <usage-collector-version> is the Usage Collector version that you will install, for example, 1.7.1162.

      <kubernetes-namespace> is the namespace where CloudBlue Commerce is deployed.
      <url docker repo> is the url of the docker repository where docker images are located, that is, odindevops-a8n-docker.jfrog.io.

    4. Check the result of the precheck.sh script execution using the following command:

      kubectl -n <kubernetes-namespace> logs $(kubectl -n <kubernetes-namespace> get pods --selector=job-name=usagecollector-repayg-precheck --output=jsonpath='{.items[*].metadata.name}')
      

      If you get the message below, proceed with the next step. Otherwise, refer to the Migration Troubleshooting section for the instructions.

      Prechecks completed successfully: Usage Collector can be installed
  5. Obtain the OAuth key and secret used by Vendor-rated Data Manager. They will be used for Usage Collector installation:

    ---
    components:
    	usagecollector:
    		oauthkey: <value>
    		oauthsecret: <value>
    
    kubectl -n <kubernetes-namespace> get secret ratingenginepayg -o go-template='{{range $k,$v := .data}}{{"### "}}{{$k}}{{"\n"}}{{$v|base64decode}}{{"\n\n"}}{{end}}'
    
  6. Delete the Vendor-rated Data Manager microservice. Complete these steps to do this:

    1. Use the following command to delete the installed microservice:

      /usr/local/bin/helm delete ratingenginepayg
    2. Delete the information related to ratingenginepayg from the components section in the config.yaml.

    Warning: You must delete Vendor-rated Data Manager at this step. Not deleting the microservice may result in system failures and business disruption.

  7. Install Usage Collector.

    Important: When installing Usage Collector, you must provide oauthkey and oauthecret obtained in step 5.

  8. Ensure that Usage Collector is successfully installed. For this purpose, complete these steps:

    1. Log in to PCP and go to Services > Applications.

    2. Switch to the APS Instances tab.

    3. Locate Usage Collector in the list of installed applications and click its name.

    4. Click Edit Connection Settings.

    5. Make sure that the Application API end-point URI has the following value:

      https://usagecollector:8081/rest

      Update the value if necessary.

    6. Click Submit to save the changes.

  9. Install Rating Orchestrator.

  10. Launch the importing of usage reports to Usage Collector:

Migration Troubleshooting

The precheck script that you run to check system readiness for Usage Collector can report issues that must be fixed prior to installing Usage Collector.

Below is an example of such a log with issues:

Usage Collector cannot be installed yet. Please fix the issues from the log:
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - Precheck started 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - unprocessedBatchesIds size is 1 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - There are unprocessed batches, their IDs are: 7 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - inProgressReportsBatchesIds size is 1 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - There are batches for reports with 'IN_PROGRESS' status, their IDs are: 8 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - plansToCheck 2 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - There are reports with records for subscriptions to plans not being processed by Rating Engine. IDs of these plans are 10,12 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - Make sure problems are handled before tearing down the Vendor-rated Data Manager service 
2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - Precheck completed, ready for migration: false

There are 3 issue types that can be reported.

  1. There are unprocessed batches. In this case, the output will contain the number of batches and the list of unprocessed batches. In our example, these are the lines :

    2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - unprocessedBatchesIds size is 1
    2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - There are unprocessed batches, their IDs are: 7 

    You need to move these batches to the Reported or Closed status. Learn how to do that in the Vendor-rated Data Manager Monitoring and Troubleshooting section.

  2. There are batches that are being processed. In this case, the output will contain the number and the list of such batches. In our example, these are the lines:

    2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - inProgressReportsBatchesIds size is 1 
    2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - There are batches for reports with 'IN_PROGRESS' status, their IDs are: 8 

    You need to wait while Vendor-rated Data Manager rates these batches and the billing orders are created for them. After that, status of these batches will change to Reported.

    If this does not happen, refer to the Vendor-rated Data Manager Monitoring and Troubleshooting section.

  3. Some service plans were not shifted to Rating Engine. In this case, the output will contain the number of batches affected and the IDs of the service plans that were not shifted. In our example, these are lines:

    2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - plansToCheck 2 
    2022-07-13 ... c.a.u.m.ejb.MigrationManagerBean - There are reports with records for subscriptions to plans not being processed by Rating Engine. IDs of these plans are 10,12 

    You need to shift these service plans to rating engine.

After you fix the issues, run the precheck script one more time.

CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.