Juju-doctor is a pypi package which helps validate Juju deployments using probes.
Project description
juju-doctor
You deploy, we validate, you fix it
Probes
Run a sample show-unit probe with:
- On a live model
juju show-unit grafana/0 | ./my-probe.py - On a file
cat show-unit.yaml | ./my-probe.py
Run that same probe with juju-doctor:
On a live model
juju-doctor check \
--probe "file://my-probe.py" \
--model "grafana"
On a file
juju-doctor check \
--probe "file://my-probe.py" \
--show-unit "show-unit.yaml"
Simplest Probe
#!/usr/bin/env python3
import sys
import yaml
def demo_probe(juju_artifact: dict):
# Your validation goes here
failure = "you_choose"
if failure:
print("failed", file=sys.stderr)
exit(1)
if __name__ == "__main__":
juju_artifact = yaml.safe_load(sys.stdin.read())
demo_probe(juju_artifact)
Development
git clone https://github.com/canonical/juju-doctor.git
python3 -m venv venv && source venv/bin/activate
pip install -e .
juju-doctor check --help
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
juju_doctor-0.1.2.tar.gz
(134.8 kB
view details)
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 juju_doctor-0.1.2.tar.gz.
File metadata
- Download URL: juju_doctor-0.1.2.tar.gz
- Upload date:
- Size: 134.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1396900ced7669b85fb4644e7f022791859b0a700407ac5cfdc95e9b62ff5033
|
|
| MD5 |
2ec1026320f3dc3f5ee4971226e28221
|
|
| BLAKE2b-256 |
0a23c83b7f055ca71b0c9f81de126310d68f31981dda70df517c6691bbc052c2
|
File details
Details for the file juju_doctor-0.1.2-py3-none-any.whl.
File metadata
- Download URL: juju_doctor-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b56daf4c4433e97255d9fec5cd0345a6747e447f157a33a3dace3948216cd8c5
|
|
| MD5 |
ad3f4817c60a490d073df8e8b439eb65
|
|
| BLAKE2b-256 |
5ee1d9fb9ef9f2b5101e7273c349bb6655a7165d23209e9e24e305b5dacb2f45
|