Go to file
2024-04-17 09:16:25 +00:00
kubernetes Second Assigment 2024-04-16 17:33:02 +02:00
productcatalogue Second Assigment 2024-04-16 17:33:02 +02:00
shopfront Second Assigment 2024-04-16 17:33:02 +02:00
stockmanager Second Assigment 2024-04-16 17:33:02 +02:00
README.md Actualizar 'README.md' 2024-04-17 09:16:25 +00:00

Microservices Java Spring-boot app + Docker + Kubernetes

This project consists of an e-commerce application built with microservices using Spring Boot in Java 21 and Maven 4.0.0. The application is divided into three microservices: Shopfront (frontend), Product Catalogue (product catalog), and Stock Manager (inventory management). Additionally, a directory with YAML files for service deployment is included.

Project Structure

  • Simple examples of functional end-to-end tests that use JUnit and REST-assured to test the DJShopping application

  • shopfront

  • The 'shopfront' microservice of the DJShopping example application that provides the primary entry point for the end-user (both Web UI and API-driven)

  • productcatalogue

    • The 'product catalogue' microservice of the DJShopping example application, which provides product details like name and price stockmanager
    • The 'stock manager' microservice of the DJShopping example application, which provides stock information, such as SKU and quantity
  • prepare-app.sh: script to prepare the application and create all related services.

  • remove-app.sh: remove the application and all related services.

  • Docker compose & Docker files.

Technologies Used

How to run the project

  • Open console prompt

  • Navigate to docker-Java-kubernetes-project

  • Execute the following command: ´´´ minikube start #this will initialize the minikube service (kubernetes) ´´´

  • Navigate to shopfront folder

  • Run the following command:

    mvn clean install
    
  • One the building its finish execute the following command:

    docker build -t shopfront:latest . 
    
  • Repeat in each folder

  • Once you finish building all docker images execute:

    docker images #to check the images in your system 
    
  • Execute the following command on the folder kubernetes

     kubectl service file_name.yaml #to start the service, do it with all the services  
    
  • Execute the following command

    minikube service service_name
    
    • Do it with all the services, once you open the service productcatalogue got to http://localhost/port/products and the same with stockmanager -> http:localhost:port/stocks
  • The application shold be running rigth now.