This microservice is designed to handle media file uploads, including audio and video files. It provides various components such as a RESTful API, task queuing, metadata storage, and a relational database. The system is containerized using Docker and orchestrated with Kubernetes for seamless scaling and deployment.
- A RESTful API designed for handling audio and video file uploads efficiently.
- Ensures scalability and reliability for large file transfers.
- Utilizes RabbitMQ for queuing tasks related to media processing.
- Helps manage long-running tasks and decouple file upload from processing.
- Leverages MongoDB for dynamic and flexible storage of media metadata.
- Suitable for storing unstructured data, such as file details, status, and processing information.
- MySQL is used to manage structured data, including user permissions, logs, and relationships between media files and users.
- Ensures data integrity and efficient querying for structured information.
- Docker is employed to containerize the application, ensuring that it can run consistently across different environments.
- Facilitates smooth deployment and testing.
- Kubernetes is used to deploy, scale, and maintain containerized services.
- Enables high availability and automated scaling of services based on demand.
- Processed media files are stored in either cloud or local storage solutions.
- The system updates file paths in the relational database to track the location of processed files.
- Docker
- Kubernetes
- RabbitMQ
- MongoDB
- MySQL
- Clone the repository:
git clone https://github.com/AlfredoMartins/microservice-media-upload.git
To install and initialize the MySQL database, run the following command:
mysql -uroot < init.sql
To install K9s, follow the instructions in the official documentation:
https://k9scli.io/
To install kubectl, follow the instructions in the official documentation:
https://kubernetes.io/docs/tasks/tools/install-kubectl/
To install Minikube, follow the instructions in the official documentation:
https://minikube.sigs.k8s.io/docs/
Once the dependencies are installed, run the following script to update the environment:
./update.sh
# Expose Ports and Enable Ingress
## 4. Expose Ports
To expose the necessary services, run the following commands:
```bash
kubectl port-forward svc/rabbitmq 15672:15672
kubectl port-forward svc/gateway 8080:8080
minikube addons enable ingress