Open stefjoosten opened 1 year ago
At the start of the migration, we bring up a migration system and a new system. All three work on the same database. At the end of the migration, we delete the old system and the migration system.
Let us make an orchestrator that does the firing up of the migration system and the cleanup when done. The Migration Orchestrator Service (MOS) is a separate component that lives during the migration to ensure that the migration proceeds as required in the migration specification. This choice allows us to deploy the MOS in a separate container. The MOS will be developed in a separate directory in the Prototype repo, so Git can synchronize differences between the MOS and the prototype framework. The MOS will be deployed in a branch of its own, so its release rhythm is independent of the release rhythm of the prototype framework.
The Migration Orchestrator Service (MOS) shall implement the following migration process.
User story
As a migration engineer, I want to fire up the migration system to start the migration and clean up the old database and the migration system after the migration is completed. This is to prevent pollution in the landscape.
After the migration of system $A$ to $B$, the remainders of $A$ and the migration system have to be removed so that only $B$ remains. This involves deleting the right tables from the database. The Ampersand compiler provides these tables (see issue AmpersandTarski/Ampersand#1404).
Task
Define a cleanup service and make it available to the user under appropriate conditions.