Source of truth integrator for Peppermint.
See Peppermint.
The runner will crawl a directory and send CATALOG.json files to Peppermint. The script has been updated to:
- ensure one process runs: the script will create a run flag file, that will delete after it executes
- remembers which entry has been processed: it will create a empty file in the tracking directory that indicates the entry had been processed. To reprocess a record, delete the corresponding tracking file.
- send records in batches. See config file.
- Install docker-compose
- Clone Peppermint and this repo under the same directory.
- Run using Peppermint's docker-compose.yml:
docker-compose up
The runner will start harvesting 'crawling' the Datacrate directory specified in config.docker.json.
Run docker run --rm -v <path to datacrate directory>/:<path specified as 'source' in config file> -v <host config file>:/opt/peppermint-runner/config.json -e "RUN_AS_CRON=true" [ if peppermint target is a docker instance: --network=<network name>] qcifengineering/peppermint-runner:latest.
E.g. docker run --rm -v /mnt/data/publication/public/:/mnt/data/publication/public/ -v /home/vagrant/source/peppermint-runner/config.docker.json:/opt/peppermint-runner/config.json -e "RUN_AS_CRON=true" --network=peppermint_default qcifengineering/peppermint-runner:latest
- Perform 'Developing' quick set up below
- Run
node index.jsornode index.js --config <path to config>
- Edit config.json
- Edit crontab