Skip to content

Converting mp4 videos to mp3 using a microservices architecture.

Notifications You must be signed in to change notification settings

AyariAhmed/video-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Devops Project: video-converter

Converting mp4 videos to mp3 in a microservices architecture.

Used Technology

Python RabbitMQ Postgres MongoDB Kubernetes Docker Flask JWT

Architecture

Architecture

Observability

1.Metrics

We implemented the following metrics:

  • A metric that allow us to track how many request we are processing

  • We used prometheus to collet metrics data and grafana to visualize them

Automation

Helm

We created Helm Charts (for MongoDB, Postgres and RabbitMQ) that Argo CD will use for automated deployment. Once Argo CD observes a change in the infrastructure desired state in the github repository, it will apply those changes.

Terraform

We used Terraform which is an IAC tool to provision infrastructure and set-up the first Helm charts. We built 5 well isolated and maintainable infrastructure layers (Microstacks):

  • Layer0: Defining and configuring Auzre remote backend
  • Layer1: Provisioning an Azure Kubernetes Cluster (uses remote backend from layer0)
  • Layer2: Provisioning MongoDB, Postgres, and RabbitMQ ressources based on the helm charts that we prepared
  • Layer3: Adding Prometheus and Grafana to the provisioned cluster
  • Layer4: Provisioning and setting up ArgoCD

Deployment

We built the app using Docker and then Kubernetes for deployment

Deployment Strategy

We used Rolling release deployment strategy to have the monitoring and rollback advantages

API Definiton

  • Login endpoint
POST http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/login

curl -X POST http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/login -u <email>:<password>

  • Upload endpoint
POST http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/upload

curl -X POST -F 'file=@./video.mp4' -H 'Authorization: Bearer <JWT Token>' http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/upload

  • Download endpoint
GET http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/download?fid=<Generated file identified>

curl --output video.mp3 -X GET -H 'Authorization: Bearer <JWT Token>' "http://gateway.3001cf25469d4824b0ad.westeurope.aksapp.io/download?fid= <Generated fid>"

About

Converting mp4 videos to mp3 using a microservices architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published