Skip to content

This vendor microservice is used to manage vendors, there purchase orders and vendor performance metrics.

Notifications You must be signed in to change notification settings

kashi5/vendor_management

Repository files navigation

Vendor Management

This module is used to manage vendors, there purchase orders and vendor performance metrics.

Stack

  • Language - Python 3.10
  • Backend Framework - Django rest framework
  • Database - PostgreSQL

Pre-requisites

To install on the Kubernetes cluster

  • Install minikube on your system

  • Install Helm on your system

  • Install kubectl on your system

  • https://minikube.sigs.k8s.io/docs/start/

  • Start the minikube cluster

    minikube start
  • Create a namespace for the vendor-svc

    kubectl create namespace vendor-svc
  • Install the helm chart

    helm install vendor-svc ./k8s/vendor-svc
  • Check the status of the pods

    kubectl get pods -n vendor-svc
  • Port forward the service to access the APIs

    kubectl port-forward k8s/vendor-svc 8000:8000 -n vendor-svc
  • To check the API swagger documnetation

    http://0.0.0.0:8000/api/docs/
  • To uninstall the helm chart

    helm uninstall vendor-svc -n vendor-svc

Installation 💿

  • Follow the steps in a chronological order to access the APIs

  • Enter the project root folder

    cd vendor_management
  • To run the docker, build the image for any changes

    docker-compose build
  • To start the app

    docker-compose up -d
  • Wait for 3 or 4 minutes after the above command is run. Run database migrations

    docker-compose run --rm vendor python manage.py migrate
  • Run Test suite

    docker-compose run --rm vendor python manage.py test
  • To check the API swagger documnetation

    http://0.0.0.0:8000/api/docs/
  • To access any APIs, register as user check the doumentation

    http://0.0.0.0:8000/api/register/
  • Once registered, access the token. To access any other APIs you need to add the token in the header as Authorization Token <token_value>

    http://0.0.0.0:8000/api/token/
  • To stop the docker container

    docker-compose down 

Note

About

This vendor microservice is used to manage vendors, there purchase orders and vendor performance metrics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published