Skip to content

feat: enhance the demo with netstat and dns_query telemetries #427

feat: enhance the demo with netstat and dns_query telemetries

feat: enhance the demo with netstat and dns_query telemetries #427

Workflow file for this run

name: Docker
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build & Start containers
run: docker-compose up --build --force-recreate --detach
- name: Run tests
run: |
set -x
echo wait 5s for SPDK to start... && sleep 5s
docker-compose logs
docker-compose ps
docker inspect --format='{{json .Name}} - {{json .State.Health.Status}}' $(docker-compose ps -q)
uniq -c <<< $(docker inspect --format='{{json .State.Health.Status}}' $(docker-compose ps -q)) | grep -q '4 "healthy"' || true
docker-compose exec -T spdk /usr/local/bin/spdk_nvme_perf -r 'traddr:127.0.0.1 trtype:TCP adrfam:IPv4 trsvcid:4420' -c 0x1 -q 1 -o 4096 -w randread -t 10 || true
echo wait 15s for prometheus to start... && sleep 15s
curl --fail http://127.0.0.1:9091/api/v1/query?query=mem_free | grep mem_free
curl --fail http://127.0.0.1:9091/api/v1/query?query=cpu_usage_user | grep cpu_usage_user
curl --fail http://127.0.0.1:9091/api/v1/query?query=dpu_bytes_read | grep dpu_bytes_read
curl --fail http://127.0.0.1:9091/api/v1/query?query=net_bytes_recv_total | grep net_bytes_recv_total
curl --fail http://127.0.0.1:9091/api/v1/query?query=nginx_requests | grep nginx_requests
curl --fail http://127.0.0.1:9091/api/v1/query?query=redfish_thermal_fans_reading_rpm | grep redfish_thermal_fans_reading_rpm
curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent
curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep netstat_tcp_listen
curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code
- name: Logs
if: always()
run: docker-compose logs
- name: Stop containers
if: always()
run: docker-compose down --volumes --remove-orphans