Skip to content

aws-samples/amazon-eks-saga-orchestration-trail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Introduction

This project implements the Trail microservice that participates in the saga pattern with Amazon Elastic Kubernetes Service (EKS).

Usage

Build

  1. Clone the repo.
git clone ${GIT_URL}/amazon-eks-saga-orchestration-trail

Skip this step, if instructions to build images were followed in the eks-saga-aws repository. Else, follow the steps below to build and push the image to Amazon ECR.

  1. Build the Docker image and push to Docker repository.
cd amazon-eks-saga-orchestration-trail/src

aws ecr get-login-password --region ${REGION_ID} | docker login --username AWS --password-stdin ${ACCOUNT_ID}.dkr.ecr.${REGION_ID}.amazonaws.com
IMAGE_URI=${ACCOUNT_ID}.dkr.ecr.${REGION_ID}.amazonaws.com/eks-saga/trail'
docker build -t ${IMAGE_URI}:0.0.0 . && docker push ${IMAGE_URI}:0.0.0

Deploy

  1. Create ConfigMap running the command below from the yaml folder. Change Asia/Kolkata to appropriate timezone value in the sed command below. Then, run the following commands to create the ConfigMap.
cd amazon-eks-saga-orchestration-/yaml
RDS_DB_ID=eks-saga-db
DB_ENDPOINT=`aws rds describe-db-instances --db-instance-identifier ${RDS_DB_ID} --query 'DBInstances[0].Endpoint.Address' --output text`
sed -e 's#timeZone#Asia/Kolkata#g' \
  -e 's/regionId/'"${REGION_ID}"'/g' \
  -e 's/dbEndpoint/'"${DB_ENDPOINT}"'/g' \
  cfgmap.yaml | kubectl -n eks-saga create -f -
  1. Deploy the microservice with this command below.
sed -e 's/regionId/'"${REGION_ID}"'/g' \
  -e 's/accountId/'"${ACCOUNT_ID}"'/g' \
  trail.yaml | kubectl -n eks-saga create -f -

Clean up

To remove objects of the Trail microservice, run the following command.

kubectl -n eks-saga delete deployment/eks-saga-trail svc/eks-saga-trail ing/eks-saga-trail configmap/eks-saga-trail

Inputs and outputs

The input is the http endpoint /trail/{orderId} and there are no outputs.

About

No description, website, or topics provided.

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
MIT-0
LICENSE-SAMPLECODE
Unknown
LICENSE-SUMMARY

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published