From a220cb0d75b94217ec462ee02cd2b8394a6e65c7 Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Mon, 3 Nov 2025 16:34:11 +0800 Subject: [PATCH 01/11] Add monitoring for CodeGen deployed by Docker compose. Signed-off-by: Yao, Qing --- CodeGen/README.md | 39 ++++++++++ .../docker_compose/intel/cpu/xeon/README.md | 57 ++++++++++++++- .../intel/cpu/xeon/compose.monitoring.yaml | 58 +++++++++++++++ .../dashboards/download_opea_dashboard.sh | 11 +++ .../provisioning/dashboards/local.yaml | 14 ++++ .../provisioning/datasources/datasource.yml | 54 ++++++++++++++ .../intel/cpu/xeon/prometheus.yaml | 27 +++++++ .../docker_compose/intel/hpu/gaudi/README.md | 57 ++++++++++++++- .../intel/hpu/gaudi/compose.monitoring.yaml | 73 +++++++++++++++++++ .../dashboards/download_opea_dashboard.sh | 12 +++ .../provisioning/dashboards/local.yaml | 14 ++++ .../provisioning/datasources/datasource.yml | 54 ++++++++++++++ .../intel/hpu/gaudi/prometheus.yaml | 32 ++++++++ CodeGen/docker_compose/intel/set_env.sh | 10 +++ CodeGen/tests/test_compose_on_gaudi.sh | 6 +- CodeGen/tests/test_compose_on_xeon.sh | 4 +- 16 files changed, 515 insertions(+), 7 deletions(-) create mode 100644 CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml create mode 100644 CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh create mode 100644 CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml create mode 100644 CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml create mode 100644 CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml create mode 100644 CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml create mode 100644 CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh create mode 100644 CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml create mode 100644 CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml create mode 100644 CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml diff --git a/CodeGen/README.md b/CodeGen/README.md index 479ad11f29..adccd262c6 100644 --- a/CodeGen/README.md +++ b/CodeGen/README.md @@ -109,7 +109,9 @@ This CodeGen example can be deployed manually on various hardware platforms usin | Hardware | Deployment Mode | Guide Link | | :-------------- | :------------------- | :----------------------------------------------------------------------- | | Intel Xeon CPU | Single Node (Docker) | [Xeon Docker Compose Guide](./docker_compose/intel/cpu/xeon/README.md) | +| Intel Xeon CPU | Single Node (Docker) with Monitoring | [Xeon Docker Compose with Monitoring Guide](./docker_compose/intel/cpu/xeon/README.md) | | Intel Gaudi HPU | Single Node (Docker) | [Gaudi Docker Compose Guide](./docker_compose/intel/hpu/gaudi/README.md) | +| Intel Gaudi HPU | Single Node (Docker) with Monitoring | [Gaudi Docker Compose with Monitoring Guide](./docker_compose/intel/hpu/gaudi/README.md) | | AMD EPYC CPU | Single Node (Docker) | [EPYC Docker Compose Guide](./docker_compose/amd/cpu/epyc/README.md) | | AMD ROCm GPU | Single Node (Docker) | [ROCm Docker Compose Guide](./docker_compose/amd/gpu/rocm/README.md) | | Intel Xeon CPU | Kubernetes (Helm) | [Kubernetes Helm Guide](./kubernetes/helm/README.md) | @@ -119,6 +121,43 @@ This CodeGen example can be deployed manually on various hardware platforms usin _Note: Building custom microservice images can be done using the resources in [GenAIComps](https://github.com/opea-project/GenAIComps)._ +## Monitoring + +The CodeGen example supports monitoring capabilities for Intel Xeon and Intel Gaudi platforms. Monitoring includes: + +- **Prometheus**: For metrics collection and querying +- **Grafana**: For visualization and dashboards +- **Node Exporter**: For system metrics collection + +### Monitoring Features + +- Real-time metrics collection from all CodeGen microservices +- Pre-configured dashboards for: + - vLLM/TGI performance metrics + - CodeGen MegaService metrics + - System resource utilization + - Node-level metrics + +### Enabling Monitoring + +Monitoring can be enabled by using the `compose.monitoring.yaml` file along with the main compose file: + +```bash +# For Intel Xeon +docker compose -f compose.yaml -f compose.monitoring.yaml up -d + +# For Intel Gaudi +docker compose -f compose.yaml -f compose.monitoring.yaml up -d +``` + +### Accessing Monitoring Services + +Once deployed with monitoring, you can access: + +- **Prometheus**: `http://${HOST_IP}:9090` +- **Grafana**: `http://${HOST_IP}:3000` (username: `admin`, password: `admin`) +- **Node Exporter**: `http://${HOST_IP}:9100` + ## Benchmarking Guides for evaluating the performance and accuracy of this CodeGen deployment are available: diff --git a/CodeGen/docker_compose/intel/cpu/xeon/README.md b/CodeGen/docker_compose/intel/cpu/xeon/README.md index f8cb1e03ff..6685553fa3 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/README.md +++ b/CodeGen/docker_compose/intel/cpu/xeon/README.md @@ -252,7 +252,62 @@ Users can interact with the backend service using the `Neural Copilot` VS Code e - **"Container name is in use"**: Stop existing containers (`docker compose down`) or change `container_name` in the compose file. - **Resource Issues:** CodeGen models can be memory-intensive. Monitor host RAM usage. Increase Docker resources if needed. -## Stopping the Application +## Monitoring Deployment + +To enable monitoring for the CodeGen application, you can use the monitoring Docker Compose file along with the main deployment. + +#### Option #1: Default Deployment (without monitoring) + +To deploy the CodeGen services without monitoring, execute: + +```bash +docker compose up -d +``` + +#### Option #2: Deployment with Monitoring + +> NOTE: To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. + +To deploy with monitoring: + +```bash +docker compose -f compose.yaml -f compose.monitoring.yaml up -d +``` + +### Accessing Monitoring Services + +Once deployed with monitoring, you can access: + +- **Prometheus**: `http://${HOST_IP}:9090` +- **Grafana**: `http://${HOST_IP}:3000` (username: `admin`, password: `admin`) +- **Node Exporter**: `http://${HOST_IP}:9100` + +### Monitoring Components + +The monitoring stack includes: + +- **Prometheus**: For metrics collection and querying +- **Grafana**: For visualization and dashboards +- **Node Exporter**: For system metrics collection + +### Monitoring Dashboards + +The following dashboards are automatically downloaded and configured: + +- vLLM Dashboard +- TGI Dashboard +- CodeGen MegaService Dashboard +- Node Exporter Dashboard + +### Stopping the Application + +If monitoring is enabled, execute the following command: + +```bash +docker compose -f compose.yaml -f compose.monitoring.yaml down +``` + +If monitoring is not enabled, execute: ```bash docker compose down # for vLLM (compose.yaml) diff --git a/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml b/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml new file mode 100644 index 0000000000..dab7193494 --- /dev/null +++ b/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml @@ -0,0 +1,58 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +services: + prometheus: + image: prom/prometheus:v2.52.0 + container_name: opea_prometheus + user: root + volumes: + - ./prometheus.yaml:/etc/prometheus/prometheus.yaml + - ./prometheus_data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yaml' + ports: + - '9090:9090' + ipc: host + restart: unless-stopped + + grafana: + image: grafana/grafana:11.0.0 + container_name: grafana + volumes: + - ./grafana_data:/var/lib/grafana + - ./grafana/dashboards:/var/lib/grafana/dashboards + - ./grafana/provisioning:/etc/grafana/provisioning + user: root + environment: + GF_SECURITY_ADMIN_PASSWORD: admin + GF_RENDERING_CALLBACK_URL: http://grafana:3000/ + GF_LOG_FILTERS: rendering:debug + no_proxy: ${no_proxy} + host_ip: ${host_ip} + depends_on: + - prometheus + ports: + - '3000:3000' + ipc: host + restart: unless-stopped + + node-exporter: + image: prom/node-exporter + container_name: node-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + command: + - '--path.procfs=/host/proc' + - '--path.sysfs=/host/sys' + - --collector.filesystem.ignored-mount-points + - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" + environment: + no_proxy: ${no_proxy} + ports: + - 9100:9100 + restart: always + deploy: + mode: global \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh new file mode 100644 index 0000000000..d516de37af --- /dev/null +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +if ls *.json 1> /dev/null 2>&1; then + rm *.json +fi + +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/vllm_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codegen_megaservice_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml new file mode 100644 index 0000000000..a4250f3cdf --- /dev/null +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml @@ -0,0 +1,14 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: 1 + +providers: +- name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards + options: + path: /var/lib/grafana/dashboards \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml new file mode 100644 index 0000000000..5ba524d49e --- /dev/null +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml @@ -0,0 +1,54 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: Prometheus + orgId: 1 + +# list of datasources to insert/update depending +# what's available in the database +datasources: + # name of the datasource. Required +- name: Prometheus + # datasource type. Required + type: prometheus + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://$host_ip:9090 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: false + # basic auth username, if used + basicAuthUser: + # basic auth password, if used + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: true + # fields that will be converted to json and stored in json_data + jsonData: + httpMethod: GET + graphiteVersion: "1.1" + tlsAuth: false + tlsAuthWithCACert: false + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: true \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml b/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml new file mode 100644 index 0000000000..ed45deee4f --- /dev/null +++ b/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml @@ -0,0 +1,27 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# [IP_ADDR]:{PORT_OUTSIDE_CONTAINER} -> {PORT_INSIDE_CONTAINER} / {PROTOCOL} +global: + scrape_interval: 5s + external_labels: + monitor: "my-monitor" +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["opea_prometheus:9090"] + - job_name: "vllm" + metrics_path: /metrics + static_configs: + - targets: ["vllm-server:80"] + - job_name: "tgi" + metrics_path: /metrics + static_configs: + - targets: [ "tgi-service:80" ] + - job_name: "codegen-backend-server" + metrics_path: /metrics + static_configs: + - targets: ["codegen-xeon-backend-server:7778"] + - job_name: "prometheus-node-exporter" + metrics_path: /metrics + static_configs: + - targets: ["node-exporter:9100"] \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/README.md b/CodeGen/docker_compose/intel/hpu/gaudi/README.md index 0f1e438cf8..bd33f9f48e 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeGen/docker_compose/intel/hpu/gaudi/README.md @@ -228,7 +228,62 @@ Use the `Neural Copilot` extension configured with the CodeGen backend URL: `htt - **Model Download Issues:** Check `HF_TOKEN`, internet access, proxy settings. Check LLM service logs. - **Connection Errors:** Verify `HOST_IP`, ports, and proxy settings. Use `docker ps` and check service logs. -## Stopping the Application +## Monitoring Deployment + +To enable monitoring for the CodeGen application on Gaudi, you can use the monitoring Docker Compose file along with the main deployment. + +#### Option #1: Default Deployment (without monitoring) + +To deploy the CodeGen services without monitoring, execute: + +```bash +docker compose up -d +``` + +#### Option #2: Deployment with Monitoring + +> NOTE: To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. + +To deploy with monitoring: + +```bash +docker compose -f compose.yaml -f compose.monitoring.yaml up -d +``` + +### Accessing Monitoring Services + +Once deployed with monitoring, you can access: + +- **Prometheus**: `http://${HOST_IP}:9090` +- **Grafana**: `http://${HOST_IP}:3000` (username: `admin`, password: `admin`) +- **Node Exporter**: `http://${HOST_IP}:9100` + +### Monitoring Components + +The monitoring stack includes: + +- **Prometheus**: For metrics collection and querying +- **Grafana**: For visualization and dashboards +- **Node Exporter**: For system metrics collection + +### Monitoring Dashboards + +The following dashboards are automatically downloaded and configured: + +- vLLM Dashboard +- TGI Dashboard +- CodeGen MegaService Dashboard +- Node Exporter Dashboard + +### Stopping the Application + +If monitoring is enabled, execute the following command: + +```bash +docker compose -f compose.yaml -f compose.monitoring.yaml down +``` + +If monitoring is not enabled, execute: ```bash docker compose down # for vLLM (compose.yaml) diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml b/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml new file mode 100644 index 0000000000..c5df491379 --- /dev/null +++ b/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml @@ -0,0 +1,73 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +services: + prometheus: + image: prom/prometheus:v2.52.0 + container_name: opea_prometheus + user: root + volumes: + - ./prometheus.yaml:/etc/prometheus/prometheus.yaml + - ./prometheus_data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yaml' + ports: + - '9090:9090' + ipc: host + restart: unless-stopped + + grafana: + image: grafana/grafana:11.0.0 + container_name: grafana + volumes: + - ./grafana_data:/var/lib/grafana + - ./grafana/dashboards:/var/lib/grafana/dashboards + - ./grafana/provisioning:/etc/grafana/provisioning + user: root + environment: + GF_SECURITY_ADMIN_PASSWORD: admin + GF_RENDERING_CALLBACK_URL: http://grafana:3000/ + GF_LOG_FILTERS: rendering:debug + no_proxy: ${no_proxy} + host_ip: ${host_ip} + depends_on: + - prometheus + ports: + - '3000:3000' + ipc: host + restart: unless-stopped + + node-exporter: + image: prom/node-exporter + container_name: node-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + command: + - '--path.procfs=/host/proc' + - '--path.sysfs=/host/sys' + - --collector.filesystem.ignored-mount-points + - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" + environment: + no_proxy: ${no_proxy} + ports: + - 9100:9100 + restart: always + deploy: + mode: global + + gaudi-metrics-exporter: + image: vault.habana.ai/gaudi-metric-exporter/metric-exporter:latest + privileged: true + container_name: gaudi-metrics-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + - /dev:/dev + deploy: + mode: global + ports: + - 41611:41611 + restart: unless-stopped \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh new file mode 100644 index 0000000000..ac9edd48b6 --- /dev/null +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +if ls *.json 1> /dev/null 2>&1; then + rm *.json +fi + +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/vllm_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codegen_megaservice_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/gaudi_grafana_v2.json diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml new file mode 100644 index 0000000000..a4250f3cdf --- /dev/null +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml @@ -0,0 +1,14 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: 1 + +providers: +- name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards + options: + path: /var/lib/grafana/dashboards \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml new file mode 100644 index 0000000000..5ba524d49e --- /dev/null +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml @@ -0,0 +1,54 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: Prometheus + orgId: 1 + +# list of datasources to insert/update depending +# what's available in the database +datasources: + # name of the datasource. Required +- name: Prometheus + # datasource type. Required + type: prometheus + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://$host_ip:9090 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: false + # basic auth username, if used + basicAuthUser: + # basic auth password, if used + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: true + # fields that will be converted to json and stored in json_data + jsonData: + httpMethod: GET + graphiteVersion: "1.1" + tlsAuth: false + tlsAuthWithCACert: false + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: true \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml b/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml new file mode 100644 index 0000000000..c153724bc1 --- /dev/null +++ b/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml @@ -0,0 +1,32 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# [IP_ADDR]:{PORT_OUTSIDE_CONTAINER} -> {PORT_INSIDE_CONTAINER} / {PROTOCOL} +global: + scrape_interval: 5s + external_labels: + monitor: "my-monitor" +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["opea_prometheus:9090"] + - job_name: "vllm" + metrics_path: /metrics + static_configs: + - targets: ["codegen-vllm-gaudi-server:80"] + - job_name: "tgi" + metrics_path: /metrics + static_configs: + - targets: ["codegen-tgi-gaudi-server:80"] + - job_name: "codegen-backend-server" + metrics_path: /metrics + static_configs: + - targets: ["codegen-gaudi-backend-server:7778"] + - job_name: "prometheus-node-exporter" + metrics_path: /metrics + static_configs: + - targets: ["node-exporter:9100"] + - job_name: "gaudi-metrics-exporter" + scrape_interval: 30s + metrics_path: /metrics + static_configs: + - targets: [ "gaudi-metrics-exporter:41611" ] \ No newline at end of file diff --git a/CodeGen/docker_compose/intel/set_env.sh b/CodeGen/docker_compose/intel/set_env.sh index 543e9fee88..63f59574ba 100644 --- a/CodeGen/docker_compose/intel/set_env.sh +++ b/CodeGen/docker_compose/intel/set_env.sh @@ -51,3 +51,13 @@ export DATAPREP_ENDPOINT="http://${HOST_IP}:${DATAPREP_REDIS_PORT}/v1/dataprep" export LOGFLAG=false export MODEL_CACHE=${model_cache:-"./data"} export NUM_CARDS=1 + +# Download Grafana configurations +pushd "${SCRIPT_DIR}/cpu/xeon/grafana/dashboards" > /dev/null +source download_opea_dashboard.sh +popd > /dev/null + +# Set network proxy settings +export no_proxy="${no_proxy},${HOST_IP},vllm-server,codegen-xeon-backend-server,codegen-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" +export http_proxy=$http_proxy +export https_proxy=$https_proxy diff --git a/CodeGen/tests/test_compose_on_gaudi.sh b/CodeGen/tests/test_compose_on_gaudi.sh index 25cf3a945d..5401a1ebfd 100644 --- a/CodeGen/tests/test_compose_on_gaudi.sh +++ b/CodeGen/tests/test_compose_on_gaudi.sh @@ -14,7 +14,7 @@ export MODEL_CACHE=${model_cache:-"./data"} WORKPATH=$(dirname "$PWD") LOG_PATH="$WORKPATH/tests" ip_address=$(hostname -I | awk '{print $1}') -source $WORKPATH/docker_compose/intel/set_env.sh +source $WORKPATH/docker_compose/intel/hpu/gaudi/set_env.sh function build_docker_images() { opea_branch=${opea_branch:-"main"} @@ -39,7 +39,7 @@ function start_services() { cd $WORKPATH/docker_compose/intel/hpu/gaudi # Start Docker Containers - docker compose -f ${compose_file} up -d | tee ${LOG_PATH}/start_services_with_compose.log + docker compose -f ${compose_file} -f compose.monitoring.yaml up -d | tee ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do @@ -150,7 +150,7 @@ function stop_docker() { local compose_file="$1" cd $WORKPATH/docker_compose/intel/hpu/gaudi - docker compose -f ${compose_file} down + docker compose -f ${compose_file} -f compose.monitoring.yaml down } function main() { diff --git a/CodeGen/tests/test_compose_on_xeon.sh b/CodeGen/tests/test_compose_on_xeon.sh index 9effe97a4a..f5cf3dab77 100644 --- a/CodeGen/tests/test_compose_on_xeon.sh +++ b/CodeGen/tests/test_compose_on_xeon.sh @@ -42,7 +42,7 @@ function start_services() { cd $WORKPATH/docker_compose/intel/cpu/xeon/ # Start Docker Containers - docker compose -f ${compose_file} up -d > ${LOG_PATH}/start_services_with_compose.log + docker compose -f ${compose_file} -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do @@ -161,7 +161,7 @@ function stop_docker() { local compose_file="$1" cd $WORKPATH/docker_compose/intel/cpu/xeon/ - docker compose -f ${compose_file} down + docker compose -f ${compose_file} -f compose.monitoring.yaml down } function main() { From cd38ab087b75cdfeaada36e01f55d640946c0628 Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 10:13:01 +0800 Subject: [PATCH 02/11] Add monitoring for CodeTrans deployed by Docker compose. Signed-off-by: Yao, Qing --- .../docker_compose/intel/cpu/xeon/README.md | 30 ++++++-- .../intel/cpu/xeon/compose.monitoring.yaml | 58 ++++++++++++++ .../dashboards/download_opea_dashboard.sh | 11 +++ .../provisioning/dashboards/local.yaml | 14 ++++ .../provisioning/datasources/datasource.yml | 54 +++++++++++++ .../intel/cpu/xeon/prometheus.yaml | 23 ++++++ .../docker_compose/intel/hpu/gaudi/README.md | 19 +++++ .../intel/hpu/gaudi/compose.monitoring.yaml | 75 +++++++++++++++++++ .../dashboards/download_opea_dashboard.sh | 12 +++ .../provisioning/dashboards/local.yaml | 14 ++++ .../provisioning/datasources/datasource.yml | 54 +++++++++++++ .../intel/hpu/gaudi/prometheus.yaml | 30 ++++++++ CodeTrans/tests/test_compose_on_gaudi.sh | 4 +- CodeTrans/tests/test_compose_on_xeon.sh | 4 +- CodeTrans/tests/test_compose_tgi_on_gaudi.sh | 4 +- CodeTrans/tests/test_compose_tgi_on_xeon.sh | 4 +- 16 files changed, 397 insertions(+), 13 deletions(-) create mode 100644 CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml create mode 100644 CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh create mode 100644 CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml create mode 100644 CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml create mode 100644 CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml create mode 100644 CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml create mode 100644 CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh create mode 100644 CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml create mode 100644 CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml create mode 100644 CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/README.md b/CodeTrans/docker_compose/intel/cpu/xeon/README.md index 131f03a999..3348d2e6b3 100755 --- a/CodeTrans/docker_compose/intel/cpu/xeon/README.md +++ b/CodeTrans/docker_compose/intel/cpu/xeon/README.md @@ -54,6 +54,8 @@ Consult the section on [CodeTrans Service configuration](#codetrans-configuratio ### Deploy the Services Using Docker Compose +#### Option #1 + To deploy the CodeTrans services, execute the `docker compose up` command with the appropriate arguments. For a default deployment, execute the command below. It uses the 'compose.yaml' file. ```bash @@ -61,6 +63,16 @@ cd cpu/xeon docker compose -f compose.yaml up -d ``` +#### Option #2 +> NOTE : To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. + +To deploy with monitoring: + +```bash +cd cpu/xeon/ +docker compose -f compose.yaml -f compose.monitoring.yaml up -d +``` + > **Note**: developers should build docker image from source when: > > - Developing off the git main branch (as the container's ports in the repo may be different > from the published docker image). @@ -117,6 +129,13 @@ To stop the containers associated with the deployment, execute the following com docker compose -f compose.yaml down ``` +If monitoring is enabled, execute the following command: + +```bash +cd cpu/xeon/ +docker compose -f compose.yaml -f compose.monitoring.yaml down +``` + ## Configuration Parameters Key parameters are configured via environment variables set before running `docker compose up`. @@ -137,11 +156,12 @@ Key parameters are configured via environment variables set before running `dock In the context of deploying a CodeTrans pipeline on an Intel® Xeon® platform, we can pick and choose different large language model serving frameworks. The table below outlines the various configurations that are available as part of the application. These configurations can be used as templates and can be extended to different components available in [GenAIComps](https://github.com/opea-project/GenAIComps.git). -| File | Description | -| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [compose.yaml](./compose.yaml) | Default compose file using vllm as serving framework and redis as vector database. | -| [compose_tgi.yaml](./compose_tgi.yaml) | The LLM serving framework is TGI. All other configurations remain the same as the default. | -| [compose_remote.yaml](./compose_remote.yaml) | The LLM used is hosted on a remote server and an endpoint is used to access this model. vLLM is the serving framework. Additional environment variables need to be set before running. See [instructions](#running-llm-models-with-remote-endpoints) below. | +| File | Description | +| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [compose.yaml](./compose.yaml) | Default compose file using vllm as serving framework and redis as vector database. | +| [compose_tgi.yaml](./compose_tgi.yaml) | The LLM serving framework is TGI. All other configurations remain the same as the default. | +| [compose_remote.yaml](./compose_remote.yaml) | The LLM used is hosted on a remote server and an endpoint is used to access this model. vLLM is the serving framework. Additional environment variables need to be set before running. See [instructions](#running-llm-models-with-remote-endpoints) below. | +| [compose.monitoring.yaml](./compose.monitoring.yaml) | Helper file for monitoring features. Can be used along with any compose files | ### Running LLM models with remote endpoints diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml b/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml new file mode 100644 index 0000000000..dab7193494 --- /dev/null +++ b/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml @@ -0,0 +1,58 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +services: + prometheus: + image: prom/prometheus:v2.52.0 + container_name: opea_prometheus + user: root + volumes: + - ./prometheus.yaml:/etc/prometheus/prometheus.yaml + - ./prometheus_data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yaml' + ports: + - '9090:9090' + ipc: host + restart: unless-stopped + + grafana: + image: grafana/grafana:11.0.0 + container_name: grafana + volumes: + - ./grafana_data:/var/lib/grafana + - ./grafana/dashboards:/var/lib/grafana/dashboards + - ./grafana/provisioning:/etc/grafana/provisioning + user: root + environment: + GF_SECURITY_ADMIN_PASSWORD: admin + GF_RENDERING_CALLBACK_URL: http://grafana:3000/ + GF_LOG_FILTERS: rendering:debug + no_proxy: ${no_proxy} + host_ip: ${host_ip} + depends_on: + - prometheus + ports: + - '3000:3000' + ipc: host + restart: unless-stopped + + node-exporter: + image: prom/node-exporter + container_name: node-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + command: + - '--path.procfs=/host/proc' + - '--path.sysfs=/host/sys' + - --collector.filesystem.ignored-mount-points + - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" + environment: + no_proxy: ${no_proxy} + ports: + - 9100:9100 + restart: always + deploy: + mode: global \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh new file mode 100644 index 0000000000..d141ef65ec --- /dev/null +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +if ls *.json 1> /dev/null 2>&1; then + rm *.json +fi + +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/vllm_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codetrans_megaservice_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml new file mode 100644 index 0000000000..a4250f3cdf --- /dev/null +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml @@ -0,0 +1,14 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: 1 + +providers: +- name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards + options: + path: /var/lib/grafana/dashboards \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml new file mode 100644 index 0000000000..5ba524d49e --- /dev/null +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml @@ -0,0 +1,54 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: Prometheus + orgId: 1 + +# list of datasources to insert/update depending +# what's available in the database +datasources: + # name of the datasource. Required +- name: Prometheus + # datasource type. Required + type: prometheus + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://$host_ip:9090 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: false + # basic auth username, if used + basicAuthUser: + # basic auth password, if used + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: true + # fields that will be converted to json and stored in json_data + jsonData: + httpMethod: GET + graphiteVersion: "1.1" + tlsAuth: false + tlsAuthWithCACert: false + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: true \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml b/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml new file mode 100644 index 0000000000..263261b3cd --- /dev/null +++ b/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml @@ -0,0 +1,23 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# [IP_ADDR]:{PORT_OUTSIDE_CONTAINER} -> {PORT_INSIDE_CONTAINER} / {PROTOCOL} +global: + scrape_interval: 5s + external_labels: + monitor: "my-monitor" +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["opea_prometheus:9090"] + - job_name: "vllm" + metrics_path: /metrics + static_configs: + - targets: ["codetrans-xeon-vllm-service:80"] + - job_name: "codetrans-backend-server" + metrics_path: /metrics + static_configs: + - targets: ["codetrans-xeon-backend-server:7777"] + - job_name: "prometheus-node-exporter" + metrics_path: /metrics + static_configs: + - targets: ["node-exporter:9100"] \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md index 2597e1aeb6..11fafd4d1a 100755 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md @@ -54,6 +54,8 @@ Consult the section on [CodeTrans Service configuration](#codetrans-configuratio ### Deploy the Services Using Docker Compose +#### Option #1 + To deploy the CodeTrans services, execute the `docker compose up` command with the appropriate arguments. For a default deployment, execute the command below. It uses the 'compose.yaml' file. ```bash @@ -61,6 +63,16 @@ cd hpu/gaudi docker compose -f compose.yaml up -d ``` +#### Option #2 +> NOTE : To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. + +To deploy with monitoring: + +```bash +cd hpu/gaudi/ +docker compose -f compose.yaml -f compose.monitoring.yaml up -d +``` + > **Note**: developers should build docker image from source when: > > - Developing off the git main branch (as the container's ports in the repo may be different > from the published docker image). @@ -117,6 +129,13 @@ To stop the containers associated with the deployment, execute the following com docker compose -f compose.yaml down ``` +If monitoring is enabled, execute the following command: + +```bash +cd hpu/gaudi/ +docker compose -f compose.yaml -f compose.monitoring.yaml down +``` + ## Configuration Parameters Key parameters are configured via environment variables set before running `docker compose up`. diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml b/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml new file mode 100644 index 0000000000..16a098ce90 --- /dev/null +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml @@ -0,0 +1,75 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +services: + prometheus: + image: prom/prometheus:v2.52.0 + container_name: opea_prometheus + user: root + volumes: + - ./prometheus.yaml:/etc/prometheus/prometheus.yaml + - ./prometheus_data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yaml' + ports: + - '9090:9090' + ipc: host + restart: unless-stopped + + grafana: + image: grafana/grafana:11.0.0 + container_name: grafana + volumes: + - ./grafana_data:/var/lib/grafana + - ./grafana/dashboards:/var/lib/grafana/dashboards + - ./grafana/provisioning:/etc/grafana/provisioning + user: root + environment: + GF_SECURITY_ADMIN_PASSWORD: admin + GF_RENDERING_CALLBACK_URL: http://grafana:3000/ + GF_LOG_FILTERS: rendering:debug + no_proxy: ${no_proxy} + host_ip: ${host_ip} + depends_on: + - prometheus + ports: + - '3000:3000' + ipc: host + restart: unless-stopped + + node-exporter: + image: prom/node-exporter + container_name: node-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + command: + - '--path.procfs=/host/proc' + - '--path.rootfs=/rootfs' + - '--path.sysfs=/host/sys' + - '--path.udev.data=/rootfs/run/udev/data' + - --collector.filesystem.ignored-mount-points + - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)" + environment: + no_proxy: ${no_proxy} + ports: + - 9100:9100 + restart: always + deploy: + mode: global + + gaudi-metrics-exporter: + image: vault.habana.ai/gaudi-metric-exporter/metric-exporter:latest + privileged: true + container_name: gaudi-metrics-exporter + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro + - /dev:/dev + deploy: + mode: global + ports: + - 41611:41611 + restart: unless-stopped \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh new file mode 100644 index 0000000000..4487be1466 --- /dev/null +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +if ls *.json 1> /dev/null 2>&1; then + rm *.json +fi + +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/vllm_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/gaudi_grafana_v2.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codetrans_megaservice_grafana.json +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml new file mode 100644 index 0000000000..a4250f3cdf --- /dev/null +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml @@ -0,0 +1,14 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: 1 + +providers: +- name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards + options: + path: /var/lib/grafana/dashboards \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml new file mode 100644 index 0000000000..5ba524d49e --- /dev/null +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml @@ -0,0 +1,54 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# config file version +apiVersion: 1 + +# list of datasources that should be deleted from the database +deleteDatasources: + - name: Prometheus + orgId: 1 + +# list of datasources to insert/update depending +# what's available in the database +datasources: + # name of the datasource. Required +- name: Prometheus + # datasource type. Required + type: prometheus + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://$host_ip:9090 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: false + # basic auth username, if used + basicAuthUser: + # basic auth password, if used + basicAuthPassword: + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: true + # fields that will be converted to json and stored in json_data + jsonData: + httpMethod: GET + graphiteVersion: "1.1" + tlsAuth: false + tlsAuthWithCACert: false + # json object of data that will be encrypted. + secureJsonData: + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: true \ No newline at end of file diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml b/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml new file mode 100644 index 0000000000..887b511260 --- /dev/null +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml @@ -0,0 +1,30 @@ +# Copyright (C) 2025 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# [IP_ADDR]:{PORT_OUTSIDE_CONTAINER} -> {PORT_INSIDE_CONTAINER} / {PROTOCOL} +global: + scrape_interval: 5s + external_labels: + monitor: "my-monitor" +scrape_configs: + - job_name: "prometheus" + static_configs: + - targets: ["opea_prometheus:9090"] + - job_name: "vllm" + metrics_path: /metrics + static_configs: + - targets: ["codetrans-gaudi-vllm-service:80"] + - job_name: "codetrans-backend-server" + metrics_path: /metrics + static_configs: + - targets: ["codetrans-gaudi-backend-server:7777"] + - job_name: "prometheus-node-exporter" + scrape_interval: 30s + scrape_timeout: 25s + metrics_path: /metrics + static_configs: + - targets: ["node-exporter:9100"] + - job_name: "gaudi-metrics-exporter" + scrape_interval: 30s + metrics_path: /metrics + static_configs: + - targets: ["gaudi-metrics-exporter:41611"] \ No newline at end of file diff --git a/CodeTrans/tests/test_compose_on_gaudi.sh b/CodeTrans/tests/test_compose_on_gaudi.sh index ad5f9da9fc..a66dc2f3d0 100644 --- a/CodeTrans/tests/test_compose_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_on_gaudi.sh @@ -43,7 +43,7 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers - docker compose up -d > ${LOG_PATH}/start_services_with_compose.log + docker compose up -f compose.yaml -f compose.monitoring.yaml -d > ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do @@ -117,7 +117,7 @@ function validate_megaservice() { function stop_docker() { cd $WORKPATH/docker_compose/intel/hpu/gaudi - docker compose -f compose.yaml stop && docker compose rm -f + docker compose -f compose.yaml -f compose.monitoring.yaml stop && docker compose rm -f } function main() { diff --git a/CodeTrans/tests/test_compose_on_xeon.sh b/CodeTrans/tests/test_compose_on_xeon.sh index 8e42d903a5..e328e141a3 100644 --- a/CodeTrans/tests/test_compose_on_xeon.sh +++ b/CodeTrans/tests/test_compose_on_xeon.sh @@ -43,7 +43,7 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers - docker compose -f compose.yaml up -d > ${LOG_PATH}/start_services_with_compose.log + docker compose -f compose.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do @@ -118,7 +118,7 @@ function validate_megaservice() { function stop_docker() { cd $WORKPATH/docker_compose/intel/cpu/xeon/ - docker compose -f compose.yaml stop && docker compose rm -f + docker compose -f compose.yaml -f compose.monitoring.yaml down } function main() { diff --git a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh index 9b4a7e2c9e..2cc000aa6b 100644 --- a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh @@ -44,7 +44,7 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers - docker compose -f compose_tgi.yaml up -d > ${LOG_PATH}/start_services_with_compose.log + docker compose -f compose_tgi.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do @@ -127,7 +127,7 @@ function validate_megaservice() { function stop_docker() { cd $WORKPATH/docker_compose/intel/hpu/gaudi/ - docker compose -f compose_tgi.yaml stop && docker compose rm -f + docker compose -f compose_tgi.yaml -f compose.monitoring.yaml stop && docker compose rm -f } function main() { diff --git a/CodeTrans/tests/test_compose_tgi_on_xeon.sh b/CodeTrans/tests/test_compose_tgi_on_xeon.sh index c66e8b4537..c7fe294271 100644 --- a/CodeTrans/tests/test_compose_tgi_on_xeon.sh +++ b/CodeTrans/tests/test_compose_tgi_on_xeon.sh @@ -44,7 +44,7 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers - docker compose -f compose_tgi.yaml up -d > ${LOG_PATH}/start_services_with_compose.log + docker compose -f compose_tgi.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do @@ -127,7 +127,7 @@ function validate_megaservice() { function stop_docker() { cd $WORKPATH/docker_compose/intel/cpu/xeon/ - docker compose -f compose_tgi.yaml stop && docker compose rm -f + docker compose -f compose_tgi.yaml -f compose.monitoring.yaml stop && docker compose rm -f } function main() { From a62657b838a70dc563ef9c283891d74a9928eabc Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 11:09:53 +0800 Subject: [PATCH 03/11] Fix set_env.sh for monitor in codegen/codetrans Signed-off-by: Yao, Qing --- CodeGen/docker_compose/intel/set_env.sh | 6 ++++++ CodeTrans/docker_compose/intel/set_env.sh | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/CodeGen/docker_compose/intel/set_env.sh b/CodeGen/docker_compose/intel/set_env.sh index 63f59574ba..9a0287c13b 100644 --- a/CodeGen/docker_compose/intel/set_env.sh +++ b/CodeGen/docker_compose/intel/set_env.sh @@ -61,3 +61,9 @@ popd > /dev/null export no_proxy="${no_proxy},${HOST_IP},vllm-server,codegen-xeon-backend-server,codegen-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" export http_proxy=$http_proxy export https_proxy=$https_proxy + + +pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null +source download_opea_dashboard.sh +popd > /dev/null + diff --git a/CodeTrans/docker_compose/intel/set_env.sh b/CodeTrans/docker_compose/intel/set_env.sh index 04c4048c52..4b9994487d 100644 --- a/CodeTrans/docker_compose/intel/set_env.sh +++ b/CodeTrans/docker_compose/intel/set_env.sh @@ -24,3 +24,13 @@ export FRONTEND_SERVICE_PORT=5173 export BACKEND_SERVICE_NAME=codetrans export BACKEND_SERVICE_IP=${host_ip} export BACKEND_SERVICE_PORT=7777 + + +# Set network proxy settings +export no_proxy="${no_proxy},${HOST_IP},vllm-server,codetrans-xeon-backend-server,codetrans-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" +export http_proxy=$http_proxy +export https_proxy=$https_proxy + +pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null +source download_opea_dashboard.sh +popd > /dev/null From 59e3ef48d826a746af159d90bed450d445ac31d5 Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 11:15:29 +0800 Subject: [PATCH 04/11] Fix erro set_env.sh path in codegen Signed-off-by: Yao, Qing --- CodeGen/tests/test_compose_on_gaudi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeGen/tests/test_compose_on_gaudi.sh b/CodeGen/tests/test_compose_on_gaudi.sh index 5401a1ebfd..1e542f8c13 100644 --- a/CodeGen/tests/test_compose_on_gaudi.sh +++ b/CodeGen/tests/test_compose_on_gaudi.sh @@ -14,7 +14,7 @@ export MODEL_CACHE=${model_cache:-"./data"} WORKPATH=$(dirname "$PWD") LOG_PATH="$WORKPATH/tests" ip_address=$(hostname -I | awk '{print $1}') -source $WORKPATH/docker_compose/intel/hpu/gaudi/set_env.sh +source $WORKPATH/docker_compose/intel/set_env.sh function build_docker_images() { opea_branch=${opea_branch:-"main"} From 84a9f9460f24a430d1bb3e426bced9f8c80d9036 Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 14:25:38 +0800 Subject: [PATCH 05/11] Fix error download_opea_dashboard.sh path in set_env.sh Signed-off-by: Yao, Qing --- CodeGen/docker_compose/intel/cpu/xeon/README.md | 6 ++++-- .../cpu/xeon/grafana/dashboards/download_opea_dashboard.sh | 2 ++ CodeGen/docker_compose/intel/hpu/gaudi/README.md | 5 ++++- .../gaudi/grafana/dashboards/download_opea_dashboard.sh | 4 ++++ CodeGen/docker_compose/intel/set_env.sh | 7 ------- CodeGen/tests/test_compose_on_gaudi.sh | 2 ++ CodeGen/tests/test_compose_on_xeon.sh | 3 +++ CodeTrans/docker_compose/intel/cpu/xeon/README.md | 4 ++++ .../cpu/xeon/grafana/dashboards/download_opea_dashboard.sh | 2 ++ CodeTrans/docker_compose/intel/hpu/gaudi/README.md | 4 ++++ .../gaudi/grafana/dashboards/download_opea_dashboard.sh | 2 ++ CodeTrans/docker_compose/intel/set_env.sh | 3 --- CodeTrans/tests/test_compose_on_gaudi.sh | 3 +++ CodeTrans/tests/test_compose_on_xeon.sh | 3 +++ CodeTrans/tests/test_compose_tgi_on_gaudi.sh | 3 +++ CodeTrans/tests/test_compose_tgi_on_xeon.sh | 3 +++ 16 files changed, 43 insertions(+), 13 deletions(-) diff --git a/CodeGen/docker_compose/intel/cpu/xeon/README.md b/CodeGen/docker_compose/intel/cpu/xeon/README.md index 6685553fa3..6150092c9e 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/README.md +++ b/CodeGen/docker_compose/intel/cpu/xeon/README.md @@ -49,7 +49,8 @@ This uses the default vLLM-based deployment using `compose.yaml`. # export https_proxy="your_https_proxy" # export no_proxy="localhost,127.0.0.1,${HOST_IP}" # Add other hosts if necessary source intel/set_env.sh - cd /intel/cpu/xeon + cd intel/cpu/xeon + bash grafana/dashboards/download_opea_dashboard.sh ``` _Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (`LLM_SERVICE_PORT`, `MEGA_SERVICE_PORT`, etc.) are set if not using defaults from the compose file._ @@ -146,7 +147,7 @@ Key parameters are configured via environment variables set before running `dock Most of these parameters are in `set_env.sh`, you can either modify this file or overwrite the env variables by setting them. ```shell -source CodeGen/docker_compose/set_env.sh +source CodeGen/docker_compose/intel/set_env.sh ``` #### Compose Files @@ -271,6 +272,7 @@ docker compose up -d To deploy with monitoring: ```bash +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index d516de37af..e403ecd24e 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,8 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/README.md b/CodeGen/docker_compose/intel/hpu/gaudi/README.md index bd33f9f48e..daa672ecae 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeGen/docker_compose/intel/hpu/gaudi/README.md @@ -49,7 +49,10 @@ This uses the default vLLM-based deployment using `compose.yaml`. # export https_proxy="your_https_proxy" # export no_proxy="localhost,127.0.0.1,${HOST_IP}" # Add other hosts if necessary source intel/set_env.sh - cd /intel/hpu/gaudi + cd intel/hpu/gaudi + cd grafana/dashboards + bash download_opea_dashboard.sh + cd ../.. ``` _Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (`LLM_SERVICE_PORT`, `MEGA_SERVICE_PORT`, etc.) are set if not using defaults from the compose file._ diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index ac9edd48b6..40f2cb12a6 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,10 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" + if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeGen/docker_compose/intel/set_env.sh b/CodeGen/docker_compose/intel/set_env.sh index 9a0287c13b..8507805f82 100644 --- a/CodeGen/docker_compose/intel/set_env.sh +++ b/CodeGen/docker_compose/intel/set_env.sh @@ -52,10 +52,6 @@ export LOGFLAG=false export MODEL_CACHE=${model_cache:-"./data"} export NUM_CARDS=1 -# Download Grafana configurations -pushd "${SCRIPT_DIR}/cpu/xeon/grafana/dashboards" > /dev/null -source download_opea_dashboard.sh -popd > /dev/null # Set network proxy settings export no_proxy="${no_proxy},${HOST_IP},vllm-server,codegen-xeon-backend-server,codegen-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" @@ -63,7 +59,4 @@ export http_proxy=$http_proxy export https_proxy=$https_proxy -pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null -source download_opea_dashboard.sh -popd > /dev/null diff --git a/CodeGen/tests/test_compose_on_gaudi.sh b/CodeGen/tests/test_compose_on_gaudi.sh index 1e542f8c13..5e6f48a75c 100644 --- a/CodeGen/tests/test_compose_on_gaudi.sh +++ b/CodeGen/tests/test_compose_on_gaudi.sh @@ -38,6 +38,8 @@ function start_services() { export no_proxy="localhost,127.0.0.1,$ip_address" cd $WORKPATH/docker_compose/intel/hpu/gaudi + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh # Start Docker Containers docker compose -f ${compose_file} -f compose.monitoring.yaml up -d | tee ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeGen/tests/test_compose_on_xeon.sh b/CodeGen/tests/test_compose_on_xeon.sh index f5cf3dab77..678108c494 100644 --- a/CodeGen/tests/test_compose_on_xeon.sh +++ b/CodeGen/tests/test_compose_on_xeon.sh @@ -41,6 +41,9 @@ function start_services() { export no_proxy="localhost,127.0.0.1,$ip_address" cd $WORKPATH/docker_compose/intel/cpu/xeon/ + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + # Start Docker Containers docker compose -f ${compose_file} -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/README.md b/CodeTrans/docker_compose/intel/cpu/xeon/README.md index 3348d2e6b3..1cb70bf3f6 100755 --- a/CodeTrans/docker_compose/intel/cpu/xeon/README.md +++ b/CodeTrans/docker_compose/intel/cpu/xeon/README.md @@ -70,6 +70,8 @@ To deploy with monitoring: ```bash cd cpu/xeon/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` @@ -133,6 +135,8 @@ If monitoring is enabled, execute the following command: ```bash cd cpu/xeon/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml down ``` diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index d141ef65ec..d0c6c905a4 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,8 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md index 11fafd4d1a..d481571162 100755 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md @@ -70,6 +70,8 @@ To deploy with monitoring: ```bash cd hpu/gaudi/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` @@ -133,6 +135,8 @@ If monitoring is enabled, execute the following command: ```bash cd hpu/gaudi/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml down ``` diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index 4487be1466..b95f64266c 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,8 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeTrans/docker_compose/intel/set_env.sh b/CodeTrans/docker_compose/intel/set_env.sh index 4b9994487d..5d06a33ec0 100644 --- a/CodeTrans/docker_compose/intel/set_env.sh +++ b/CodeTrans/docker_compose/intel/set_env.sh @@ -31,6 +31,3 @@ export no_proxy="${no_proxy},${HOST_IP},vllm-server,codetrans-xeon-backend-serve export http_proxy=$http_proxy export https_proxy=$https_proxy -pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null -source download_opea_dashboard.sh -popd > /dev/null diff --git a/CodeTrans/tests/test_compose_on_gaudi.sh b/CodeTrans/tests/test_compose_on_gaudi.sh index a66dc2f3d0..4acf628d7c 100644 --- a/CodeTrans/tests/test_compose_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_on_gaudi.sh @@ -42,6 +42,9 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + # Start Docker Containers docker compose up -f compose.yaml -f compose.monitoring.yaml -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/tests/test_compose_on_xeon.sh b/CodeTrans/tests/test_compose_on_xeon.sh index e328e141a3..bbd75208e8 100644 --- a/CodeTrans/tests/test_compose_on_xeon.sh +++ b/CodeTrans/tests/test_compose_on_xeon.sh @@ -40,6 +40,9 @@ function start_services() { source set_env.sh cd cpu/xeon/ + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers diff --git a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh index 2cc000aa6b..964f6b6f01 100644 --- a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh @@ -43,6 +43,9 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + # Start Docker Containers docker compose -f compose_tgi.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/tests/test_compose_tgi_on_xeon.sh b/CodeTrans/tests/test_compose_tgi_on_xeon.sh index c7fe294271..2957093520 100644 --- a/CodeTrans/tests/test_compose_tgi_on_xeon.sh +++ b/CodeTrans/tests/test_compose_tgi_on_xeon.sh @@ -41,6 +41,9 @@ function start_services() { source set_env.sh cd cpu/xeon/ + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers From 464fd00c14b3e9cafe9a483c484b72e24eac7c0a Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 14:26:55 +0800 Subject: [PATCH 06/11] Revert "Fix error download_opea_dashboard.sh path in set_env.sh" This reverts commit 72da3511b2cf499c0cf59272a633226139293492. Signed-off-by: Yao, Qing --- CodeGen/docker_compose/intel/cpu/xeon/README.md | 6 ++---- .../cpu/xeon/grafana/dashboards/download_opea_dashboard.sh | 2 -- CodeGen/docker_compose/intel/hpu/gaudi/README.md | 5 +---- .../gaudi/grafana/dashboards/download_opea_dashboard.sh | 4 ---- CodeGen/docker_compose/intel/set_env.sh | 7 +++++++ CodeGen/tests/test_compose_on_gaudi.sh | 2 -- CodeGen/tests/test_compose_on_xeon.sh | 3 --- CodeTrans/docker_compose/intel/cpu/xeon/README.md | 4 ---- .../cpu/xeon/grafana/dashboards/download_opea_dashboard.sh | 2 -- CodeTrans/docker_compose/intel/hpu/gaudi/README.md | 4 ---- .../gaudi/grafana/dashboards/download_opea_dashboard.sh | 2 -- CodeTrans/docker_compose/intel/set_env.sh | 3 +++ CodeTrans/tests/test_compose_on_gaudi.sh | 3 --- CodeTrans/tests/test_compose_on_xeon.sh | 3 --- CodeTrans/tests/test_compose_tgi_on_gaudi.sh | 3 --- CodeTrans/tests/test_compose_tgi_on_xeon.sh | 3 --- 16 files changed, 13 insertions(+), 43 deletions(-) diff --git a/CodeGen/docker_compose/intel/cpu/xeon/README.md b/CodeGen/docker_compose/intel/cpu/xeon/README.md index 6150092c9e..6685553fa3 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/README.md +++ b/CodeGen/docker_compose/intel/cpu/xeon/README.md @@ -49,8 +49,7 @@ This uses the default vLLM-based deployment using `compose.yaml`. # export https_proxy="your_https_proxy" # export no_proxy="localhost,127.0.0.1,${HOST_IP}" # Add other hosts if necessary source intel/set_env.sh - cd intel/cpu/xeon - bash grafana/dashboards/download_opea_dashboard.sh + cd /intel/cpu/xeon ``` _Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (`LLM_SERVICE_PORT`, `MEGA_SERVICE_PORT`, etc.) are set if not using defaults from the compose file._ @@ -147,7 +146,7 @@ Key parameters are configured via environment variables set before running `dock Most of these parameters are in `set_env.sh`, you can either modify this file or overwrite the env variables by setting them. ```shell -source CodeGen/docker_compose/intel/set_env.sh +source CodeGen/docker_compose/set_env.sh ``` #### Compose Files @@ -272,7 +271,6 @@ docker compose up -d To deploy with monitoring: ```bash -bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index e403ecd24e..d516de37af 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -1,8 +1,6 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/README.md b/CodeGen/docker_compose/intel/hpu/gaudi/README.md index daa672ecae..bd33f9f48e 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeGen/docker_compose/intel/hpu/gaudi/README.md @@ -49,10 +49,7 @@ This uses the default vLLM-based deployment using `compose.yaml`. # export https_proxy="your_https_proxy" # export no_proxy="localhost,127.0.0.1,${HOST_IP}" # Add other hosts if necessary source intel/set_env.sh - cd intel/hpu/gaudi - cd grafana/dashboards - bash download_opea_dashboard.sh - cd ../.. + cd /intel/hpu/gaudi ``` _Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (`LLM_SERVICE_PORT`, `MEGA_SERVICE_PORT`, etc.) are set if not using defaults from the compose file._ diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index 40f2cb12a6..ac9edd48b6 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -1,10 +1,6 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -cd "$SCRIPT_DIR" - if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeGen/docker_compose/intel/set_env.sh b/CodeGen/docker_compose/intel/set_env.sh index 8507805f82..9a0287c13b 100644 --- a/CodeGen/docker_compose/intel/set_env.sh +++ b/CodeGen/docker_compose/intel/set_env.sh @@ -52,6 +52,10 @@ export LOGFLAG=false export MODEL_CACHE=${model_cache:-"./data"} export NUM_CARDS=1 +# Download Grafana configurations +pushd "${SCRIPT_DIR}/cpu/xeon/grafana/dashboards" > /dev/null +source download_opea_dashboard.sh +popd > /dev/null # Set network proxy settings export no_proxy="${no_proxy},${HOST_IP},vllm-server,codegen-xeon-backend-server,codegen-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" @@ -59,4 +63,7 @@ export http_proxy=$http_proxy export https_proxy=$https_proxy +pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null +source download_opea_dashboard.sh +popd > /dev/null diff --git a/CodeGen/tests/test_compose_on_gaudi.sh b/CodeGen/tests/test_compose_on_gaudi.sh index 5e6f48a75c..1e542f8c13 100644 --- a/CodeGen/tests/test_compose_on_gaudi.sh +++ b/CodeGen/tests/test_compose_on_gaudi.sh @@ -38,8 +38,6 @@ function start_services() { export no_proxy="localhost,127.0.0.1,$ip_address" cd $WORKPATH/docker_compose/intel/hpu/gaudi - # download grafana dashboard - bash grafana/dashboards/download_opea_dashboard.sh # Start Docker Containers docker compose -f ${compose_file} -f compose.monitoring.yaml up -d | tee ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeGen/tests/test_compose_on_xeon.sh b/CodeGen/tests/test_compose_on_xeon.sh index 678108c494..f5cf3dab77 100644 --- a/CodeGen/tests/test_compose_on_xeon.sh +++ b/CodeGen/tests/test_compose_on_xeon.sh @@ -41,9 +41,6 @@ function start_services() { export no_proxy="localhost,127.0.0.1,$ip_address" cd $WORKPATH/docker_compose/intel/cpu/xeon/ - # download grafana dashboard - bash grafana/dashboards/download_opea_dashboard.sh - # Start Docker Containers docker compose -f ${compose_file} -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/README.md b/CodeTrans/docker_compose/intel/cpu/xeon/README.md index 1cb70bf3f6..3348d2e6b3 100755 --- a/CodeTrans/docker_compose/intel/cpu/xeon/README.md +++ b/CodeTrans/docker_compose/intel/cpu/xeon/README.md @@ -70,8 +70,6 @@ To deploy with monitoring: ```bash cd cpu/xeon/ -# download grafana dashboard -bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` @@ -135,8 +133,6 @@ If monitoring is enabled, execute the following command: ```bash cd cpu/xeon/ -# download grafana dashboard -bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml down ``` diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index d0c6c905a4..d141ef65ec 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -1,8 +1,6 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md index d481571162..11fafd4d1a 100755 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md @@ -70,8 +70,6 @@ To deploy with monitoring: ```bash cd hpu/gaudi/ -# download grafana dashboard -bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` @@ -135,8 +133,6 @@ If monitoring is enabled, execute the following command: ```bash cd hpu/gaudi/ -# download grafana dashboard -bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml down ``` diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index b95f64266c..4487be1466 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -1,8 +1,6 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeTrans/docker_compose/intel/set_env.sh b/CodeTrans/docker_compose/intel/set_env.sh index 5d06a33ec0..4b9994487d 100644 --- a/CodeTrans/docker_compose/intel/set_env.sh +++ b/CodeTrans/docker_compose/intel/set_env.sh @@ -31,3 +31,6 @@ export no_proxy="${no_proxy},${HOST_IP},vllm-server,codetrans-xeon-backend-serve export http_proxy=$http_proxy export https_proxy=$https_proxy +pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null +source download_opea_dashboard.sh +popd > /dev/null diff --git a/CodeTrans/tests/test_compose_on_gaudi.sh b/CodeTrans/tests/test_compose_on_gaudi.sh index 4acf628d7c..a66dc2f3d0 100644 --- a/CodeTrans/tests/test_compose_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_on_gaudi.sh @@ -42,9 +42,6 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env - # download grafana dashboard - bash grafana/dashboards/download_opea_dashboard.sh - # Start Docker Containers docker compose up -f compose.yaml -f compose.monitoring.yaml -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/tests/test_compose_on_xeon.sh b/CodeTrans/tests/test_compose_on_xeon.sh index bbd75208e8..e328e141a3 100644 --- a/CodeTrans/tests/test_compose_on_xeon.sh +++ b/CodeTrans/tests/test_compose_on_xeon.sh @@ -40,9 +40,6 @@ function start_services() { source set_env.sh cd cpu/xeon/ - # download grafana dashboard - bash grafana/dashboards/download_opea_dashboard.sh - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers diff --git a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh index 964f6b6f01..2cc000aa6b 100644 --- a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh @@ -43,9 +43,6 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env - # download grafana dashboard - bash grafana/dashboards/download_opea_dashboard.sh - # Start Docker Containers docker compose -f compose_tgi.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/tests/test_compose_tgi_on_xeon.sh b/CodeTrans/tests/test_compose_tgi_on_xeon.sh index 2957093520..c7fe294271 100644 --- a/CodeTrans/tests/test_compose_tgi_on_xeon.sh +++ b/CodeTrans/tests/test_compose_tgi_on_xeon.sh @@ -41,9 +41,6 @@ function start_services() { source set_env.sh cd cpu/xeon/ - # download grafana dashboard - bash grafana/dashboards/download_opea_dashboard.sh - sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers From 19c5f8a1210b16843a9b439b907e03d4a3afacca Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 14:25:38 +0800 Subject: [PATCH 07/11] Fix error download_opea_dashboard.sh path in set_env.sh Signed-off-by: Yao, Qing --- CodeGen/docker_compose/intel/cpu/xeon/README.md | 6 ++++-- .../cpu/xeon/grafana/dashboards/download_opea_dashboard.sh | 2 ++ CodeGen/docker_compose/intel/hpu/gaudi/README.md | 5 ++++- .../gaudi/grafana/dashboards/download_opea_dashboard.sh | 4 ++++ CodeGen/docker_compose/intel/set_env.sh | 7 ------- CodeGen/tests/test_compose_on_gaudi.sh | 2 ++ CodeGen/tests/test_compose_on_xeon.sh | 3 +++ CodeTrans/docker_compose/intel/cpu/xeon/README.md | 4 ++++ .../cpu/xeon/grafana/dashboards/download_opea_dashboard.sh | 2 ++ CodeTrans/docker_compose/intel/hpu/gaudi/README.md | 4 ++++ .../gaudi/grafana/dashboards/download_opea_dashboard.sh | 2 ++ CodeTrans/docker_compose/intel/set_env.sh | 3 --- CodeTrans/tests/test_compose_on_gaudi.sh | 3 +++ CodeTrans/tests/test_compose_on_xeon.sh | 3 +++ CodeTrans/tests/test_compose_tgi_on_gaudi.sh | 3 +++ CodeTrans/tests/test_compose_tgi_on_xeon.sh | 3 +++ 16 files changed, 43 insertions(+), 13 deletions(-) diff --git a/CodeGen/docker_compose/intel/cpu/xeon/README.md b/CodeGen/docker_compose/intel/cpu/xeon/README.md index 6685553fa3..6150092c9e 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/README.md +++ b/CodeGen/docker_compose/intel/cpu/xeon/README.md @@ -49,7 +49,8 @@ This uses the default vLLM-based deployment using `compose.yaml`. # export https_proxy="your_https_proxy" # export no_proxy="localhost,127.0.0.1,${HOST_IP}" # Add other hosts if necessary source intel/set_env.sh - cd /intel/cpu/xeon + cd intel/cpu/xeon + bash grafana/dashboards/download_opea_dashboard.sh ``` _Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (`LLM_SERVICE_PORT`, `MEGA_SERVICE_PORT`, etc.) are set if not using defaults from the compose file._ @@ -146,7 +147,7 @@ Key parameters are configured via environment variables set before running `dock Most of these parameters are in `set_env.sh`, you can either modify this file or overwrite the env variables by setting them. ```shell -source CodeGen/docker_compose/set_env.sh +source CodeGen/docker_compose/intel/set_env.sh ``` #### Compose Files @@ -271,6 +272,7 @@ docker compose up -d To deploy with monitoring: ```bash +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index d516de37af..e403ecd24e 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,8 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/README.md b/CodeGen/docker_compose/intel/hpu/gaudi/README.md index bd33f9f48e..daa672ecae 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeGen/docker_compose/intel/hpu/gaudi/README.md @@ -49,7 +49,10 @@ This uses the default vLLM-based deployment using `compose.yaml`. # export https_proxy="your_https_proxy" # export no_proxy="localhost,127.0.0.1,${HOST_IP}" # Add other hosts if necessary source intel/set_env.sh - cd /intel/hpu/gaudi + cd intel/hpu/gaudi + cd grafana/dashboards + bash download_opea_dashboard.sh + cd ../.. ``` _Note: The compose file might read additional variables from set_env.sh. Ensure all required variables like ports (`LLM_SERVICE_PORT`, `MEGA_SERVICE_PORT`, etc.) are set if not using defaults from the compose file._ diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index ac9edd48b6..40f2cb12a6 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,10 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" + if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeGen/docker_compose/intel/set_env.sh b/CodeGen/docker_compose/intel/set_env.sh index 9a0287c13b..8507805f82 100644 --- a/CodeGen/docker_compose/intel/set_env.sh +++ b/CodeGen/docker_compose/intel/set_env.sh @@ -52,10 +52,6 @@ export LOGFLAG=false export MODEL_CACHE=${model_cache:-"./data"} export NUM_CARDS=1 -# Download Grafana configurations -pushd "${SCRIPT_DIR}/cpu/xeon/grafana/dashboards" > /dev/null -source download_opea_dashboard.sh -popd > /dev/null # Set network proxy settings export no_proxy="${no_proxy},${HOST_IP},vllm-server,codegen-xeon-backend-server,codegen-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" @@ -63,7 +59,4 @@ export http_proxy=$http_proxy export https_proxy=$https_proxy -pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null -source download_opea_dashboard.sh -popd > /dev/null diff --git a/CodeGen/tests/test_compose_on_gaudi.sh b/CodeGen/tests/test_compose_on_gaudi.sh index 1e542f8c13..5e6f48a75c 100644 --- a/CodeGen/tests/test_compose_on_gaudi.sh +++ b/CodeGen/tests/test_compose_on_gaudi.sh @@ -38,6 +38,8 @@ function start_services() { export no_proxy="localhost,127.0.0.1,$ip_address" cd $WORKPATH/docker_compose/intel/hpu/gaudi + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh # Start Docker Containers docker compose -f ${compose_file} -f compose.monitoring.yaml up -d | tee ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeGen/tests/test_compose_on_xeon.sh b/CodeGen/tests/test_compose_on_xeon.sh index f5cf3dab77..678108c494 100644 --- a/CodeGen/tests/test_compose_on_xeon.sh +++ b/CodeGen/tests/test_compose_on_xeon.sh @@ -41,6 +41,9 @@ function start_services() { export no_proxy="localhost,127.0.0.1,$ip_address" cd $WORKPATH/docker_compose/intel/cpu/xeon/ + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + # Start Docker Containers docker compose -f ${compose_file} -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/README.md b/CodeTrans/docker_compose/intel/cpu/xeon/README.md index 3348d2e6b3..1cb70bf3f6 100755 --- a/CodeTrans/docker_compose/intel/cpu/xeon/README.md +++ b/CodeTrans/docker_compose/intel/cpu/xeon/README.md @@ -70,6 +70,8 @@ To deploy with monitoring: ```bash cd cpu/xeon/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` @@ -133,6 +135,8 @@ If monitoring is enabled, execute the following command: ```bash cd cpu/xeon/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml down ``` diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index d141ef65ec..d0c6c905a4 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,8 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md index 11fafd4d1a..d481571162 100755 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md @@ -70,6 +70,8 @@ To deploy with monitoring: ```bash cd hpu/gaudi/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml up -d ``` @@ -133,6 +135,8 @@ If monitoring is enabled, execute the following command: ```bash cd hpu/gaudi/ +# download grafana dashboard +bash grafana/dashboards/download_opea_dashboard.sh docker compose -f compose.yaml -f compose.monitoring.yaml down ``` diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index 4487be1466..b95f64266c 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -1,6 +1,8 @@ #!/bin/bash # Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$SCRIPT_DIR" if ls *.json 1> /dev/null 2>&1; then rm *.json fi diff --git a/CodeTrans/docker_compose/intel/set_env.sh b/CodeTrans/docker_compose/intel/set_env.sh index 4b9994487d..5d06a33ec0 100644 --- a/CodeTrans/docker_compose/intel/set_env.sh +++ b/CodeTrans/docker_compose/intel/set_env.sh @@ -31,6 +31,3 @@ export no_proxy="${no_proxy},${HOST_IP},vllm-server,codetrans-xeon-backend-serve export http_proxy=$http_proxy export https_proxy=$https_proxy -pushd "${SCRIPT_DIR}/grafana/dashboards" > /dev/null -source download_opea_dashboard.sh -popd > /dev/null diff --git a/CodeTrans/tests/test_compose_on_gaudi.sh b/CodeTrans/tests/test_compose_on_gaudi.sh index a66dc2f3d0..4acf628d7c 100644 --- a/CodeTrans/tests/test_compose_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_on_gaudi.sh @@ -42,6 +42,9 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + # Start Docker Containers docker compose up -f compose.yaml -f compose.monitoring.yaml -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/tests/test_compose_on_xeon.sh b/CodeTrans/tests/test_compose_on_xeon.sh index e328e141a3..bbd75208e8 100644 --- a/CodeTrans/tests/test_compose_on_xeon.sh +++ b/CodeTrans/tests/test_compose_on_xeon.sh @@ -40,6 +40,9 @@ function start_services() { source set_env.sh cd cpu/xeon/ + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers diff --git a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh index 2cc000aa6b..964f6b6f01 100644 --- a/CodeTrans/tests/test_compose_tgi_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_tgi_on_gaudi.sh @@ -43,6 +43,9 @@ function start_services() { sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + # Start Docker Containers docker compose -f compose_tgi.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log diff --git a/CodeTrans/tests/test_compose_tgi_on_xeon.sh b/CodeTrans/tests/test_compose_tgi_on_xeon.sh index c7fe294271..2957093520 100644 --- a/CodeTrans/tests/test_compose_tgi_on_xeon.sh +++ b/CodeTrans/tests/test_compose_tgi_on_xeon.sh @@ -41,6 +41,9 @@ function start_services() { source set_env.sh cd cpu/xeon/ + # download grafana dashboard + bash grafana/dashboards/download_opea_dashboard.sh + sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env # Start Docker Containers From 3e16a2d59fe38db19b887863c4c4655fc09332ca Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 15:28:54 +0800 Subject: [PATCH 08/11] Small fix Signed-off-by: Yao, Qing --- CodeTrans/tests/test_compose_on_gaudi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeTrans/tests/test_compose_on_gaudi.sh b/CodeTrans/tests/test_compose_on_gaudi.sh index 4acf628d7c..edfca863d7 100644 --- a/CodeTrans/tests/test_compose_on_gaudi.sh +++ b/CodeTrans/tests/test_compose_on_gaudi.sh @@ -46,7 +46,7 @@ function start_services() { bash grafana/dashboards/download_opea_dashboard.sh # Start Docker Containers - docker compose up -f compose.yaml -f compose.monitoring.yaml -d > ${LOG_PATH}/start_services_with_compose.log + docker compose -f compose.yaml -f compose.monitoring.yaml up -d > ${LOG_PATH}/start_services_with_compose.log n=0 until [[ "$n" -ge 100 ]]; do From 08831537246290ad8c4721c4760850cc4c27754b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 14:28:33 +0800 Subject: [PATCH 09/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Yao, Qing --- CodeGen/docker_compose/intel/set_env.sh | 3 --- CodeTrans/docker_compose/intel/set_env.sh | 1 - 2 files changed, 4 deletions(-) diff --git a/CodeGen/docker_compose/intel/set_env.sh b/CodeGen/docker_compose/intel/set_env.sh index 8507805f82..5e08df213e 100644 --- a/CodeGen/docker_compose/intel/set_env.sh +++ b/CodeGen/docker_compose/intel/set_env.sh @@ -57,6 +57,3 @@ export NUM_CARDS=1 export no_proxy="${no_proxy},${HOST_IP},vllm-server,codegen-xeon-backend-server,codegen-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" export http_proxy=$http_proxy export https_proxy=$https_proxy - - - diff --git a/CodeTrans/docker_compose/intel/set_env.sh b/CodeTrans/docker_compose/intel/set_env.sh index 5d06a33ec0..0c2d0883c5 100644 --- a/CodeTrans/docker_compose/intel/set_env.sh +++ b/CodeTrans/docker_compose/intel/set_env.sh @@ -30,4 +30,3 @@ export BACKEND_SERVICE_PORT=7777 export no_proxy="${no_proxy},${HOST_IP},vllm-server,codetrans-xeon-backend-server,codetrans-xeon-ui-server,redis-vector-db,dataprep-redis-server,tei-embedding-serving,tei-embedding-server,retriever-redis,opea_prometheus,grafana,node-exporter,$JAEGER_IP" # Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1" export http_proxy=$http_proxy export https_proxy=$https_proxy - From e91afed88a14fecac466018e6f1fe63c26b582d6 Mon Sep 17 00:00:00 2001 From: "Yao, Qing" Date: Tue, 4 Nov 2025 16:24:08 +0800 Subject: [PATCH 10/11] Small README.md Signed-off-by: Yao, Qing --- CodeGen/docker_compose/intel/cpu/xeon/README.md | 4 ++-- CodeGen/docker_compose/intel/hpu/gaudi/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CodeGen/docker_compose/intel/cpu/xeon/README.md b/CodeGen/docker_compose/intel/cpu/xeon/README.md index 6150092c9e..ad0db68bff 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/README.md +++ b/CodeGen/docker_compose/intel/cpu/xeon/README.md @@ -257,7 +257,7 @@ Users can interact with the backend service using the `Neural Copilot` VS Code e To enable monitoring for the CodeGen application, you can use the monitoring Docker Compose file along with the main deployment. -#### Option #1: Default Deployment (without monitoring) +### Option #1: Default Deployment (without monitoring) To deploy the CodeGen services without monitoring, execute: @@ -265,7 +265,7 @@ To deploy the CodeGen services without monitoring, execute: docker compose up -d ``` -#### Option #2: Deployment with Monitoring +### Option #2: Deployment with Monitoring > NOTE: To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/README.md b/CodeGen/docker_compose/intel/hpu/gaudi/README.md index daa672ecae..0bb562b954 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeGen/docker_compose/intel/hpu/gaudi/README.md @@ -235,7 +235,7 @@ Use the `Neural Copilot` extension configured with the CodeGen backend URL: `htt To enable monitoring for the CodeGen application on Gaudi, you can use the monitoring Docker Compose file along with the main deployment. -#### Option #1: Default Deployment (without monitoring) +### Option #1: Default Deployment (without monitoring) To deploy the CodeGen services without monitoring, execute: @@ -243,7 +243,7 @@ To deploy the CodeGen services without monitoring, execute: docker compose up -d ``` -#### Option #2: Deployment with Monitoring +### Option #2: Deployment with Monitoring > NOTE: To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. From 70d0184c6fb2be65aef7f4b872d36c748fceda67 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 01:42:16 +0000 Subject: [PATCH 11/11] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CodeGen/README.md | 22 +++++++++---------- .../intel/cpu/xeon/compose.monitoring.yaml | 2 +- .../dashboards/download_opea_dashboard.sh | 2 +- .../provisioning/dashboards/local.yaml | 2 +- .../provisioning/datasources/datasource.yml | 2 +- .../intel/cpu/xeon/prometheus.yaml | 2 +- .../intel/hpu/gaudi/compose.monitoring.yaml | 2 +- .../provisioning/dashboards/local.yaml | 2 +- .../provisioning/datasources/datasource.yml | 2 +- .../intel/hpu/gaudi/prometheus.yaml | 2 +- .../docker_compose/intel/cpu/xeon/README.md | 1 + .../intel/cpu/xeon/compose.monitoring.yaml | 2 +- .../dashboards/download_opea_dashboard.sh | 2 +- .../provisioning/dashboards/local.yaml | 2 +- .../provisioning/datasources/datasource.yml | 2 +- .../intel/cpu/xeon/prometheus.yaml | 2 +- .../docker_compose/intel/hpu/gaudi/README.md | 1 + .../intel/hpu/gaudi/compose.monitoring.yaml | 2 +- .../dashboards/download_opea_dashboard.sh | 2 +- .../provisioning/dashboards/local.yaml | 2 +- .../provisioning/datasources/datasource.yml | 2 +- .../intel/hpu/gaudi/prometheus.yaml | 2 +- 22 files changed, 32 insertions(+), 30 deletions(-) diff --git a/CodeGen/README.md b/CodeGen/README.md index adccd262c6..9aebba4472 100644 --- a/CodeGen/README.md +++ b/CodeGen/README.md @@ -106,18 +106,18 @@ flowchart LR This CodeGen example can be deployed manually on various hardware platforms using Docker Compose or Kubernetes. Select the appropriate guide based on your target environment: -| Hardware | Deployment Mode | Guide Link | -| :-------------- | :------------------- | :----------------------------------------------------------------------- | -| Intel Xeon CPU | Single Node (Docker) | [Xeon Docker Compose Guide](./docker_compose/intel/cpu/xeon/README.md) | -| Intel Xeon CPU | Single Node (Docker) with Monitoring | [Xeon Docker Compose with Monitoring Guide](./docker_compose/intel/cpu/xeon/README.md) | -| Intel Gaudi HPU | Single Node (Docker) | [Gaudi Docker Compose Guide](./docker_compose/intel/hpu/gaudi/README.md) | +| Hardware | Deployment Mode | Guide Link | +| :-------------- | :----------------------------------- | :--------------------------------------------------------------------------------------- | +| Intel Xeon CPU | Single Node (Docker) | [Xeon Docker Compose Guide](./docker_compose/intel/cpu/xeon/README.md) | +| Intel Xeon CPU | Single Node (Docker) with Monitoring | [Xeon Docker Compose with Monitoring Guide](./docker_compose/intel/cpu/xeon/README.md) | +| Intel Gaudi HPU | Single Node (Docker) | [Gaudi Docker Compose Guide](./docker_compose/intel/hpu/gaudi/README.md) | | Intel Gaudi HPU | Single Node (Docker) with Monitoring | [Gaudi Docker Compose with Monitoring Guide](./docker_compose/intel/hpu/gaudi/README.md) | -| AMD EPYC CPU | Single Node (Docker) | [EPYC Docker Compose Guide](./docker_compose/amd/cpu/epyc/README.md) | -| AMD ROCm GPU | Single Node (Docker) | [ROCm Docker Compose Guide](./docker_compose/amd/gpu/rocm/README.md) | -| Intel Xeon CPU | Kubernetes (Helm) | [Kubernetes Helm Guide](./kubernetes/helm/README.md) | -| Intel Gaudi HPU | Kubernetes (Helm) | [Kubernetes Helm Guide](./kubernetes/helm/README.md) | -| Intel Xeon CPU | Kubernetes (GMC) | [Kubernetes GMC Guide](./kubernetes/gmc/README.md) | -| Intel Gaudi HPU | Kubernetes (GMC) | [Kubernetes GMC Guide](./kubernetes/gmc/README.md) | +| AMD EPYC CPU | Single Node (Docker) | [EPYC Docker Compose Guide](./docker_compose/amd/cpu/epyc/README.md) | +| AMD ROCm GPU | Single Node (Docker) | [ROCm Docker Compose Guide](./docker_compose/amd/gpu/rocm/README.md) | +| Intel Xeon CPU | Kubernetes (Helm) | [Kubernetes Helm Guide](./kubernetes/helm/README.md) | +| Intel Gaudi HPU | Kubernetes (Helm) | [Kubernetes Helm Guide](./kubernetes/helm/README.md) | +| Intel Xeon CPU | Kubernetes (GMC) | [Kubernetes GMC Guide](./kubernetes/gmc/README.md) | +| Intel Gaudi HPU | Kubernetes (GMC) | [Kubernetes GMC Guide](./kubernetes/gmc/README.md) | _Note: Building custom microservice images can be done using the resources in [GenAIComps](https://github.com/opea-project/GenAIComps)._ diff --git a/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml b/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml index dab7193494..dea34085b3 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml +++ b/CodeGen/docker_compose/intel/cpu/xeon/compose.monitoring.yaml @@ -55,4 +55,4 @@ services: - 9100:9100 restart: always deploy: - mode: global \ No newline at end of file + mode: global diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index e403ecd24e..48a4d78cf9 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -10,4 +10,4 @@ fi wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/vllm_grafana.json wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codegen_megaservice_grafana.json -wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json \ No newline at end of file +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml index a4250f3cdf..13922a769b 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml @@ -11,4 +11,4 @@ providers: disableDeletion: false updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards options: - path: /var/lib/grafana/dashboards \ No newline at end of file + path: /var/lib/grafana/dashboards diff --git a/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml index 5ba524d49e..a206521d67 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml +++ b/CodeGen/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml @@ -51,4 +51,4 @@ datasources: tlsClientKey: "..." version: 1 # allow users to edit datasources from the UI. - editable: true \ No newline at end of file + editable: true diff --git a/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml b/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml index ed45deee4f..27d0940e09 100644 --- a/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml +++ b/CodeGen/docker_compose/intel/cpu/xeon/prometheus.yaml @@ -24,4 +24,4 @@ scrape_configs: - job_name: "prometheus-node-exporter" metrics_path: /metrics static_configs: - - targets: ["node-exporter:9100"] \ No newline at end of file + - targets: ["node-exporter:9100"] diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml b/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml index c5df491379..cd891a445d 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml +++ b/CodeGen/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml @@ -70,4 +70,4 @@ services: mode: global ports: - 41611:41611 - restart: unless-stopped \ No newline at end of file + restart: unless-stopped diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml index a4250f3cdf..13922a769b 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml @@ -11,4 +11,4 @@ providers: disableDeletion: false updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards options: - path: /var/lib/grafana/dashboards \ No newline at end of file + path: /var/lib/grafana/dashboards diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml index 5ba524d49e..a206521d67 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml +++ b/CodeGen/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml @@ -51,4 +51,4 @@ datasources: tlsClientKey: "..." version: 1 # allow users to edit datasources from the UI. - editable: true \ No newline at end of file + editable: true diff --git a/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml b/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml index c153724bc1..f259e2f7f9 100644 --- a/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml +++ b/CodeGen/docker_compose/intel/hpu/gaudi/prometheus.yaml @@ -29,4 +29,4 @@ scrape_configs: scrape_interval: 30s metrics_path: /metrics static_configs: - - targets: [ "gaudi-metrics-exporter:41611" ] \ No newline at end of file + - targets: [ "gaudi-metrics-exporter:41611" ] diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/README.md b/CodeTrans/docker_compose/intel/cpu/xeon/README.md index 1cb70bf3f6..43e76c8e6c 100755 --- a/CodeTrans/docker_compose/intel/cpu/xeon/README.md +++ b/CodeTrans/docker_compose/intel/cpu/xeon/README.md @@ -64,6 +64,7 @@ docker compose -f compose.yaml up -d ``` #### Option #2 + > NOTE : To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. To deploy with monitoring: diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml b/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml index dab7193494..dea34085b3 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml +++ b/CodeTrans/docker_compose/intel/cpu/xeon/compose.monitoring.yaml @@ -55,4 +55,4 @@ services: - 9100:9100 restart: always deploy: - mode: global \ No newline at end of file + mode: global diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh index d0c6c905a4..47d4f84587 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/dashboards/download_opea_dashboard.sh @@ -10,4 +10,4 @@ fi wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/vllm_grafana.json wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codetrans_megaservice_grafana.json -wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json \ No newline at end of file +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml index a4250f3cdf..13922a769b 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/dashboards/local.yaml @@ -11,4 +11,4 @@ providers: disableDeletion: false updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards options: - path: /var/lib/grafana/dashboards \ No newline at end of file + path: /var/lib/grafana/dashboards diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml index 5ba524d49e..a206521d67 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml +++ b/CodeTrans/docker_compose/intel/cpu/xeon/grafana/provisioning/datasources/datasource.yml @@ -51,4 +51,4 @@ datasources: tlsClientKey: "..." version: 1 # allow users to edit datasources from the UI. - editable: true \ No newline at end of file + editable: true diff --git a/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml b/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml index 263261b3cd..57bbf6e0db 100644 --- a/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml +++ b/CodeTrans/docker_compose/intel/cpu/xeon/prometheus.yaml @@ -20,4 +20,4 @@ scrape_configs: - job_name: "prometheus-node-exporter" metrics_path: /metrics static_configs: - - targets: ["node-exporter:9100"] \ No newline at end of file + - targets: ["node-exporter:9100"] diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md index d481571162..830e9f7a7c 100755 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/README.md +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/README.md @@ -64,6 +64,7 @@ docker compose -f compose.yaml up -d ``` #### Option #2 + > NOTE : To enable monitoring, `compose.monitoring.yaml` file need to be merged along with default `compose.yaml` file. To deploy with monitoring: diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml b/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml index 16a098ce90..691671e656 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/compose.monitoring.yaml @@ -72,4 +72,4 @@ services: mode: global ports: - 41611:41611 - restart: unless-stopped \ No newline at end of file + restart: unless-stopped diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh index b95f64266c..b601762739 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/dashboards/download_opea_dashboard.sh @@ -11,4 +11,4 @@ wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/ev wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/tgi_grafana.json wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/gaudi_grafana_v2.json wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/codetrans_megaservice_grafana.json -wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json \ No newline at end of file +wget https://raw.githubusercontent.com/opea-project/GenAIEval/refs/heads/main/evals/benchmark/grafana/node_grafana.json diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml index a4250f3cdf..13922a769b 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/dashboards/local.yaml @@ -11,4 +11,4 @@ providers: disableDeletion: false updateIntervalSeconds: 10 #how often Grafana will scan for changed dashboards options: - path: /var/lib/grafana/dashboards \ No newline at end of file + path: /var/lib/grafana/dashboards diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml index 5ba524d49e..a206521d67 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/grafana/provisioning/datasources/datasource.yml @@ -51,4 +51,4 @@ datasources: tlsClientKey: "..." version: 1 # allow users to edit datasources from the UI. - editable: true \ No newline at end of file + editable: true diff --git a/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml b/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml index 887b511260..a9c3b5fc14 100644 --- a/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml +++ b/CodeTrans/docker_compose/intel/hpu/gaudi/prometheus.yaml @@ -27,4 +27,4 @@ scrape_configs: scrape_interval: 30s metrics_path: /metrics static_configs: - - targets: ["gaudi-metrics-exporter:41611"] \ No newline at end of file + - targets: ["gaudi-metrics-exporter:41611"]