File tree Expand file tree Collapse file tree 7 files changed +54
-10
lines changed
monitoring/grafana/provisioning/datasources Expand file tree Collapse file tree 7 files changed +54
-10
lines changed Original file line number Diff line number Diff line change 3333 LANGSMITH_API_KEY : dummy_key
3434 run : ansible-playbook ansible/validate-compose.yml
3535
36- - name : Login to GitHub Container Registry # TODO: why? - remove?
37- uses : docker/login-action@v3
38- with :
39- registry : ghcr.io
40- username : ${{ github.actor }}
41- password : ${{ secrets.GITHUB_TOKEN }}
42-
4336 - name : Build client (validation only)
4437 run : |
4538 docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/client:${COMMIT_SHA} ./client
Original file line number Diff line number Diff line change 9191 OPEN_WEBUI_API_KEY_CHAT : ${{ secrets.OPEN_WEBUI_API_KEY_CHAT }}
9292 OPEN_WEBUI_API_KEY_GEN : ${{ secrets.OPEN_WEBUI_API_KEY_GEN }}
9393 LANGSMITH_API_KEY : ${{ secrets.LANGSMITH_API_KEY }}
94+ GRAFANA_ADMIN_USERNAME : ${{ secrets.GRAFANA_ADMIN_USERNAME }}
95+ GRAFANA_ADMIN_PASSWORD : ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
9496 run : ansible-playbook -i inventory.ini ansible/deploy.yml
9597
9698 deploy-k8s :
Original file line number Diff line number Diff line change 3737 src : ../monitoring/prometheus/
3838 dest : " {{ project_dir }}/monitoring/prometheus/"
3939
40+ - name : Copy Grafana configuration files
41+ copy :
42+ src : ../monitoring/grafana/
43+ dest : " {{ project_dir }}/monitoring/grafana/"
4044
4145 - name : Log in to GHCR
4246 shell : |
Original file line number Diff line number Diff line change 33 image_tag : " {{ lookup('env', 'IMAGE_TAG') }}"
44 open_webui_api_key_chat : " {{ lookup('env', 'OPEN_WEBUI_API_KEY_CHAT') }}"
55 open_webui_api_key_gen : " {{ lookup('env', 'OPEN_WEBUI_API_KEY_GEN') }}"
6- langsmith_api_key : " {{ lookup('env', 'LANGSMITH_API_KEY') }}"
6+ langsmith_api_key : " {{ lookup('env', 'LANGSMITH_API_KEY') }}"
7+ grafana_admin_username : " {{ lookup('env', 'GRAFANA_ADMIN_USERNAME') }}"
8+ grafana_admin_password : " {{ lookup('env', 'GRAFANA_ADMIN_PASSWORD') }}"
Original file line number Diff line number Diff line change 1- version : ' 3.8'
2-
31services :
42 client :
53 build :
@@ -109,9 +107,26 @@ services:
109107 networks :
110108 - dev-network
111109
110+ grafana :
111+ image : grafana/grafana
112+ environment :
113+ - GF_SECURITY_ADMIN_USER=team3
114+ - GF_SECURITY_ADMIN_PASSWORD=team3dev
115+ container_name : studymate-grafana-dev
116+ ports :
117+ - " 3030:3000"
118+ volumes :
119+ - grafana_data:/var/lib/grafana
120+ - ./monitoring/grafana/provisioning:/etc/grafana/provisioning
121+ depends_on :
122+ - prometheus
123+ networks :
124+ - dev-network
125+
112126volumes :
113127 postgres_dev_data :
114128 weaviate_dev_data :
129+ grafana_data :
115130
116131networks :
117132 dev-network :
Original file line number Diff line number Diff line change @@ -118,6 +118,26 @@ services:
118118 networks:
119119 - proxy
120120
121+ grafana:
122+ image: grafana/grafana
123+ volumes:
124+ - grafana_data:/var/lib/grafana
125+ - ./monitoring/grafana/provisioning:/etc/grafana/provisioning
126+ networks:
127+ - proxy
128+ environment:
129+ - GF_SECURITY_ADMIN_USER= {{ grafana_admin_username }}
130+ - GF_SECURITY_ADMIN_PASSWORD= {{ grafana_admin_password }}
131+ labels:
132+ - "traefik.enable=true"
133+ - "traefik.http.routers.grafana.rule=Host(`studymate-tum.xyz`) && PathPrefix(`/monitor`)"
134+ - "traefik.http.routers.grafana.entrypoints=websecure"
135+ - "traefik.http.routers.grafana.tls.certresolver=myresolver"
136+ - "traefik.http.services.grafana.loadbalancer.server.port=3000"
137+ depends_on:
138+ - prometheus
139+
140+
121141volumes:
122142 pgdata:
123143 weaviate_data:
Original file line number Diff line number Diff line change 1+ apiVersion : 1
2+
3+ datasources :
4+ - name : Prometheus
5+ type : prometheus
6+ access : proxy
7+ url : http://prometheus:9090
8+ isDefault : true
You can’t perform that action at this time.
0 commit comments