Skip to content

POC using Booking API with Spring Boot and React running on AWS EKS

Notifications You must be signed in to change notification settings

dejan2609/AWSEKSPOC

 
 

Repository files navigation

AWSEKSPOC

Travel POC

This project makes use of Booking API and TravelPayouts API. Front end is developed using React and backend with Spring Boot. Resources are provisioned in AWS using Terraform.

image image image image image

I have created microservices for API Gateway, Flight Service, Hotel Service, IATA Service.Authentication is done via Cognito. JWT is passed to API Gateway POD and once the token is validated, the respective service is called. API Gateways provides cross cutting concerns such as logging and security. API Gateway service makes use of Spring Cloud Kubernetes,Spring Cloud Gateway . ALB can be integrated with Cognito but there are some limitations so went with API gateway pattern.

Terraform project TerraformEKSRDS creates the following resources

Terraform project TerraformS3DNS creates the following resources

  • S3 bucket for static website hosting

  • IAM policy for S3

  • Cloud Front Distribution

  • SSL Certificate for the domain

  • Route 53 record for Cloud front img

Pre-Requisites:

  • AWS Account
  • Cognito User Pool (User Pool Id has to be added to jwt.aws.userPoolId in Api Gateway ConfigMap)
  • Domain hosted at Route 53

STEPS

  1. Register with https://rapidapi.com/tipsters/api/booking-com/ to get key for Booking API

  2. Register with https://www.travelpayouts.com/developers/api to get key for Travel Payouts API

  3. Substitute the keys in ConfigMaps in the respective service yaml file in the folder KubernetesManifests

  4. Navigate to TerraformEKSRDS and execute the following command

    terraform init
    terraform plan
    terraform apply --auto-approve
    
  5. Once the resources are created, get the MySQL endpoint and substitute in ConfigMap and external name service in 01-IataService.yaml . Connect to MySQl and execute DBScript.sql to create and populate table for IATA codes

  6. Navigate to TerraformS3DNS and execute the following command

    terraform init
    terraform plan
    terraform apply --auto-approve
    
  7. Navigate to TravelServiceFrontend and execute the following command

    npm run build
    
  8. Final Step is applying Kubernetes manifests. There are some placeholders which have to be replaced. Mentioned in Manifests Readme file

    kubectl apply -f KubernetesManifests/.
    
  9. Optionaly install kube-prometheus-stack helm chart

Kube Prometheus Stack:

helm repo add monitoring https://prometheus-community.github.io/helm-charts
helm repo update
helm pull monitoring/kube-prometheus-stack --untar=true

Create customvalues.yaml with the following values

grafana: 
  adminPassword: admin
  service:
    type: NodePort

About

POC using Booking API with Spring Boot and React running on AWS EKS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 84.6%
  • Java 10.8%
  • HCL 3.5%
  • Other 1.1%