Examples can be managed with a "convention over configuration" approach for development using Batect.
├── batect-petshop-mariadb-yml # Batect configuration for the scenario - which databases to start and its name
|
├── db # Batect configuration for starting and migrating various databases
│ ├── batect-source-mariadb.yml
│ └── batect-target-mariadb.yml
|
└── scenario # Scenarios go here
└── petshop-mariadb # Scenario called "petshop-mariadb"
├── application-petshop-mariadb.yml # Micronaut configuration fragment for this scenario
├── source # Flyway migrations to apply to the "source" schema
│ └── V1__CREATE.sql
└── target # Flyway migrations to apply to the "target" schema
└── V1__CREATE.sql
Imagine we are creating a scenario called example-scenario
:
- Decide what databases you need for your scenario.
- Create a
batect-${example-scenario}.yml
in theexamples/
folder, which includes the batect config includes of source and target DBs you want. - Create a new folder with the name of your scenario in the
scenario
folder - Create
source
andtarget
folders which contain Flyway migrations appropriate to setup data for your chosen DB types - Create fragment of Micronaut configuration for your datasources and reconciliation datasets
in
scenario/${name}/application-${name}.yml
- Run your scenario's databases alongside Recce with
./batect -f examples/batect-<{example-scenario}.yml run
- Assuming everything starts up, invoke a reconciliation for one of your scenarios datasets via the Recce API.