Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.33 KB

File metadata and controls

62 lines (45 loc) · 2.33 KB

Squonk2 Python Command-Line Tools

GitHub tag (latest SemVer)

test

Code style: black

A collection of Python-based Command line tools to help manage and maintain a Squonk2 deployment. The tools are generally used for administrative purposes.

The tools use the Squonk2 Python Client package and also act as a convenient set of examples so that users can create their own utilities.

Most tools need to be executed by a user with admin privileges.

Usage

The tools utilise the Python client's Environment module, which expects you to create an Environments file - a YAML file that defines the variables used to connect to the corresponding installation. The environments file (typically ~/.squonk2/environments) allows you to create variables for multiple installations identified by name.

See the Environment module section of the Squonk2 Python Client.

The project uses uv to manage its dependencies. Install uv and then run the appropriate tool with uv run - the first run automatically creates a virtual environment (.venv) and installs the dependencies declared in pyproject.toml: -

uv run tools/delete-test-projects.py dls-test

As a general style any tools that have destructive actions rely on the use of a --do-it option to prevent any accidental damage. Therefore, to actually delete Data Manager projects add --do-it to the delete-test-projects command: -

uv run tools/delete-test-projects.py dls-test --do-it

All test tools use argparse so adding --help to the command will display the tool's help.

Tools

You should find the following tools in this repository: -

  • coins
  • create-organisations-and-units
  • delete-all-instances
  • delete-old-instances
  • delete-test-projects
  • get-job-executions
  • get-orgs-unit-products
  • list-environments
  • load-er
  • load-job-manifests
  • org-jobs
  • save-er