Submit, monitor and kill jobs on remote systems
Project description
Troika
Submit, monitor and kill jobs on local and remote hosts
Requirements
- Python 3.8 or higher
pyyaml
(https://pypi-hypernode.com/project/PyYAML/)- For testing:
pytest
(https://pypi-hypernode.com/project/pytest/) - For building the documentation:
sphinx
(https://www.sphinx-doc.org)
Installing
python3 -m venv troika
source troika/bin/activate
python3 -m pip install troika
Getting started
Concepts
Troika holds a list of sites onto which jobs can be submitted. A site is
defined by two main parameters: a connection type (local
or ssh
), and a
site type (e.g. direct
or slurm
). Every site is identified by a name
given in the configuration file.
Example configuration file
---
sites:
localhost:
type: direct # jobs are run directly on the target
connection: local # the target is the current host
remote:
type: direct # jobs are run directly on the target
connection: ssh # connect to the target via ssh
host: remotebox # ssh host
copy_script: true # if false, the script will be piped through ssh
at_startup: ["check_connection"]
slurm_cluster:
type: slurm # jobs are submitted to Slurm
connection: ssh # connect to the target via ssh
host: remotecluster # ssh host
copy_script: true # if false, the script will be piped through ssh
at_startup: ["check_connection"]
pre_submit: ["create_output_dir"]
at_exit: ["copy_submit_logfile"]
pbs_cluster:
type: pbs # jobs are submitted to PBS
connection: ssh # connect to the target via ssh
host: othercluster # ssh host
copy_script: true # if false, the script will be piped through ssh
at_startup: ["check_connection"]
pre_submit: ["create_output_dir"]
at_exit: ["copy_submit_logfile"]
The configuration can be checked using the list-sites
command:
$ troika -c config.yml list-sites
Available sites:
Name Type Connection
------------------------------------------------------------
localhost direct local
remote direct ssh
slurm_cluster slurm ssh
pbs_cluster pbs ssh
Available options
$ troika --help
Main commands
Submit a job on cluster
:
$ troika -c config.yaml submit -o /path/to/output/file cluster job.sh
Query the status of the job:
$ troika -c config.yaml monitor cluster job.sh
Kill the job:
$ troika -c config.yaml kill cluster job.sh
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
troika-0.2.0.tar.gz
(30.4 kB
view details)
Built Distribution
troika-0.2.0-py3-none-any.whl
(41.6 kB
view details)
File details
Details for the file troika-0.2.0.tar.gz
.
File metadata
- Download URL: troika-0.2.0.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 294f9ad86a6c01ab0415a8a4894d3cb3330feabe5c1c5e1583e72d64f4797e02 |
|
MD5 | 029f5043ee62a6a490682b13d5a66bd0 |
|
BLAKE2b-256 | 099d5379216b25fb2a391de174600c4323f17d716d611b77cf04cc6f800c99ba |
File details
Details for the file troika-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: troika-0.2.0-py3-none-any.whl
- Upload date:
- Size: 41.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b6d7c1c50799659649a1a56a6c4a3e25e1366af397d426ddd0123f72547c20 |
|
MD5 | 497ec942cad78d8220f36ac6cef7909c |
|
BLAKE2b-256 | 0563bba0e70a237f7b4c14af32c42201f26874018ee4717033fbe013a8bf69ee |