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

Commit

Permalink
project cleanup
Browse files Browse the repository at this point in the history
These changes improve the slurmdbd charm in a number of ways.

1) remove slurm-ops-manager
2) remove unused code
3) emit relation data to the charm via events
4) remove dependency on slurmctld
5) general code cleanup
6) consolidate yaml files into charmcraft.yaml
7) add type tests
8) rename interface slurmdbd -> slurmctld
9) update readme

Address feedback from PR review.

* add package managers for each package, slurmdbd and munge
* address docstring issues
* move constants to constants.py
* address test failure
* pin requirements
* install funtions handle failure cases
* upgrade to checkout action v4
  • Loading branch information
jamesbeedy committed Jun 24, 2024
1 parent 43c4eac commit cb000c8
Show file tree
Hide file tree
Showing 25 changed files with 5,041 additions and 2,903 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: Run tests
uses: get-woke/woke-action@v0
with:
Expand All @@ -34,7 +34,7 @@ jobs:
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 linters
Expand All @@ -45,12 +45,23 @@ jobs:
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
run: tox -e unit

type-check:
name: Type check
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

integration-test:
strategy:
fail-fast: true
Expand All @@ -62,10 +73,11 @@ jobs:
needs:
- inclusive-naming-check
- lint
- type-check
- 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ __pycache__/
.idea
.vscode/
version
.ruff_cache/
.mypy_cache/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ $ 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:slurmd slurmd:slurmd
$ juju integrate slurmctld:slurmd slurmd:slurmctld
$ juju integrate slurmctld:slurmdbd slurmdbd: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
56 changes: 35 additions & 21 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
# Copyright 2020 Omnivector Solutions, LLC.
# Copyright 2020-2024 Omnivector, LLC.
# See LICENSE file for licensing details.

name: slurmdbd
type: charm

assumes:
- juju

summary: |
Slurm DBD accounting daemon.
description: |
This charm provides slurmdbd, munged, and the bindings to other utilities
that make lifecycle operations a breeze.
slurmdbd provides a secure enterprise-wide interface to a database for
SLURM. This is particularly useful for archiving accounting records.
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

requires:
database:
interface: mysql_client
fluentbit:
interface: fluentbit

provides:
slurmctld:
interface: slurmdbd

bases:
- build-on:
- name: ubuntu
Expand All @@ -10,22 +43,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
23 changes: 0 additions & 23 deletions config.yaml

This file was deleted.

Loading

0 comments on commit cb000c8

Please sign in to comment.