Thanks for considering a contribution. This is a small, single-file CLI tool with a narrow scope by design (see "Explicitly out of scope" in the README) - keep that in mind before proposing larger features.
Open an issue with:
- What you ran (
obtain/monitor/selftest) and your OCI region/shape (no need to share your actual OCIDs - fake/redact them). - The relevant JSON Lines log entries (
log_file), not just a description. - Whether the failure came from the tool itself (a Python traceback) or
from the
ociCLI (aServiceErrorJSON blob) - these need different fixes.
git clone <this repo>
cd oci-shepherd
python3 -m pip install -r requirements.txtNo live OCI account is required to work on this tool. Two testing paths exist specifically so you don't need one:
# Exercises outcome classification + logging with canned responses.
python3 oci_shepherd.py selftest --log-file ./selftest.jsonl
# Exercises the full obtain_loop/monitor_loop functions (AD resolution,
# image resolution, launch, state file handoff, systemd handoff) against
# an in-process fake of the `oci` CLI.
python3 test/run_local_test.pyRun both, and python3 -m py_compile oci_shepherd.py, before
opening a PR. If you have access to a systemd host, also sanity-check the
unit files:
systemd-analyze verify systemd/oci-shepherd-obtain.service
systemd-analyze verify systemd/oci-shepherd-monitor.service- Keep the README's config reference table in sync with
REQUIRED_CONFIG_FIELDS/config.setdefault(...)calls inoci_shepherd.pyif you add, rename, or remove a config field - and updateconfig.example.yamltoo. Docs/code drift on field names is the most common way this tool breaks silently for users. - No new dependencies beyond PyYAML without discussion first - part of the point of this tool is that it has almost no attack surface/install burden beyond the OCI CLI itself.
- This project is licensed AGPL-3.0-or-later (see LICENSE); by submitting a PR you agree your contribution is licensed under the same terms.