Features
ondemandutils is a collection of various utilities and APIs to make it easier
for you and your friends to interface with Open OnDemand, especially if you
are orchestrating the deployment of new Open OnDemand. Gone are the days of
seething over incomplete Jinja2 templates or misconfigured YAML documents.
Current utilities and APIs shipped in the ondemandutils package include:
from ondemandutils.editors import ...
ood_portal: An editor ood_portal.yml configuration files.nginx_stage: An editor for nginx_stage.yml configuration files.
Installation
Option 1: Install from PyPI
$ python3 -m pip install ondemandutils
Option 2: Install from source
We use the Poetry packaging and dependency manager to
manage this project. It must be installed on your system if installing ondemandutils
from source.
$ git clone https://github.com/charmed-hpc/ondemandutils.git
$ cd ondemandutils
$ poetry install
Usage
Editors
ood_portal
This module provides an API for editing ood_portal.yml configuration files, creating them if they do not exist. Here's some common Open OnDemand lifecycle management operations you can perform using this editor:
Edit a pre-existing ood_portal.yml configuration file
from ondemandutils.editors import ood_portal
# Open, edit, and save the ood_portal.yml file located at /etc/ood/config/ood_portal.yaml.
with ood_portal.edit("/etc/ood/config/ood_portal.yaml") as config:
config.servername = "ondemand-testing"
config.server_aliases = []
config.ssl = None
config.public_root = "/var/snap/ondemand/common/var/www/public"
config.log_root = "/var/snap/ondemand/common/var/logs/ondemand"
config.pun_stage_cmd = "sudo /snap/ondemand/current/nginx_stage/sbin/nginx_stage"
Add Dex configuration to the ood_portal.yml configuration file
from ondemandutils.editors import ood_portal
from ondemandutils.models import DexConfig
with ood_portal.edit("/etc/ood/config/ood_portal.yaml") as config:
dex = DexConfig(
http_port = 5556,
tls_cert = "/var/snap/ondemand/common/tls.cert",
tls_key = "/var/snap/ondemand/common/tls.secret",
)
config.dex = dex
nginx_stage
This module provides and API for editing nginx_stage.yml configuration files, creating them if they do not exist. Here's some common nginx operations you can perform on the nginx_stage.yml configuration file using this editor:
Edit a pre-existing nginx_stage.yml configuration file
from ondemandutils.editors import nginx_stage
with nginx_stage.edit("/etc/ood/config/nginx_stage.yml") as config:
config.pun_access_log_path = "/var/snap/ondemand/common/var/log/nginx/%{user}/access.log"
config.pun_error_log_path = "/var/snap/ondemand/common/var/log/nginx/%{user}/error.log"
config.passenger_ruby = "/snap/ondemand/common/usr/bin/ruby"
config.passenger_nodejs = "/snap/ondemand/common/bin/node"
config.passenger_root = "/snap/ondemand/current/opt/passenger/locations.ini"
config.disable_bundle_user_config = False
config.pun_custom_env_declarations = ["CPATH"]
Project & Community
The ondemandutils package is a project of the
Ubuntu HPC community.
It is an open-source project that is welcome to community involvement, contributions, suggestions, fixes,
and constructive feedback. Interested in being involved with the development of ondemandutils?
Check out these links below:
License
The ondemandutils package is free software, distributed under the GNU Lesser General Public License, v3.0.
See the LICENSE file for more information.
Metadata
Release files for ondemandutils 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ondemandutils-0.2.0.tar.gz | 12.0 kB | Without provenance | Details for ondemandutils-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ondemandutils-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for ondemandutils-0.2.0-py3-none-any.whl |
Total release size: 28.8 kB
Release files / ondemandutils-0.2.0.tar.gz
| Download URL | ondemandutils-0.2.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a7413dac120a40af29da11a44a50957e852841def251bd9904f648c0d72b59f0
|
|
BLAKE2b-256 checksum How to use checksums |
aed4fc1ff5dc25e322411c97ae31060a27e2a4b3e508239d846e1c2551cd3a98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.6 Linux/6.5.0-21-generic
|
Release files / ondemandutils-0.2.0-py3-none-any.whl
| Download URL | ondemandutils-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4487b82c8f2cd9ce2f3b8e83f17093d78820f442b45f039305e72431d37c4817
|
|
BLAKE2b-256 checksum How to use checksums |
ade7be7a58790d900af478e84d726e1a2a6bcaededad46ed9c861a3528631e26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.6 Linux/6.5.0-21-generic
|
Security for ondemandutils 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.