Published on:
2024-05-12
#containerization #docker #WebDevelopment #django #vuejs #vutify3 #drf
Table of Contents
Dockerization of Backend
Dockerization of Frontend
Database Setup
Docker Compose
Kubernetes Setup
Manifests
Up and Running
PS: The use of Pod/PV couples for storing the files was decided to be suitable for the project instead of using a different service ready for storing files (like S3), since it offers a more 'from-scratchy' approach and allows for a better understanding of the Kubernetes ecosystem and better chaos testing at the later stage of the project. (I know this is LAME, am just experimenting to learn more about Kubernetes and its ecosystem).

| Endpoint | Method | Description |
|---|---|---|
| django-api:8000/api/add_file | POST | Receives two parameters (filename & File) to create a new instance of the class File. |
| kubemanager:1999/upload_file | POST | Receives the file along with the owner's username to store in a K8S Persistent Volume. |
| django-api:8000/api/list_files | GET | Fetches all the files (just the metadata not the actual files) owned by the current user. |
| django-api:8000/api/share_file | POST | Creates a share object for a specific user with optional expiration parameters. |
| django-api:8000/api/revoke_file | POST | Deletes a share object of a file for a specific user. |
| django-api:8000/api/download_file | GET | Requests the file. Involves a call to the kubemanager service to retrieve the file from the K8S Persistent Volume. |
| django-api:8000/api/delete_file | POST | Deletes a file along with all the shares that have been created from it (revoking all access to it). This also invokes a call to the kubemanager service to delete the file from the K8S Persistent Volume. |
| kubemanager:1999/get_file | GET | Gets the file from the K8S Persistent Volume. |
| kubemanager:1999/delete_file | POST | Deletes the file from the K8S Persistent Volume. |
Containerization of the Application
Deployment on a Dev/Test Kubernetes Cluster
