condor-config-hook
Hook to dynamically configure an HTCondor node from a git repository.
Hook Overview
The hook is integrated into a Condor config file to perform the following workflow:
Fetch a git repository to a local cache
Use patterns to select configuration files
Dynamically include configuration in condor
To integrate the hook, use the include command syntax in any HTCondor config file:
include command : condor-git-config https://git.mydomain.com/condor-repos/condor-configs.git
Usage Notes
The hook requires at least Python 3.6 to run. A list of options is available by passing -h or --help to the executable.
Installation
Installation provides the condor-git-config executable. All other dependencies are installed automatically.
Stable release version
pip3 install condor_git_config
Current development version
pip3 install git+https://github.com/MatterMiners/condor-git-config.git
We recommend to install the hook to a virtual environment. However, the hook is simple enough to not disturb global environments.
Configuration Selection
By default, condor-git-config will not recurse into sub-directories. Only top-level files that end in .cfg are included automatically.
Which files to use can be controlled by arguments that provide regular expression patterns to include/exclude files and whether to recurse into directories.
In addition, an HTCondor macro is created that points to the root path of the cache. This allows top-level files to easily include: files from sub-directories.
Conditional Inclusion
Use --blacklist to exclude files by relative name and --whitelist to add exceptions to blacklisted names.
This allows you to have additional configuration, which is conditionally integrated. For example, consider the following git repository tree:
|- commong.cfg
|- security.cfg
|- aaaron-cloud.cfg
|- aaaron-cloud/
| |- overwrites.cfg
| |- proxy.cfg
|- beebee-cloud.cfg
The aaaron-cloud folder will be ignored by default. You can conditionally include the *-cloud.cfg files like this:
--blacklist '.*-cloud\.cfg' --whitelist 'aaaron-cloud\.cfg'
This allows you to further include the files in aaaron-cloud by using include in aaaron-cloud.cfg:
# aaaron-cloud.cfg
include : $(GIT_CONFIG_CACHE_PATH)/aaaron-cloud/overwrites.cfg
include : $(GIT_CONFIG_CACHE_PATH)/aaaron-cloud/proxy.cfg
This pattern is especially useful when the whitelist is set dynamically, e.g. by using an argument file that contains the domain name.
Argument Files
The condor-git-config executable can use the @ prefix character to read arguments from files. This allows you to prepare options externally
$ cat /etc/condor-git-config/branch
--branch
aaaron-cloud
and have them used dynamically to adjust configuration
include command : condor-git-config @/etc/condor-git-config/branch -- https://git.mydomain.com/condor-repos/condor-configs.git
Metadata
Release files for condor-git-config 0.1.5
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 |
|---|---|---|---|---|
| condor_git_config-0.1.5.tar.gz | 5.2 kB | Without provenance | Details for condor_git_config-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| condor_git_config-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for condor_git_config-0.1.5-py3-none-any.whl |
Total release size: 11.0 kB
Release files / condor_git_config-0.1.5.tar.gz
| Download URL | condor_git_config-0.1.5.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25e9f7604bed7c41358a44cd3c7eefdeb1612ef2721f3658480fe48e781c738e
|
|
BLAKE2b-256 checksum How to use checksums |
4b9b022603f7afbd23149eca86072531b9b0f4bf0dbcf23d44e920ec2bd675f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Release files / condor_git_config-0.1.5-py3-none-any.whl
| Download URL | condor_git_config-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47776fcdc2898038b01ffe0a258347edd612fc996608be118cc289222d66e5b6
|
|
BLAKE2b-256 checksum How to use checksums |
dbe82e5b1f58b32c465c201ed6f1fdf46b0578c6b7266633af8e8343601df009
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Security for condor-git-config 0.1.5
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.