slurmutils


Nameslurmutils JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/canonical/slurmutils
SummaryUtilities and APIs for interfacing with the Slurm workload manager.
upload_time2024-02-08 03:53:00
maintainerJason C. Nucciarone
docs_urlNone
authorJason C. Nucciarone
requires_python>=3.8
licenseLGPL-3.0-only
keywords hpc administration orchestration utility
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# slurmutils

Utilities and APIs for interfacing with the Slurm workload manager.

[![Matrix](https://img.shields.io/matrix/ubuntu-hpc%3Amatrix.org?logo=matrix&label=ubuntu-hpc)](https://matrix.to/#/#ubuntu-hpc:matrix.org)

</div>

## Features

`slurmutils` is a collection of various utilities and APIs to make it easier 
for you and your friends to interface with the Slurm workload manager, especially if you 
are orchestrating deployments of new and current Slurm clusters. Gone are the days of
seething over incomplete Jinja2 templates. Current utilities and APIs shipped in the 
`slurmutils` package include:

#### `from slurmutils.editors import ...`

* `slurmconfig`:  An editor _slurm.conf_ and _Include_ files.
* `slurmdbdconfig`: An editor for _slurmdbd.conf_ files.

## Installation

#### Option 1: Install from PyPI

```shell
$ python3 -m pip install slurmutils
```

#### Option 2: Install from source

We use the [Poetry](https://python-poetry.org) packaging and dependency manager to
manage this project. It must be installed on your system if installing `slurmutils`
from source.

```shell
$ git clone https://github.com/canonical/slurmutils.git
$ cd slurmutils
$ poetry install
```

## Usage

### Editors

#### `slurmconfig`

This module provides an API for editing both _slurm.conf_ and _Include_ files,
and can create new configuration files if they do not exist. Here's some common Slurm
lifecycle management operators you can perform using this editor:

##### Edit a pre-existing _slurm.conf_ configuration file

```python
from slurmutils.editors import slurmconfig

# Open, edit, and save the slurm.conf file located at _/etc/slurm/slurm.conf_.
with slurmconfig.edit("/etc/slurm/slurm.conf") as config:
    del config.inactive_limit
    config.max_job_count = 20000
    config.proctrack_type = "proctrack/linuxproc"
```

##### Add a new node to the _slurm.conf_ file

```python
from slurmutils.editors import slurmconfig
from slurmutils.models import Node

with slurmconfig.edit("/etc/slurm/slurm.conf") as config:
    node = Node(
        NodeName="batch-[0-25]", 
        NodeAddr="12.34.56.78", 
        CPUs=1, 
        RealMemory=1000, 
        TmpDisk=10000,
    )
    config.nodes[node.node_name] = node
```

#### `slurmdbdconfig`

This module provides and API for editing _slurmdbd.conf_ files, and can create new
_slurmdbd.conf_ files if they do not exist. Here's some operations you can perform
on the _slurmdbd.conf_ file using this editor:

##### Edit a pre-existing _slurmdbd.conf_ configuration file

```python
from slurmutils.editors import slurmdbdconfig

with slurmdbdconfig.edit("/etc/slurm/slurmdbd.conf") as config:
    config.archive_usage = "yes"
    config.log_file = "/var/spool/slurmdbd.log"
    config.debug_flags = ["DB_EVENT", "DB_JOB", "DB_USAGE"]
    del config.auth_alt_types
    del config.auth_alt_parameters
```

## Project & Community

The `slurmutils` package is a project of the 
[Ubuntu HPC](https://discourse.ubuntu.com/t/high-performance-computing-team/35988) community. 
It is an open-source project that is welcome to community involvement, contributions, suggestions, fixes, 
and constructive feedback. Interested in being involved with the development of `slurmutils`? 
Check out these links below:

* [Join our online chat](https://matrix.to/#/#ubuntu-hpc:matrix.org)
* [Code of Conduct](https://ubuntu.com/community/code-of-conduct)
* [Contributing guidelines](./CONTRIBUTING.md)

## License

The `slurmutils` package is free software, distributed under the GNU Lesser General Public License, v3.0.
See the [LICENSE](./LICENSE) file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/canonical/slurmutils",
    "name": "slurmutils",
    "maintainer": "Jason C. Nucciarone",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "jason.nucciarone@canonical.com",
    "keywords": "HPC,administration,orchestration,utility",
    "author": "Jason C. Nucciarone",
    "author_email": "jason.nucciarone@canonical.com",
    "download_url": "https://files.pythonhosted.org/packages/90/00/22137185f4786c2781f3f010c5b0c9345105d6f1b95727d67f8332725e78/slurmutils-0.4.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# slurmutils\n\nUtilities and APIs for interfacing with the Slurm workload manager.\n\n[![Matrix](https://img.shields.io/matrix/ubuntu-hpc%3Amatrix.org?logo=matrix&label=ubuntu-hpc)](https://matrix.to/#/#ubuntu-hpc:matrix.org)\n\n</div>\n\n## Features\n\n`slurmutils` is a collection of various utilities and APIs to make it easier \nfor you and your friends to interface with the Slurm workload manager, especially if you \nare orchestrating deployments of new and current Slurm clusters. Gone are the days of\nseething over incomplete Jinja2 templates. Current utilities and APIs shipped in the \n`slurmutils` package include:\n\n#### `from slurmutils.editors import ...`\n\n* `slurmconfig`:  An editor _slurm.conf_ and _Include_ files.\n* `slurmdbdconfig`: An editor for _slurmdbd.conf_ files.\n\n## Installation\n\n#### Option 1: Install from PyPI\n\n```shell\n$ python3 -m pip install slurmutils\n```\n\n#### Option 2: Install from source\n\nWe use the [Poetry](https://python-poetry.org) packaging and dependency manager to\nmanage this project. It must be installed on your system if installing `slurmutils`\nfrom source.\n\n```shell\n$ git clone https://github.com/canonical/slurmutils.git\n$ cd slurmutils\n$ poetry install\n```\n\n## Usage\n\n### Editors\n\n#### `slurmconfig`\n\nThis module provides an API for editing both _slurm.conf_ and _Include_ files,\nand can create new configuration files if they do not exist. Here's some common Slurm\nlifecycle management operators you can perform using this editor:\n\n##### Edit a pre-existing _slurm.conf_ configuration file\n\n```python\nfrom slurmutils.editors import slurmconfig\n\n# Open, edit, and save the slurm.conf file located at _/etc/slurm/slurm.conf_.\nwith slurmconfig.edit(\"/etc/slurm/slurm.conf\") as config:\n    del config.inactive_limit\n    config.max_job_count = 20000\n    config.proctrack_type = \"proctrack/linuxproc\"\n```\n\n##### Add a new node to the _slurm.conf_ file\n\n```python\nfrom slurmutils.editors import slurmconfig\nfrom slurmutils.models import Node\n\nwith slurmconfig.edit(\"/etc/slurm/slurm.conf\") as config:\n    node = Node(\n        NodeName=\"batch-[0-25]\", \n        NodeAddr=\"12.34.56.78\", \n        CPUs=1, \n        RealMemory=1000, \n        TmpDisk=10000,\n    )\n    config.nodes[node.node_name] = node\n```\n\n#### `slurmdbdconfig`\n\nThis module provides and API for editing _slurmdbd.conf_ files, and can create new\n_slurmdbd.conf_ files if they do not exist. Here's some operations you can perform\non the _slurmdbd.conf_ file using this editor:\n\n##### Edit a pre-existing _slurmdbd.conf_ configuration file\n\n```python\nfrom slurmutils.editors import slurmdbdconfig\n\nwith slurmdbdconfig.edit(\"/etc/slurm/slurmdbd.conf\") as config:\n    config.archive_usage = \"yes\"\n    config.log_file = \"/var/spool/slurmdbd.log\"\n    config.debug_flags = [\"DB_EVENT\", \"DB_JOB\", \"DB_USAGE\"]\n    del config.auth_alt_types\n    del config.auth_alt_parameters\n```\n\n## Project & Community\n\nThe `slurmutils` package is a project of the \n[Ubuntu HPC](https://discourse.ubuntu.com/t/high-performance-computing-team/35988) community. \nIt is an open-source project that is welcome to community involvement, contributions, suggestions, fixes, \nand constructive feedback. Interested in being involved with the development of `slurmutils`? \nCheck out these links below:\n\n* [Join our online chat](https://matrix.to/#/#ubuntu-hpc:matrix.org)\n* [Code of Conduct](https://ubuntu.com/community/code-of-conduct)\n* [Contributing guidelines](./CONTRIBUTING.md)\n\n## License\n\nThe `slurmutils` package is free software, distributed under the GNU Lesser General Public License, v3.0.\nSee the [LICENSE](./LICENSE) file for more information.\n",
    "bugtrack_url": null,
    "license": "LGPL-3.0-only",
    "summary": "Utilities and APIs for interfacing with the Slurm workload manager.",
    "version": "0.4.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/canonical/slurmutils/issues",
        "Homepage": "https://github.com/canonical/slurmutils",
        "Repository": "https://github.com/canonical/slurmutils"
    },
    "split_keywords": [
        "hpc",
        "administration",
        "orchestration",
        "utility"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c1dc4537927c0b6010a0eb15b1cbe6e7bb90ac09c53f555a646a76e41573d89",
                "md5": "f0e09d7f33abb6b2856d8f4899f76261",
                "sha256": "532abca49e8a80a773779cffbf7ef0c6f662ce16566a8014e7b8c242ff89dde5"
            },
            "downloads": -1,
            "filename": "slurmutils-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0e09d7f33abb6b2856d8f4899f76261",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26163,
            "upload_time": "2024-02-08T03:52:58",
            "upload_time_iso_8601": "2024-02-08T03:52:58.520440Z",
            "url": "https://files.pythonhosted.org/packages/3c/1d/c4537927c0b6010a0eb15b1cbe6e7bb90ac09c53f555a646a76e41573d89/slurmutils-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "900022137185f4786c2781f3f010c5b0c9345105d6f1b95727d67f8332725e78",
                "md5": "e11f466c4ebf561a0d6dde9b7cb90807",
                "sha256": "faee5934987b8d449d76b59aa9b078c77f3eb161ea5704a1e9e22d41d8a399da"
            },
            "downloads": -1,
            "filename": "slurmutils-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e11f466c4ebf561a0d6dde9b7cb90807",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 21251,
            "upload_time": "2024-02-08T03:53:00",
            "upload_time_iso_8601": "2024-02-08T03:53:00.155551Z",
            "url": "https://files.pythonhosted.org/packages/90/00/22137185f4786c2781f3f010c5b0c9345105d6f1b95727d67f8332725e78/slurmutils-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-08 03:53:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "canonical",
    "github_project": "slurmutils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "slurmutils"
}
        
Elapsed time: 0.17578s