PoC Database migration
- Nodejs
- NPM
- Docker and Docker-compose
- Run environment
cd data-migration
npm run infra:startNote: All is dockerized. If you run npm run infra:stop all the containers will be removed as well the data (this is expected ;-))
- Check the applications (optional)
- New front: http://localhost:8080/
- New Api: http://localhost:8080/api/v1/quotes
- Legacy: http://localhost:8081/quotes/
Note: No data in the database. So the quotes lists are not rendered (this is expected ;-))
- Run the seed generator
This will populate the legacy database with fake data.
cd data-migration
npm run migration:seed- Check the applications again (optional)
- New front (empty): http://localhost:8080/
- New Api (empty): http://localhost:8080/api/v1/quotes
- Legacy (populated) : http://localhost:8081/quotes/
- Run the migration script
This will populate the new database with the legacy data (no fake).
cd data-migration
npm run migration:startNow all the platforms (old and new) are populated
- Run the validation script
This will run a fast DB vs DB validation and a quite long e2e tests with Cypress.
cd data-migration
npm run migration:validationNote: Check the migration logs at /data-migration/logs
- Congratulations! 🎉
You made it!
Both platform are using seed fake data
cd old-server
npm run infra:build
npm run infra:startEnter to localhost:8081/quotes
npm run infra:stopcd new-server
npm run infra:build
npm run infra:start- Enter to
localhost:8081/for ajax render - Enter to
localhost:8081/api/v1/quotesfor API response
npm run infra:stop