diff --git a/README.md b/README.md index fad0553..8a07f57 100644 --- a/README.md +++ b/README.md @@ -1 +1,2 @@ -# GameRecommender \ No newline at end of file +# GameRecommender +This is a game recommender API which recommends games in a specific genre based on the user's preferences. \ No newline at end of file diff --git a/deploy.sh b/deploy.sh deleted file mode 100644 index fdbced8..0000000 --- a/deploy.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -e # Exit immediately if a command fails - -echo "Setting up Kubernetes" -doctl kubernetes cluster kubeconfig save game-cluster # Replace with your cluster name - -echo "Forcing Kubernetes to pull the latest image" -kubectl set image deployment/gameapi gameapi=registry.digitalocean.com/game-recommender/gameapi:latest --record - -echo "Rolling update in progress" -kubectl rollout status deployment/gameapi - -echo "Deployment successful!" - -chmod +x deploy.sh \ No newline at end of file diff --git a/main.py b/main.py index dacfa75..77c4291 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,8 @@ from app import input_parser as parser from app.database import get_db -VERSION = "1.1.2" +VERSION = "1.1.3" + # Prometheus metrics REQUEST_COUNT = Counter("http_requests_total", "Total HTTP requests", ["method", "endpoint", "status"]) REQUEST_LATENCY = Summary("http_request_latency_seconds", "Request latency in seconds") diff --git a/terraform/grafana/dashboards/cluster-monitoring-dashboard.json b/terraform/grafana/dashboards/cluster-monitoring-dashboard.json index 9117724..1eb3401 100644 --- a/terraform/grafana/dashboards/cluster-monitoring-dashboard.json +++ b/terraform/grafana/dashboards/cluster-monitoring-dashboard.json @@ -555,8 +555,7 @@ "lineWidth": 1, "pointSize": 5, "scaleDistribution": { - "log": 2, - "type": "log" + "type": "linear" }, "showPoints": "auto", "spanNulls": false, @@ -611,7 +610,7 @@ "uid": "c0c2d72b-134a-489e-9edf-3060d7a31c0c" }, "editorMode": "code", - "expr": "sum by (status)(rate(http_requests_total{endpoint=\"/recommendation\", status=\"200\"}[5m]))", + "expr": "sum by (status)(increase(http_requests_total{endpoint=\"/recommendation\", status=\"200\"}[1m]))", "instant": false, "legendFormat": "__auto", "range": true, @@ -706,7 +705,7 @@ "uid": "c0c2d72b-134a-489e-9edf-3060d7a31c0c" }, "editorMode": "code", - "expr": "sum by (status)(rate(http_requests_total{endpoint=\"/recommendation\",status=~\"4..|5..\"}[1m]))\r\n", + "expr": "sum by (status)(increase(http_requests_total{endpoint=\"/recommendation\",status=~\"4..|5..\"}[1m]))\r\n", "instant": false, "legendFormat": "__auto", "range": true, @@ -906,6 +905,6 @@ "timezone": "", "title": "gamerecommender monitoring", "uid": "b2f095ce-bdf5-4cf5-9ce5-4a0fe519822c", - "version": 26, + "version": 27, "weekStart": "" } \ No newline at end of file