Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
feat!: overhaul slurmrestd charm API
Browse files Browse the repository at this point in the history
Merge pull request #19 from jamesbeedy/slurm_config_editor_preparation

Summary of Changes:

- remove jinja2 and replace with `Path().write_text()`
- remove slurm-ops-manager 3rd party dep and replace with local slurmrestd_ops.py
- consolidate the yaml files into a single charmcraft.yaml
- rename interface slurmrestd -> slurmctld
- cleanup from PR review
- remove unused code
- addeded logging
- simplified api
- reduced code footprint
- consolidated yaml files into charmcraft.yaml
- added type checking

BREAKING CHANGES: No longer compatible with the Slurm charm API version published to the edge branch on CharmHub. Testing will need to be manual.
  • Loading branch information
NucciTheBoss authored Jun 28, 2024
2 parents 126db64 + 1c4432e commit 81c9d6c
Show file tree
Hide file tree
Showing 19 changed files with 2,188 additions and 789 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: woke
uses: get-woke/woke-action@v0
with:
Expand All @@ -35,18 +35,29 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
- name: Run linters
run: tox -e lint

type:
name: Type checking
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
- name: Run tests
run: tox -e type

unit-test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install tox
- name: Run tests
Expand All @@ -63,10 +74,11 @@ jobs:
needs:
- inclusive-naming-check
- lint
- type
- unit-test
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ $ juju deploy slurmd --channel edge
$ juju deploy slurmdbd --channel edge
$ juju deploy mysql --channel 8.0/edge
$ juju deploy mysql-router slurmdbd-mysql-router --channel dpe/edge
$ juju integrate slurmctld:slurmrestd slurmrestd:slurmrestd
$ juju integrate slurmctld:slurmd slurmd:slurmd
$ 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
$ juju integrate slurmctld:slurmdbd slurmdbd:slurmdbd
```

## Project & Community
Expand Down
45 changes: 25 additions & 20 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# Copyright 2020 Omnivector Solutions, LLC.
# Copyright 2020-2024 Omnivector, LLC.
# See LICENSE file for licensing details.

name: slurmrestd
summary: |
Interface to Slurm via REST API.
description: |
This charm provides slurmrestd, munged, and the bindings to other utilities
that make lifecycle operations a breeze.
slurmrestd is a REST API interface for SLURM.
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

provides:
slurmctld:
interface: slurmrestd
limit: 1

assumes:
- juju

type: charm
bases:
- build-on:
Expand All @@ -10,22 +34,3 @@ bases:
- name: ubuntu
channel: "22.04"
architectures: [amd64]

parts:
charm:
build-packages: [git]
charm-python-packages: [setuptools]

# Create a version file and pack it into the charm. This is dynamically generated
# as part of the build process for a charm to ensure that the git revision of the
# charm is always recorded in this version file.
version-file:
plugin: nil
build-packages:
- git
override-build: |
VERSION=$(git -C $CRAFT_PART_SRC/../../charm/src describe --dirty --always)
echo "Setting version to $VERSION"
echo $VERSION > $CRAFT_PART_INSTALL/version
stage:
- version
15 changes: 0 additions & 15 deletions config.yaml

This file was deleted.

203 changes: 0 additions & 203 deletions lib/charms/fluentbit/v0/fluentbit.py

This file was deleted.

Loading

0 comments on commit 81c9d6c

Please sign in to comment.