Skip to content

Commit

Permalink
Update name to Omnistat
Browse files Browse the repository at this point in the history
  • Loading branch information
jordap committed Jul 3, 2024
1 parent c87b58a commit 1012b20
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Test Omniwatch
name: Test Omnistat
on: [push]
jobs:
test:
name: Test Omniwatch integration
name: Test Omnistat integration
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Disable SMI collector (won't work in GitHub)
run: >
sed -i "s/enable_rocm_smi = True/enable_rocm_smi = False/" \
test/docker/slurm/omniwatch.slurm
test/docker/slurm/omnistat.slurm
- name: Start containerized environment
run: docker compose -f test/docker/slurm/compose.yaml up -d
- name: Wait for Prometheus
Expand All @@ -24,7 +24,7 @@ jobs:
echo "Waiting for Prometheus..."; \
sleep 5; \
done'
- name: Wait for Omniwatch
- name: Wait for Omnistat
run: >
timeout 15m bash -c \
'until [[ $(curl -s -g "localhost:9090/api/v1/series?match[]={instance=\"node:8000\"}" | jq ".data|length") != 0 ]]; do \
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dirty_template = "{tag}+git.{sha}.uncommitted"
[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning::", # ignore third-party deprecation warnings
"default::DeprecationWarning:omniwatch.*:",
"default::DeprecationWarning:omnistat.*:",
]

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Test environment based on a containerized SLURM cluster.

The provided Docker Compose environment creates a containerized SLURM cluster,
and installs the working copy of omniwatch in the container at run time. It is
and installs the working copy of Omnistat in the container at run time. It is
meant to help make development easier, and enables testing without relying on
access to real clusters.

Expand Down
20 changes: 10 additions & 10 deletions test/docker/slurm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ if [ "$1" = "node" ]; then
service munge start
service slurmd start

# Install omniwatch based on the current working copy of the repository;
# Install omnistat based on the current working copy of the repository;
# this docker compose environment is meant to be used for development and
# testing.
python3 -m venv /opt/omniwatch
python3 -m venv /opt/omnistat

# Copy omniwatch source to /tmp avoid polluting the host with files
# Copy omnistat source to /tmp avoid polluting the host with files
# generated in the container.
cp -R /host-source /tmp/omniwatch
cd /tmp/omniwatch
/opt/omniwatch/bin/python -m pip install .[query]
cp -R /host-source /tmp/omnistat
cd /tmp/omnistat
/opt/omnistat/bin/python -m pip install .[query]
cd
rm -rf /tmp/omniwatch
rm -rf /tmp/omnistat

# Enable access from the controller container, which is running the
# prometheus scraper.
ip=$(dig +short controller)
sed "s/127.0.0.1/127.0.0.1, $ip/" \
/host-source/test/docker/slurm/omniwatch.slurm > /etc/omniwatch.config
/host-source/test/docker/slurm/omnistat.slurm > /etc/omnistat.config

OMNIWATCH_CONFIG=/etc/omniwatch.config /opt/omniwatch/bin/gunicorn \
-b 0.0.0.0:8000 omniwatch.node_monitoring:app --daemon
OMNISTAT_CONFIG=/etc/omnistat.config /opt/omnistat/bin/gunicorn \
-b 0.0.0.0:8000 omnistat.node_monitoring:app --daemon
fi

sleep infinity
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[omniwatch.collectors]
[omnistat.collectors]
port = 8000
usermode = False
usermode_port = 8000
Expand All @@ -17,15 +17,15 @@ allowed_ips = 127.0.0.1
# corebinding = 31


[omniwatch.collectors.slurm]
[omnistat.collectors.slurm]
host_skip = "login.*"
enable_annotations = False
job_detection_mode = file-based
job_detection_file = /tmp/omni_slurmjobinfo

[omniwatch.report]
[omnistat.report]

[omniwatch.query]
[omnistat.query]
prometheus_url = http://localhost:9090
system_name = SLURM in Docker Cluster

Expand All @@ -34,7 +34,7 @@ system_name = SLURM in Docker Cluster
#--

# --user-spawned promserver
[omniwatch.promserver]
[omnistat.promserver]
logfile = prom_server.log
binary = /path-to-promeotheus-server-install/prometheus-2.45.1.linux-amd64/prometheus
datadir = data_prom
Expand Down
2 changes: 1 addition & 1 deletion test/docker/slurm/prometheus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
scrape_configs:
- job_name: omniwatch
- job_name: omnistat
scrape_interval: 1s
scrape_timeout: 1s
static_configs:
Expand Down
2 changes: 1 addition & 1 deletion test/docker/slurm/slurm-prolog.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

/opt/omniwatch/bin/python -m omniwatch.slurm_env
/opt/omnistat/bin/python -m omnistat.slurm_env

0 comments on commit 1012b20

Please sign in to comment.