Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Currently, all the migration scripts for all the services/repos (sunbird-lms-service, group-service, sunbird-notification-service, and sunbird-course-service) are packaged with the cassandra-migration module jar. And all the migration information is stored in the cassandra_migration_version and cassandra_migration_version_counts tables in the sunbird keyspace (used for sunbird-lms-service).

Jira Legacy
serverSystem JIRA
serverId2207a759-5bc8-39c5-9cd2-aa9ccc1f65dd
keyLR-101

Background & Problem Statement

If any adopter wanted to build and deploy any one of the services, then the adopter needed to create all the cassandra keyspaces by executing the existing cassandra-migration module, even though the adopter was only adopting a specific service. There is no way for an adopter to only create/migrate specific keyspaces. Furthermore, it is difficult to determine determining which release a specific migration script is introduced in is difficult.

Key Design Problems

  1. Separate the migration script based on respective services/repos.

  2. Remove the bundling on script as a part of cassandra-migration module and variabilise the script path.

  3. Variabilize the keyspace for cassandra-migration module.

  4. Maintain the release version that in which release version that script introduced.

...

  • Separate all the migration script based on repos and push it to that specific repo.

    Image Removed

    Image Added

  • Mapping of the available keyspaces with repos

Repo Name

Keyspaces

sunbird-lms-service

sunbird

groups-service

sunbird_groups

sunbird-notification-service

sunbird_notifications

sunbird-course-service

sunbird_courses

Config

Code Block
breakoutModewide
sunbird_cassandra_keyspace=<keyspace_name>
sunbird_cassandra_migration_location="filesystem:<absolute or relative path>/db/migration/cassandra"