MongoDB Migration Doc v2.0

As part of the iFIX-2.0-alpha release, we have migrated the following master data from ifix_db to mgramseva_db:

  1. Adapter Master Data Service

    1. Department

    2. Expenditure

    3. Project

  2. Department Entity Service

    1. Department Entity

    2. Department Hierarchy

Out of these, the project data SHOULD NOT be copied to the new DB because a new feature of the multi-tenant(GP) project is introduced with this release. New projects should be created that could be linked to multiple GPs.

Other master data can be copied.

Pre-requisites

  1. Make sure the playground pod is “dwssio/playground:mongo-v2” or newer.

  2. Keep the MongoDB Credentials handy in the following format

    1. Host(in this format): “<host-address>:27017”

    2. Username - a user that has access to BOTH source and destination dbs

    3. Password

    4. Source and Destination DB Names

    5. List of collection names to be copied

  3. The mongo-migration.sh script copied to the playground pod. (You should have necessary kube permissions to copy a file to a pod.)

    1. Sample Command to copy the file:
      kubectl cp mongo_migration.sh ifix/<playground pod>:/

Migration Instructions

A MongoDB Dump script is provided that will copy a list of collections from a source db to the destination db.

  1. Execute the provided script with following parameters:

    1. -h = Host Address

    2. -u = username

    3. -p = password

    4. -s = source db

    5. -d = destination db

    6. -c = collection name - You can provide multiple collection as depicted in the following example

  2. ./mongo-migration.sh -h <host-address>:27017  -u <ifix username> -p <ifix password> - s <ifix db> -d <mgramseva db> -c department -c expenditure -c departmentHierarchyLevel -c departmentEntity