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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

condor_git_config-0.1.5.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

condor_git_config-0.1.5-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file condor_git_config-0.1.5.tar.gz.

File metadata

  • Download URL: condor_git_config-0.1.5.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for condor_git_config-0.1.5.tar.gz
Algorithm Hash digest
SHA256 25e9f7604bed7c41358a44cd3c7eefdeb1612ef2721f3658480fe48e781c738e
MD5 070c279f3adc358ea37e12f1a31ef724
BLAKE2b-256 4b9b022603f7afbd23149eca86072531b9b0f4bf0dbcf23d44e920ec2bd675f9

See more details on using hashes here.

File details

Details for the file condor_git_config-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: condor_git_config-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for condor_git_config-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 47776fcdc2898038b01ffe0a258347edd612fc996608be118cc289222d66e5b6
MD5 2dcfa96446f97fd2b277f51aef782366
BLAKE2b-256 dbe82e5b1f58b32c465c201ed6f1fdf46b0578c6b7266633af8e8343601df009

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page