Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Grafana image instead of building it! #386

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ SRS_GNB_IP=172.22.0.37

# GRAFANA
GRAFANA_IP=172.22.0.39
GRAFANA_USERNAME=open5gs
GRAFANA_PASSWORD=open5gs

# UE IPv4 Subnet Range for APN=internet
UE_IPV4_INTERNET=192.168.100.0/24
UE_IPV4_INTERNET=192.168.200.0/24
b3c3ll marked this conversation as resolved.
Show resolved Hide resolved

# UE IPv4 Subnet Range for APN=ims
UE_IPV4_IMS=192.168.101.0/24
UE_IPV4_IMS=192.168.201.0/24
b3c3ll marked this conversation as resolved.
Show resolved Hide resolved

# Maximum Number of UEs
MAX_NUM_UE=1024
3 changes: 0 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ jobs:
- image: docker_metrics
context: metrics
file: Dockerfile
- image: docker_grafana
context: grafana
file: Dockerfile
- image: docker_rtpengine
context: rtpengine
file: Dockerfile
Expand Down
17 changes: 13 additions & 4 deletions 4g-external-ims-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
mongo:
image: mongo:6.0
Expand Down Expand Up @@ -320,15 +319,23 @@ services:
default:
ipv4_address: ${METRICS_IP}
grafana:
build: ./grafana
image: docker_grafana
image: grafana/grafana:11.3.0
container_name: grafana
env_file:
- .env
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/:/etc/grafana/provisioning/
- ./grafana:/mnt/grafana
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
#- GF_INSTALL_PLUGINS=${GRAFANA_INSTALL_PLUGINS}
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_PATHS_DATA=/var/lib/grafana
- METRICS_IP=${METRICS_IP}
expose:
b3c3ll marked this conversation as resolved.
Show resolved Hide resolved
- "3000/tcp"
ports:
Expand All @@ -342,5 +349,7 @@ networks:
config:
- subnet: ${TEST_NETWORK}
volumes:
grafana_data:
name: grafana_data
mongodbdata: {}
dbdata: {}
dbdata: {}
15 changes: 12 additions & 3 deletions 4g-volte-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
mongo:
image: mongo:6.0
Expand Down Expand Up @@ -456,15 +455,23 @@ services:
default:
ipv4_address: ${METRICS_IP}
grafana:
build: ./grafana
image: docker_grafana
image: grafana/grafana:11.3.0
container_name: grafana
env_file:
- .env
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/:/etc/grafana/provisioning/
- ./grafana:/mnt/grafana
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
#- GF_INSTALL_PLUGINS=${GRAFANA_INSTALL_PLUGINS}
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_PATHS_DATA=/var/lib/grafana
- METRICS_IP=${METRICS_IP}
expose:
- "3000/tcp"
ports:
Expand All @@ -478,5 +485,7 @@ networks:
config:
- subnet: ${TEST_NETWORK}
volumes:
grafana_data:
name: grafana_data
mongodbdata: {}
dbdata: {}
15 changes: 12 additions & 3 deletions deploy-all.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
mongo:
image: mongo:6.0
Expand Down Expand Up @@ -664,15 +663,23 @@ services:
default:
ipv4_address: ${METRICS_IP}
grafana:
build: ./grafana
image: docker_grafana
image: grafana/grafana:11.3.0
container_name: grafana
env_file:
- .env
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/:/etc/grafana/provisioning/
- ./grafana:/mnt/grafana
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
#- GF_INSTALL_PLUGINS=${GRAFANA_INSTALL_PLUGINS}
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_PATHS_DATA=/var/lib/grafana
- METRICS_IP=${METRICS_IP}
expose:
- "3000/tcp"
ports:
Expand All @@ -686,5 +693,7 @@ networks:
config:
- subnet: ${TEST_NETWORK}
volumes:
grafana_data:
name: grafana_data
mongodbdata: {}
dbdata: {}
39 changes: 0 additions & 39 deletions grafana/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ providers:
folder: Services # The folder where to place the dashboards
type: file
options:
path: /var/lib/grafana/dashboards
path: /etc/grafana/provisioning/dashboards
9 changes: 9 additions & 0 deletions grafana/datasources/prometheus_open5gs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: 1

datasources:
- name: Open5Gs
type: prometheus
access: proxy
url: http://${METRICS_IP}:9090
disableDeletion: false
editable: true
43 changes: 0 additions & 43 deletions grafana/grafana_init.sh

This file was deleted.

6 changes: 0 additions & 6 deletions grafana/prometheus_open5gs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion metrics/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

ENV DEBIAN_FRONTEND=noninteractive

ENV PROMETHEUS_VERSION=2.40.2
ENV PROMETHEUS_VERSION=2.55.0

RUN apt-get update && \
apt-get install -y wget && \
wget -q https://github.com/prometheus/prometheus/releases/download/v$PROMETHEUS_VERSION/prometheus-$PROMETHEUS_VERSION.linux-$(dpkg --print-architecture).tar.gz && \
tar xvfz prometheus-$PROMETHEUS_VERSION.linux-$(dpkg --print-architecture).tar.gz

CMD /mnt/metrics/metrics_init.sh

Check warning on line 38 in metrics/Dockerfile

View workflow job for this annotation

GitHub Actions / build (docker_metrics, metrics, Dockerfile)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
17 changes: 13 additions & 4 deletions sa-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
mongo:
image: mongo:6.0
Expand Down Expand Up @@ -305,15 +304,23 @@ services:
default:
ipv4_address: ${METRICS_IP}
grafana:
build: ./grafana
image: docker_grafana
image: grafana/grafana:11.3.0
container_name: grafana
env_file:
- .env
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/:/etc/grafana/provisioning/
- ./grafana:/mnt/grafana
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
#- GF_INSTALL_PLUGINS=${GRAFANA_INSTALL_PLUGINS}
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_PATHS_DATA=/var/lib/grafana
- METRICS_IP=${METRICS_IP}
expose:
- "3000/tcp"
ports:
Expand All @@ -327,4 +334,6 @@ networks:
config:
- subnet: ${TEST_NETWORK}
volumes:
mongodbdata: {}
grafana_data:
name: grafana_data
mongodbdata: {}
15 changes: 12 additions & 3 deletions sa-vonr-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
mongo:
image: mongo:6.0
Expand Down Expand Up @@ -490,15 +489,23 @@ services:
default:
ipv4_address: ${SMSC_IP}
grafana:
build: ./grafana
image: docker_grafana
image: grafana/grafana:11.3.0
container_name: grafana
env_file:
- .env
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/:/etc/grafana/provisioning/
- ./grafana:/mnt/grafana
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
#- GF_INSTALL_PLUGINS=${GRAFANA_INSTALL_PLUGINS}
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_PATHS_DATA=/var/lib/grafana
- METRICS_IP=${METRICS_IP}
expose:
- "3000/tcp"
ports:
Expand All @@ -512,5 +519,7 @@ networks:
config:
- subnet: ${TEST_NETWORK}
volumes:
grafana_data:
name: grafana_data
mongodbdata: {}
dbdata: {}
Loading