Authors:
- Manuel Campos (fc58166)
- Guilherme Sousa (fc58170)
- Gabriel Henriques (fc58182)
- Tiago Almeida (fc58161)
Grade: 20/20
A cloud-native application designed to manage a modern car dealership platform, built using real-world car listing data from Craigslist's cars and trucks dataset. The system provides comprehensive functionality for managing car listings, user interactions, maintenance scheduling, inspections, and transactions in a distributed cloud environment. For detailed technical specifications and implementation details, please refer to our comprehensive technical report.
The application leverages modern cloud-native technologies including Kubernetes for orchestration, gRPC for inter-service communication, and a robust monitoring stack with Prometheus and Grafana. The system's API is documented using OpenAPI specifications, making it easy for third-party integrations.
The system follows a microservices architecture, where each service manages a specific domain. The microservices communicate with each other using gRPC, while external clients interact with the system through a REST-based API Gateway.
- Acts as the single entry point for all external requests, exposing a REST API.
- Receives HTTP REST requests and forwards them to appropriate microservices via gRPC
- Handles authentication and request validation using Auth0.
- Includes Prometheus metrics collection for monitoring.
- Provides a web interface with templates for user authentication and dashboard access.
- Each Service manages the data of their own domain and provides CRUD operations to interact with them
- Single PostgreSQL database shared among all microservices.
- Contains tables for cars, users, car_listings, transactions, maintenance, inspection, and meetings.
- Ensures referential integrity through foreign key constraints.
- Populated with sample data for testing and development.
- Database connection details are configured through environment variables.
- All services include Prometheus metrics collection for monitoring.
- Grafana dashboards are available for metrics visualization.
- Metrics include request counts, latency histograms, active requests, and database operation time.
- Integration with Auth0 for user authentication.
- Role-based access control with permissions for different operations.
- JWT tokens used for API authentication.
- Session management for web interface.
- GitHub Actions workflows automate the continuous integration and delivery pipeline.
- Automated builds, tests, and deployments are triggered by commits to the main branch
- Docker images are built for each microservice and pushed to DockerHub.
-
Create in the project's root folder a
.envfile with the necessary credentials:DB_HOST=db-service DB_PORT=5432 DB_NAME=CloudStand DB_USER=postgres DB_PASS=pass AUTH0_DOMAIN=<domain> AUTH0_CLIENT_ID=<client_id> AUTH0_CLIENT_SECRET=<client_secret> AUTH0_AUDIENCE=<audience> FLASK_SECRET_KEY=<flask_key> AUTH0_CALLBACK_URL=<http://ingress_ip/callback> -
Create a Kubernetes Cluster and run
./apply_kubernetes_manifests.shto start the pods(May need to run
chmod +xto make script executable) -
Run
kubectl get ingressto get theingress_ipChange in the Auth0 the Ingress IP and then change in the
.envthe missing information -
Run
./clean.shand rerun./apply_kubernetes_manifests.sh -
Access the system directly via the Ingress IP or do requests with Postman
-
Access the monitoring interfaces via port-forwarding:
-
Prometheus:
kubectl port-forward service/prometheus-svc 8080:9090 -
Grafana:
kubectl port-forward service/grafana-svc 8080:3000There's two already made dashboards that can be imported, just need to change datasource's uid in the json
-
