This project is a collection of microservices built with Java and Spring Boot.
This project is a demonstration of a microservices architecture. It includes services for authentication, employee management, and notifications. It also includes an API gateway to route requests to the appropriate service.
The following microservices are included in this project:
- api-gateway: A Spring Cloud Gateway project that acts as an API gateway for the microservices.
- auth-service: A Spring Boot project that provides authentication and authorization services.
- employee-service: A Spring Boot project that manages employee data. It also uses gRPC and Kafka.
- notification-service: A Spring Boot project that sends notifications. It uses Kafka and protobuf.
- infrastructure: This project contains the AWS CDK code for deploying the infrastructure.
- integration-tests: This project contains integration tests for the microservices.
To run the projects, you will need to have the following installed:
- Java 21
- Maven
- Docker
To run the projects, you can use the following command in each project's directory:
./mvnw spring-boot:run
You can also use the provided Dockerfiles to build and run the projects in Docker containers.
This project uses Terraform to provision the infrastructure on AWS and deploy the microservices to an EKS cluster.
- Configure your AWS credentials.
- Navigate to the
terraform
directory. - Initialize Terraform:
terraform init
- Apply the Terraform configuration:
terraform apply
This will create the EKS cluster and all the necessary resources.
The kubernetes
directory contains the Kubernetes manifest files for the microservices.
api-gateway-deployment.yml
auth-service-deployment.yml
employee-service-deployment.yml
notification-service-deployment.yml
services.yml
To deploy the microservices to the EKS cluster, you can use the deploy.sh
script.
- Make sure you have built the Docker images for the microservices.
- Update the
deploy.sh
script with your Docker Hub username. - Update the Kubernetes deployment files with your Docker registry.
- Run the script:
./deploy.sh