Gift Galaxy

YearFeb, 2023 - May, 2023
TechnologyMicroservices, Spring Boot, Postman, Docker, Kubernetes, Helm
Project

Gift Galaxy Microservices

Description

The Gift Galaxy project aims to utilize microservices architecture for efficient development and deployment of its application. This report outlines the tools and procedures used for local development and Kubernetes-based production deployment.

Technology Used and Explanation  

API Gateway:

Use Nginx as API Gateway, to protect and manage all services' endpoint:


Inter Process Communication (IPC)

Synchronous/Asynchronous, Request/Response IPC (In RESTful style)

-Test with Postman

-JSON format

Service Discovery (Kubernetes)

Every micro-services in this system will register itself in the discovery server (we can also use Eureka server). This will track all active services.

Service Instance per Container

Dockerize the service into a container.

Gift Galaxy - Microservices Architecture

Tools Used

  1. Postman: API development and testing.
  2. Docker Desktop: Local containerization environment.
  3. Helm: Kubernetes package manager for deploying applications.
  4. Skaffold: Simplifies Kubernetes development workflow.
  5. K9s: Kubernetes CLI to manage Kubernetes clusters.
  6. MongoDB: NoSQL database for storing user data.
  7. PostgreSQL: Relational database for recommendations.

Local Development (Docker)

  1. Clone Repository: The project repository is cloned locally.
  2. Run Microservices: Each microservice is started by navigating to its directory and running the applications.
  3. Connect to Databases:
    • MongoDB: Accessed via localhost:27017 with credentials.
    • PostgreSQL: Accessed via localhost:5432 with credentials.

Kubernetes (Production and Local Development)

  1. CI/CD Setup: GitHub repository has secrets configured for DockerHub and DigitalOcean.
  2. Install NGINX Ingress Controller:
    • For local development: NGINX Ingress Controller installed via Helm.
    • For production: NGINX Ingress Controller installed with customized values.
  3. Create Secrets: Secrets for microservices are created and applied.
  4. Add PVC (Production Only): Persistent Volume Claims added to the cluster.
  5. Start Helm Chart (Local Development Only): Application is deployed using Helm for local development.
  6. Setup DNS: Host file is updated to resolve local URLs.
  7. Test Connection: Endpoints are tested to ensure successful connection.

Conclusion

The Gift Galaxy project successfully utilizes microservices architecture for its development and deployment processes. With Docker for local development and Kubernetes for production deployment, the project ensures scalability, flexibility, and efficiency. By following the outlined procedures and utilizing the specified tools, the development and deployment workflow of Gift Galaxy is streamlined and optimized.