cuor-order-patch-materializer
v1.5.2
Published
Kafka consumer for processing order creates and updates from USXPRESS
Downloads
28
Maintainers
Readme
order-patch-materializer
Kafka consumer to process order creates and updates
Domain
cuor
Setting up
- Ensure docker desktop is installed locally
- Ensure node v12 and npm are installed locally
- Run
npm i
Docker
This consumer can be tested locally without creating a topic to consume from, using the localTesting
folder.
The testCreate
and testUpdate
files test creating and updating respectively, pulling the data from
the orderCreatePayload.json
and orderUpdatePayload.json
To Run
- Run
docker-compose up -d
- This will begin a confluent kafka cluster. Go to
http://localhost:9021
, select the cluster that was created, and create thelocal_ihtl_load_upsert_json
topic.
- This will begin a confluent kafka cluster. Go to
- Run
npm run create
in order to test order creating - Run
npm run update
in order to test order updating - Note: the
orderCreatePayload.json
file will have to be updated with new order numbers as you create each order
Deploy
To deploy this consumer, bump the package version inside package.json
. Each of this fields needs to have the version number updated:
- version
- docker:tag
- docker:publish
Once the version numbers have been updated, run
npm run docker:deploy
. This will build, tag, and push the new image with the new version number to ECR: https://console.aws.amazon.com/ecr/repositories/private/147925332649/cuor-order-patch-materializer?region=us-east-1
Once the new image is pushed to ECR, update the dev and prod config yamls to point at the new image:
- dev: https://github.com/xpress-technologies/cuor-order-patch-materializer-config/blob/main/dev/default/helm/values.yaml
- prod: https://github.com/xpress-technologies/cuor-order-patch-materializer-config/blob/main/prod/default/helm/values.yaml
Once the config repo is updated to point to the new version, sync the application in Argo to deploy:
- dev: https://argocd-shared01-ue1-dev.haulynx.io/applications/dev-cuor-order-patch-materializer
- prod: https://argocd-shared01-ue1-prod.haulynx.io/applications/prod-cuor-order-patch-materializer