Name | troika JSON |
Version |
0.2.5
JSON |
| download |
home_page | None |
Summary | Submit, monitor and kill jobs on remote systems |
upload_time | 2025-02-04 12:07:45 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Apache Software License 2.0 |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Troika
Submit, monitor and kill jobs on local and remote hosts
## Requirements
* Python 3.8 or higher
* `pyyaml` (https://pypi.org/project/PyYAML/)
* For testing: `pytest` (https://pypi.org/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
```
### Running the tests
Once Troika is installed in your environment, the tests can be run using `pytest`:
```
python3 -m pytest -v tests/
```
### Building documentation
The documentation uses `sphinx`. To generate the HTML docs:
```
cd docs/
make html
```
## Presentation
Slides and recording of the *"Troika: Submit, monitor, and interrupt jobs on any HPC system with the same interface"*
talk at [FOSDEM'23](https://fosdem.org/2023) are available via https://fosdem.org/2023/schedule/event/troika_hpc_jobs .
## 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
```yaml
---
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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "troika",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Olivier Iffrig <software.support@ecmwf.int>",
"download_url": "https://files.pythonhosted.org/packages/3a/3e/cece192966308746765a5283434037340f5b75e56c09407675fa8d9c6c98/troika-0.2.5.tar.gz",
"platform": null,
"description": "# Troika\n\nSubmit, monitor and kill jobs on local and remote hosts\n\n## Requirements\n\n* Python 3.8 or higher\n* `pyyaml` (https://pypi.org/project/PyYAML/)\n* For testing: `pytest` (https://pypi.org/project/pytest/)\n* For building the documentation: ``sphinx`` (https://www.sphinx-doc.org)\n\n## Installing\n\n```\npython3 -m venv troika\nsource troika/bin/activate\npython3 -m pip install troika\n```\n\n### Running the tests\n\nOnce Troika is installed in your environment, the tests can be run using `pytest`:\n\n```\npython3 -m pytest -v tests/\n```\n\n### Building documentation\n\nThe documentation uses `sphinx`. To generate the HTML docs:\n\n```\ncd docs/\nmake html\n```\n\n## Presentation\n\nSlides and recording of the *\"Troika: Submit, monitor, and interrupt jobs on any HPC system with the same interface\"*\ntalk at [FOSDEM'23](https://fosdem.org/2023) are available via https://fosdem.org/2023/schedule/event/troika_hpc_jobs .\n\n## Getting started\n\n### Concepts\n\nTroika holds a list of *sites* onto which jobs can be submitted. A site is\ndefined by two main parameters: a *connection type* (`local` or `ssh`), and a\n*site type* (e.g. `direct` or `slurm`). Every site is identified by a name\ngiven in the configuration file.\n\n### Example configuration file\n\n```yaml\n---\nsites:\n localhost:\n type: direct # jobs are run directly on the target\n connection: local # the target is the current host\n remote:\n type: direct # jobs are run directly on the target\n connection: ssh # connect to the target via ssh\n host: remotebox # ssh host\n copy_script: true # if false, the script will be piped through ssh\n at_startup: [\"check_connection\"]\n slurm_cluster:\n type: slurm # jobs are submitted to Slurm\n connection: ssh # connect to the target via ssh\n host: remotecluster # ssh host\n copy_script: true # if false, the script will be piped through ssh\n at_startup: [\"check_connection\"]\n pre_submit: [\"create_output_dir\"]\n at_exit: [\"copy_submit_logfile\"]\n pbs_cluster:\n type: pbs # jobs are submitted to PBS\n connection: ssh # connect to the target via ssh\n host: othercluster # ssh host\n copy_script: true # if false, the script will be piped through ssh\n at_startup: [\"check_connection\"]\n pre_submit: [\"create_output_dir\"]\n at_exit: [\"copy_submit_logfile\"]\n```\n\nThe configuration can be checked using the `list-sites` command:\n\n```\n$ troika -c config.yml list-sites\nAvailable sites:\nName Type Connection\n------------------------------------------------------------\nlocalhost direct local\nremote direct ssh\nslurm_cluster slurm ssh\npbs_cluster pbs ssh\n```\n\n### Available options\n\n```\n$ troika --help\n```\n\n### Main commands\n\nSubmit a job on `cluster`:\n\n```\n$ troika -c config.yaml submit -o /path/to/output/file cluster job.sh\n```\n\nQuery the status of the job:\n\n```\n$ troika -c config.yaml monitor cluster job.sh\n```\n\nKill the job:\n\n```\n$ troika -c config.yaml kill cluster job.sh\n```\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Submit, monitor and kill jobs on remote systems",
"version": "0.2.5",
"project_urls": {
"Homepage": "https://github.com/ecmwf/troika"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7f9ba40ad19b22ea14b153010a8a8756ff2328917e95e2d35d05b3e0d4e3e991",
"md5": "211383a16a91f5bf6aa9162407617804",
"sha256": "8a10077d2ea51780019a4fb45d1df178a99c69f2a2948a8c8c8271b73c8f9a0b"
},
"downloads": -1,
"filename": "troika-0.2.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "211383a16a91f5bf6aa9162407617804",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 47318,
"upload_time": "2025-02-04T12:07:44",
"upload_time_iso_8601": "2025-02-04T12:07:44.164940Z",
"url": "https://files.pythonhosted.org/packages/7f/9b/a40ad19b22ea14b153010a8a8756ff2328917e95e2d35d05b3e0d4e3e991/troika-0.2.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3a3ecece192966308746765a5283434037340f5b75e56c09407675fa8d9c6c98",
"md5": "1968bd8cddac196b82553024d8cbf8f1",
"sha256": "c539ef39407e08a01ed790053b70da40e049b11b3a4af1d7b58bf15b6c07c02c"
},
"downloads": -1,
"filename": "troika-0.2.5.tar.gz",
"has_sig": false,
"md5_digest": "1968bd8cddac196b82553024d8cbf8f1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 33044,
"upload_time": "2025-02-04T12:07:45",
"upload_time_iso_8601": "2025-02-04T12:07:45.894703Z",
"url": "https://files.pythonhosted.org/packages/3a/3e/cece192966308746765a5283434037340f5b75e56c09407675fa8d9c6c98/troika-0.2.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-04 12:07:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ecmwf",
"github_project": "troika",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "troika"
}