ACCRE Python adminstrative library

The ACCRE python adminstrative library aims to centralize common functionality into a single codebase for better reuse, testing, and maintenance of common patterns in administrative scripts.

The library also provides command line tools for interfacing with systems specific to or customized for ACCRE, as well as “bots” that can be run as cronjobs to help automate account creation and other routine tasks. A monitoring command framework is provided that allows for nagios-compatible NRPE checks which can log alerts in additional places such as slack and elasticsearch.

A structure for an administrative SQL database is provided that may contain general purpose tables related to cluster state and administration not provided by other systems. It also serves as a source of truth for account information, providing a history and specifics on how each account should be rendered to LDAP and Slurm.

The Administrative Database

The structure of the adminstrative database and a client for interacting with it with commonly used queries is provided in accre.database. Additionally, this library provides an “accre-db” cli tool that accepts a variety of subcommands to retrive information or update cluster users and groups. For many of these subcommands, a “–repair” flag can be given to automatically update the state of the entity in LDAP and Slurm to match what is in the database. A “–logs” flag can often be used to print the log entries associated with the user, which may show RT tickets and dates and reasoning when changes were made.

The Account Management Wiki Page <> has detailed information on the structure of the database and the use of database commands.

API Reference

Indices and tables