This repo includes a producer which call the Bike OpenData API and send the data to Kafka.
- create fat jar (
sbt clean assembly
) - create docker image and push to registry
- use AWS Fargate to run the docker image
Upload image to AWS ECR (things in curly brackets means you need to replace it with your own values)
- login to AWS ECR
(aws ecr get-login-password --region {Region} | docker login --username AWS --password-stdin {AWS_ACCOUNT_ID}.dkr.ecr.{Region}.amazonaws.com
) - create repository
- tag the image
(docker tag {localImageName}:{tag} {AWS_ACCOUNT_ID}.dkr.ecr.{Region}.amazonaws.com/{repositoryName}:{tag}
) - push the image
(docker push {AWS_ACCOUNT_ID}.dkr.ecr.{Region}.amazonaws.com/{repositoryName}:{tag}
)
- Consumer (read message from kafka and insert into postgres): Link