Git Product home page Git Product logo

project-ecommerce-back-end's Introduction

Project eCommerce Back-end

A. To launch the application follow the steps below:

1. prerequisite to install:

     -  Docker
     -  Maven
     -  java 8

2. initial directory

  Move to the "main" directory where the docker-compose.yml file is located

3. Build project. Creation of application JARs

  -    mvn clean install -f catalogservice/pom.xml
  -    mvn clean install -f orderservice/pom.xml
  -    mvn clean install -f packingservice/pom.xml   

4. From main directory create the network: networkIdruide

   docker network create networkIdruide

**5. From main directory launch docker-compose: **

  docker-compose up

6. please Wait until all microservices and kafka services are completely launch

 You can now begin test by open postman or chrome browser

B. To Test application follow the steps below:

Open your favorite Browser and use these urls for testing with graphiql:

Open postman (please use Postman v8.2.3) and use these urls for testing

You can use the test sets found in the directory

    /backend/posmanTests

Please change the imput parameter on API method call.

To play with application please insert products in the DB by using catalog API and this following method:

   mutation {
      createProduct(productInput:{name:"BMW motor and belts",codeProduct:"12345678",
      price:2000,description:"new factory",quantity:400}){
      codeProduct
      name
      price
      description
      quantity
   }

   } 
      

C. To lauch kubernetes, and Deploy DB or services please use files .yaml in folder k8s

Follow these steps:

Prerequis

  • Please install minikube and kubectl
  • You can change the replicas set in file *.yml
  • Open an terminal and do
      minikube stop
      minikube delete
      minikube start
      minikube ip ( ex:192.168.49.2 this ip will be use after)
      kubectl create -f mysql-service-service.yaml,mysql-service-deployment.yaml
      ,catalog-service-pod.yaml,catalog-service-service.yaml
      ,packing-service-pod.yaml,packing-service-service.yaml
      ,order-service-pod.yaml,order-service-service.yaml
      ,kafka-service.yaml,kafka-deployment.yaml
      ,zookeeper-service.yaml,zookeeper-deployment.yaml
      ,kafka-claim0-persistentvolumeclaim.yaml
      ,networkIdruide-networkpolicy.yaml

In order to check, please do:

      kubectl get configmaps
      kubectl get pods
      kubectl get services
      kubectl get deployments

If all step above are well done , you will see all services and deployments done.

In order to test your deployment,use the ip (ex:192.168.49.2) you have got in the past in chrome browser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.