diff --git a/README.md b/README.md new file mode 100644 index 0000000..2dbb4f5 --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# Slurm charms + +[Juju](https://juju.is) charms for automating the Day 0 to Day 2 operations of the [Slurm workload manager](https://slurm.schedmd.com/overview.html) ⚖️🐧 + +[![CI](https://github.com/charmed-hpc/slurm-charms/actions/workflows/ci.yaml/badge.svg)](https://github.com/charmed-hpc/slurm-charms/actions/workflows/ci.yaml/badge.svg) +[![Release](https://github.com/charmed-hpc/slurm-charms/actions/workflows/release.yaml/badge.svg)](https://github.com/charmed-hpc/slurm-charms/actions/workflows/release.yaml/badge.svg) +[![Matrix](https://img.shields.io/matrix/ubuntu-hpc%3Amatrix.org?logo=matrix&label=ubuntu-hpc)](https://matrix.to/#/#hpc:ubuntu.com) + +The `slurm-charms` repository is a collection of charmed operators that enables you to easily deploy, configure, and manage the Slurm workload manager. +Here's the current charms in the collection: + +- [`slurmctld`](./charms/slurmctld/): the central management daemon for Slurm. +- [`slurmd`](./charms/slurmd): the compute node daemon for Slurm. +- [`slurmdbd`](./charms/slurmdbd): the database daemon for Slurm. +- [`slurmrestd`](./charms/slurmrestd/): the REST API interface to Slurm. + +## ✨ Getting started + +To deploy the Slurm charms from [Charmhub](https://charmhub.io), you must be using Juju 3.x or greater. + +```shell +juju deploy slurmctld --channel edge +juju deploy slurmd --channel edge +juju deploy slurmdbd --channel edge +juju deploy slurmrestd --channel edge +juju deploy mysql --channel 8.0/stable +juju deploy mysql-router slurmdbd-mysql-router --channel dpe/edge + +juju integrate slurmctld:slurmd slurmd:slurmctld +juju integrate slurmctld:slurmdbd slurmdbd:slurmctld +juju integrate slurmctld:slurmrestd slurmrestd:slurmctld +juju integrate slurmdbd-mysql-router:backend-database mysql:database +juju integrate slurmdbd:database slurmdbd-mysql-router:database +``` + +## 🤔 What's next? + +If you want to learn more about all the things you can do with the Slurm charms, here are some resources for you to explore: + +* [Documentation](https://canonical-charmed-hpc.readthedocs-hosted.com/en/latest) +* [Open an issue](https://github.com/charmed-hpc/slurm-charms/issues/new?title=ISSUE+TITLE&body=*Please+describe+your+issue*) +* [Ask a question on Github](https://github.com/orgs/charmed-hpc/discussions/categories/q-a) + +## 🛠️ Development + +The project uses [tox](tox.wiki) as its command runner, which provides some useful commands that +will definitely help while hacking on the charms: + +```shell +tox run -e fmt # Apply formatting standards to code. +tox run -e lint # Check code against coding style standards. +tox run -e type # Type checking. +tox run -e unit # Run unit tests. +``` + +We also have some integration tests in place, but be aware that it requires a fairly good amount +of computer resources to run them. We usually test with at least 4 cores and 16 GB of RAM, but feel +free to experiment! + +```shell +tox run -e integration +``` + +If you're interested in contributing, take a look at our [contributing guidelines](./CONTRIBUTING.md). + +## 🤝 Project and Community + +The Slurm charms are a project of the [Ubuntu High-Performance Computing community](https://ubuntu.com/community/governance/teams/hpc). +Interested in contributing bug fixes, patches, documentation, or feedback? Want to join the Ubuntu HPC community? You’ve come to the right place 🤩 + +Here’s some links to help you get started with joining the community: + +* [Ubuntu Code of Conduct](https://ubuntu.com/community/ethos/code-of-conduct) +* [Contributing guidelines](./CONTRIBUTING.md) +* [Join the conversation on Matrix](https://matrix.to/#/#hpc:ubuntu.com) +* [Get the latest news on Discourse](https://discourse.ubuntu.com/c/hpc/151) +* [Ask and answer questions on GitHub](https://github.com/orgs/charmed-hpc/discussions/categories/q-a) + +## 📋 License + +The Slurm charms are free software, distributed under the Apache Software License, version 2.0. +See the [Apache-2.0 LICENSE](./LICENSE) file for further details. + +The Slurm workload manager is licensed under the GNU General Public License, version 2, or any later version. +See Slurm's [legal notice](https://slurm.schedmd.com/disclaimer.html) for further licensing information about Slurm. diff --git a/charms/slurmctld/charmcraft.yaml b/charms/slurmctld/charmcraft.yaml index f8e2fd8..81679c5 100644 --- a/charms/slurmctld/charmcraft.yaml +++ b/charms/slurmctld/charmcraft.yaml @@ -17,10 +17,10 @@ links: contact: https://matrix.to/#/#hpc:ubuntu.com issues: - - https://github.com/charmed-hpc/slurmctld-operator/issues + - https://github.com/charmed-hpc/slurm-charms/issues source: - - https://github.com/charmed-hpc/slurmctld-operator + - https://github.com/charmed-hpc/slurm-charms requires: slurmd: @@ -51,7 +51,7 @@ config: default: osd-cluster description: | Name to be recorded in database for jobs from this cluster. - + This is important if a single database is used to record information from multiple Slurm-managed clusters. @@ -67,7 +67,7 @@ config: default: "" description: | User supplied Slurm configuration as a multiline string. - + Example usage: $ juju config slurmcltd slurm-conf-parameters="$(cat additional.conf)" @@ -78,13 +78,13 @@ config: ConstrainCores=yes description: | User supplied configuration for `cgroup.conf`. - + health-check-params: default: "" type: string description: | Extra parameters for NHC command. - + This option can be used to customize how NHC is called, e.g. to send an e-mail to an admin when NHC detects an error set this value to. `-M admin@domain.com`. @@ -103,7 +103,7 @@ actions: show-current-config: description: | Display the currently used `slurm.conf`. - + Example usage: ```bash @@ -114,7 +114,7 @@ actions: drain: description: | Drain specified nodes. - + Example usage: $ juju run slurmctld/leader drain nodename="node-[1,2]" reason="Updating kernel" params: @@ -130,10 +130,10 @@ actions: resume: description: | Resume specified nodes. - + Note: Newly added nodes will remain in the `down` state until configured, with the `node-configured` action. - + Example usage: $ juju run slurmctld/leader resume nodename="node-[1,2]" params: nodename: diff --git a/charms/slurmd/charmcraft.yaml b/charms/slurmd/charmcraft.yaml index 1af8322..a3f5a00 100644 --- a/charms/slurmd/charmcraft.yaml +++ b/charms/slurmd/charmcraft.yaml @@ -7,7 +7,7 @@ summary: | description: | This charm provides slurmd, munged, and the bindings to other utilities that make lifecycle operations a breeze. - + slurmd is the compute node daemon of SLURM. It monitors all tasks running on the compute node, accepts work (tasks), launches tasks, and kills running tasks upon request. @@ -15,11 +15,11 @@ description: | links: contact: https://matrix.to/#/#hpc:ubuntu.com - issues: - - https://github.com/charmed-hpc/slurmd-operator/issues + issues: + - https://github.com/charmed-hpc/slurm-charms/issues source: - - https://github.com/charmed-hpc/slurmd-operator + - https://github.com/charmed-hpc/slurm-charms assumes: - juju @@ -59,8 +59,8 @@ config: Additional partition configuration parameters, specified as a space separated `key=value` in a single line. Find a list of all possible partition configuration parameters [here](https://slurm.schedmd.com/slurm.conf.html#SECTION_PARTITION-CONFIGURATION). - - + + Example usage: ```bash $ juju config slurmd partition-config="DefaultTime=45:00 MaxTime=1:00:00" diff --git a/charms/slurmdbd/charmcraft.yaml b/charms/slurmdbd/charmcraft.yaml index a9cd3a3..35790f7 100644 --- a/charms/slurmdbd/charmcraft.yaml +++ b/charms/slurmdbd/charmcraft.yaml @@ -19,11 +19,11 @@ description: | links: contact: https://matrix.to/#/#hpc:ubuntu.com - source: - - https://github.com/omnivector-solutions/slurmdbd-operator - issues: - - https://github.com/omnivector-solutions/slurmdbd-operator/issues + - https://github.com/charmed-hpc/slurm-charms/issues + + source: + - https://github.com/charmed-hpc/slurm-charms requires: database: diff --git a/charms/slurmrestd/charmcraft.yaml b/charms/slurmrestd/charmcraft.yaml index ab31126..d90d202 100644 --- a/charms/slurmrestd/charmcraft.yaml +++ b/charms/slurmrestd/charmcraft.yaml @@ -12,10 +12,12 @@ description: | links: contact: https://matrix.to/#/#hpc:ubuntu.com - source: - - https://github.com/omnivector-solutions/slurmrestd-operator + issues: - - https://github.com/omnivector-solutions/slurmrestd-operator/issues + - https://github.com/charmed-hpc/slurm-charms/issues + + source: + - https://github.com/charmed-hpc/slurm-charms provides: slurmctld: diff --git a/repository.py b/repository.py index f7033fe..29ced54 100755 --- a/repository.py +++ b/repository.py @@ -258,7 +258,7 @@ def main_cli(): fetch_lib_parser.add_argument("libraries", type=str, nargs="*", help="Libraries to fetch.") fetch_lib_parser.set_defaults(func=fetch_lib_cli) - fmt_parser = subparsers.add_parser("fmt", help="Apply correct formatting to code") + fmt_parser = subparsers.add_parser("fmt", help="Apply formatting standards to code.") fmt_parser.set_defaults(func=fmt_cli) lint_parser = subparsers.add_parser("lint", help="Check code against coding style standards") @@ -417,7 +417,7 @@ def fmt_cli( slurm_charms: [str], **kwargs, ): - """Apply correct formatting to code.""" + """Apply formatting standards to code. """ files = get_source_dirs(slurm_charms) files.append(str(ROOT_DIR / "tests")) logging.info(f"Running black for directories {files}") diff --git a/tox.ini b/tox.ini index e05a447..91c0d58 100644 --- a/tox.ini +++ b/tox.ini @@ -44,7 +44,7 @@ commands = python3 {toxinidir}/repository.py -v clean {posargs} [testenv:fmt] -description = Apply correct formatting to code. +description = Apply formatting standards to code. basepython = python3 deps = pyyaml