This is the central repository that contains all information about running the application and operating the cluster.
Group-name: remla2025-team19
You can find all of our repos, by searching org:remla2025-team19 on GitHub.
Links to the code files:
- App-frontend: https://github.com/remla2025-team19/app-frontend
- App-service: https://github.com/remla2025-team19/app-service
- Lib-version: https://github.com/remla2025-team19/lib-version
- Model-service: https://github.com/remla2025-team19/model-service
- Model-training: https://github.com/remla2025-team19/model-training
- Lib-ML: https://github.com/remla2025-team19/lib-ml
- Operation: https://github.com/remla2025-team19/operation
Kindly use the docker-compose file in the operation repository.
Simply execute the command:
docker compose upThis will start the web application, after which you can send your queries to https://localhost:8080
- Automated tagging of images. Currently we have a push based trigger.
- Better handling of ML weights? We currently store them as GitHub releases.
- Improved functionality of lib-version
vagrant upansible-playbook -u vagrant -i 192.168.56.100, ansible/finalization.ymlIn case of issues in previous step, restart minikube.
minikube stop
minikube startOn running the finalization.yaml on the ctrl node Step-2 , the sentiment-analyzer release will be deployed on the worker nodes. The finalization.yaml, will also setup one ingress controller. To access grafana and kubernetes dashboard please make the following changes to /etc/hosts
192.168.56.90 dashboard.local grafana.local
192.168.56.91 app.local
All the requirements are met:
- Helm chart
Chart.yamlexists inhelm/sentiment-analyzer/ - Covers the deployment (app-service and model-service) using
helm/sentiment-analyzer/templates - Service name can be changed via
helm/sentiment-analyzer/values.yaml - Helm chart can be installed more than once. All resources use the prefic {{ .Release.Name }}
Install Prometheus and Grafana using the following command:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo updateCreate namespace + CRDs + Prometheus/Alertmanager/Grafana:
helm upgrade --install monitoring prometheus-community/kube-prometheus-stack \
--namespace monitoring --create-namespace- Grafana
Grafana dashboard can be viewed via:
http://grafana.local
Log in with the following default credentials:
username: admin
password: prom-operator
Click on the + on the top of the screen to import the helm/sentiment-analyzer/dashboard/dashboard.json file.
Ensure the following is present in /etc/hosts
192.168.56.90 grafana.local
On accessing the grafana.local. The panels should be visible as below:
vagrant up --provision
ansible-playbook -u vagrant -i 192.168.56.100, ansible/finalization.yml -e "gsc_json=[enter-the-secret-json-base64-encoding]"After running the finalization playbook, the Sentiment Analyzer app will be available at:
URL: http://app.local
-
Add the following to your
/etc/hostsfile:192.168.56.91 app.local
After running the finalization playbook, the Kubernetes Dashboard will be available at https://dashboard.local (https is important):
-
Add the following to your
/etc/hostsfile:192.168.56.90 dashboard.local -
Get the authentication token (run on the control node):
# SSH into the ctrl VM ssh vagrant@192.168.56.100 # Generate a fresh token kubectl -n kubernetes-dashboard create token admin-user --duration=8760h # Or get the long-lasting token from secret kubectl -n kubernetes-dashboard get secret admin-user-token -o jsonpath='{.data.token}' | base64 -d
-
Copy the token and use it to log into the dashboard at https://dashboard.local
Port Forward (without ingress):
kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443Debug service issues:
# Check if dashboard services are running
kubectl -n kubernetes-dashboard get svc
# Check dashboard pods
kubectl -n kubernetes-dashboard get pods
# Re-apply dashboard configuration
kubectl apply -f ansible/k8s/dashboard.ymlThen access via: https://localhost:8443
Get Token (alternative method):
kubectl -n kubernetes-dashboard create token admin-user- Testing the continuous experimentation setup
kubectl get pods -l app=app
kubectl get pods -l app=model
kubectl get virtualservices
kubectl get destinationrules
- Verify Istio sidecar injection
kubectl get pods -l app=app -o jsonpath='{.items[*].status.containerStatuses[*].name}'
kubectl get pods -l app=model -o jsonpath='{.items[*].status.containerStatuses[*].name}'
- Generate load for metrics testing
# Make the script executable
chmod +x generate-experiment-traffic.sh
# Generate traffic for 5 minutes
./generate-experiment-traffic.sh- Check metrics are being collected
# Port-forward to Prometheus
kubectl port-forward -n istio-system svc/prometheus 9090:9090 &
# Query metrics (open http://localhost:9090)
# Test queries:
# - num_requests{app="model"}
# - sum(rate(istio_requests_total{destination_app="app"}[1m])) by (destination_version)
# - histogram_quantile(0.95, sum(rate(num_requests_bucket{app="model"}[5m])) by (le, version))
- Access Dashboards
istioctl dashboard kiali
istioctl dashboard prometheusThe docs folder contains project related documents for this assignment.
- Deployment.md: Describes the final deployment structure and is helpful in understanding overall request flow.
- Extension.md: Proposes an improvement to our current setup, including experimental design.
