Skip to main content

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)

Source distribution for condor-git-config 0.1.5
File Size Uploaded
condor_git_config-0.1.5.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for condor-git-config 0.1.5
File Interpreter ABI Platform
condor_git_config-0.1.5-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page