CLI tool for triggering datacenter metadata updates
Project description
dmtri
dmtri is a command-line tool designed to trigger metadata and data refresh simulations across EIDA nodes using Ansible automation.
seedpsdwfcatalogavailability
It uses .dmtri_jobs.json per host to track async job state and integrates with uv and ansible for CLI automation.
Quick Start
You can use dmtri in two ways, depending on your preference:
Option 1: Using uvx
You can run commands using:
uvx dmtri <command> [options]
Option 2: Global (Tool-based) — Ideal for global CLI use
uv tool install dmtri
This makes dmtri available globally:
dmtri <command> [options]
You can update it any time using:
uv tool upgrade dmtri
2. Configure inventory
Edit the file: src/inventory/hosts.ini
Example:
[seedpsd_nodes]
<SEEDPSD_HOST> ansible_user=<USER> ansible_ssh_pass="<PASSWORD>" ansible_connection=ssh ansible_become=false ansible_ssh_common_args='-o StrictHostKeyChecking=no'
[seedpsd_nodes:vars]
seedpsd_dir=/home/<USER>/seedpsd
[wf_catalogue]
<WFCATALOG_HOST> ansible_user=<USER> ansible_ssh_pass="<PASSWORD>" ansible_connection=ssh ansible_become=false ansible_ssh_common_args='-o StrictHostKeyChecking=no'
[wf_catalogue:vars]
collector_dir=/home/<USER>/Programs/wfcatalogue<VERSION>/wfcatalog/collector2
[ws_availability]
<AVAILABILITY_HOST> ansible_user=<USER> ansible_ssh_pass="<PASSWORD>" ansible_connection=ssh ansible_become=false ansible_ssh_common_args='-o StrictHostKeyChecking=no'
[ws_availability:vars]
availability_dir=/home/<USER>/Programs/ws-availability<VERSION>/views
mongo_user=<MONGO_USERNAME>
mongo_pass=<MONGO_PASSWORD>
mongo_authdb=<MONGO_DATABASE>
3. Run example jobs
By default, this command runs all refresh playbooks (seedpsd, wfcatalog, and availability):
uv run dmtri refresh -e "network=HL station=ATH starttime=2024-01-01T00:00:00 endtime=2024-01-02T00:00:00"
4. Track jobs across hosts
uv run dmtri track
Shows per-host job status:
Job ID: j123... Type: seedpsd Station: ATH Status: ✅ Finished
Job ID: manual-... Type: availability Status: ✅ Manual (not tracked)
5. Troubleshooting with dmtri doctor
Check SSH connectivity to your configured hosts using:
uv run dmtri doctor
This uses the Ansible ping module to test access to all servers in your inventory.
Options
--verbose— Show full output from each host
Example
uv run dmtri doctor --verbose
If no response is received, ensure:
- You're connected to the VPN (if applicable)
- SSH access is configured correctly in your inventory file
- Host IPs and credentials are reachable and valid
Operation Details
dmtri supports two main operations for both metadata and data: refresh and clean. These affect the following components:
🔄 Refresh
-
Metadata
seedpsd: Scans for new metadata.availability: Refreshes the view in MongoDB.
-
Data
- Identifies data files in the archive for the specified epoch (by NSLC and time range).
seedpsd: Recalculates seedPSD for new files.wfcatalog: Runs the collector on new data files.
- Identifies data files in the archive for the specified epoch (by NSLC and time range).
🧹 Clean
-
Metadata
seedpsd: Removes the metadata entries.availability: Refreshes the view in MongoDB.
-
Data
- Identifies data files in the archive for the specified epoch.
seedpsd: Removes associated seedPSD data (via CLI).wfcatalog: Removes files using the--deleteoption in the collector.
- Identifies data files in the archive for the specified epoch.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmtri-0.1.0.tar.gz.
File metadata
- Download URL: dmtri-0.1.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6536134e1e6d3f1b10fca2cdc4fceba0eb9a944c6908f14bb51c1240da279a4
|
|
| MD5 |
0af7560e7005a641c27531e972c7e1c4
|
|
| BLAKE2b-256 |
0745d8c4c754c5ef6b3f90530bc52b76508e38c432ebf4a6630868040d2867da
|
Provenance
The following attestation bundles were made for dmtri-0.1.0.tar.gz:
Publisher:
publish.yml on EIDA/dmtri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmtri-0.1.0.tar.gz -
Subject digest:
c6536134e1e6d3f1b10fca2cdc4fceba0eb9a944c6908f14bb51c1240da279a4 - Sigstore transparency entry: 229769656
- Sigstore integration time:
-
Permalink:
EIDA/dmtri@81b36436234e48d49f1abb03f76745805675b29e -
Branch / Tag:
refs/tags/1.0.0-beta.1 - Owner: https://github.com/EIDA
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81b36436234e48d49f1abb03f76745805675b29e -
Trigger Event:
push
-
Statement type:
File details
Details for the file dmtri-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dmtri-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0b53316d2c6abe9b79f8bd4cd899bea7f49761ad190031bb6a9ca0bcce8f388
|
|
| MD5 |
343e1290750a9f89bc6380be0cfc3440
|
|
| BLAKE2b-256 |
15247c48c4a229f64b01f5ab426e218abb0443228c92c0c08d917549d9d9e345
|
Provenance
The following attestation bundles were made for dmtri-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on EIDA/dmtri
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmtri-0.1.0-py3-none-any.whl -
Subject digest:
c0b53316d2c6abe9b79f8bd4cd899bea7f49761ad190031bb6a9ca0bcce8f388 - Sigstore transparency entry: 229769657
- Sigstore integration time:
-
Permalink:
EIDA/dmtri@81b36436234e48d49f1abb03f76745805675b29e -
Branch / Tag:
refs/tags/1.0.0-beta.1 - Owner: https://github.com/EIDA
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81b36436234e48d49f1abb03f76745805675b29e -
Trigger Event:
push
-
Statement type: