Skip to content

Commit

Permalink
docs: add README and fix charmcraft.yaml links
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 authored and NucciTheBoss committed Aug 9, 2024
1 parent b01288a commit ec25612
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 26 deletions.
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 10 additions & 10 deletions charms/slurmctld/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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)"
Expand All @@ -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 [email protected]`.
Expand All @@ -103,7 +103,7 @@ actions:
show-current-config:
description: |
Display the currently used `slurm.conf`.
Example usage:
```bash
Expand All @@ -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:
Expand All @@ -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:
Expand Down
12 changes: 6 additions & 6 deletions charms/slurmd/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ 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.
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
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions charms/slurmdbd/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 5 additions & 3 deletions charms/slurmrestd/charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ec25612

Please sign in to comment.