Skip to main content

inotify based managment system

Project description

A Runner/Manager of plugins that perform work in response to filesystem events

The intended usage of this is to manage creation/deletion of containers by symlinking into a ‘containers-enabled’ directory

Starting the App

Igor is relativly simple and in most cases cna be run without arguments. -v can be specified multiple times to increase the verbosity of logging to stdout and -c can be used to override the default config file

example:

$ igor

igor also understand/can override the default config dirs with the 2 following environment variables

  • IGOR_CONFIG_DIR: The directory to look for config files in

  • IGOR_CONFIG: The full path to igor’s config file. If this is not specified, igor looks for ‘igor.conf’ in IGOR_CONFIG_DIR

To get a list of all possible environment variables that can be set, use the following command:

$ python -m igor.consts

Plugins

Plugins are defined in a config file ending in *.conf in the IGOR_CONFIG_DIR. These files are a yaml file with at least 2 keys:

  • name: The name of the plugin, mainly used for logging

  • plugin: The path to the plugin in the form path/to/module/on/the/filesystem[:name of the setup function] where the name of the setup function is optional and defaults to ‘setup’

In a plugin there exists a single setup function that takes 3 arguments, a config, a logger and a way to generate inotify instances

  • config: The Yaml config file that defines this plugin as python objects including the ‘name’ and ‘plugin’ as defined above. any extra keys in the config file automatically get passed in via config.

  • logger: logging.getLogger instance that has been set up for this plugin with the correct logging policy applied

  • inotify: Takes a callable and returns a butter.inotify.Inotify instance that allows the adding of watches (listening for events is done by igor). The callable provided is called on each inotify event and is given a butter.inotify.InotifyEvent object

for an example of how this works, take a look at ‘inotify.py’ and ‘inotify.conf’ in example_fs

Project details


Download files

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

Source Distributions

igor-inotify-0.4.zip (12.2 kB view details)

Uploaded Source

igor-inotify-0.4.tar.bz2 (5.6 kB view details)

Uploaded Source

File details

Details for the file igor-inotify-0.4.zip.

File metadata

  • Download URL: igor-inotify-0.4.zip
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for igor-inotify-0.4.zip
Algorithm Hash digest
SHA256 1527b55b594c6f5ef12add0ddd8f165d45a3e0f6d7faeff69ab086c02db2ce6e
MD5 827626691f5530e3e8b2e49e49bfb867
BLAKE2b-256 1300886731d94615d91c030758ff5227d72247028a818dc0c48dca762bccdfa7

See more details on using hashes here.

File details

Details for the file igor-inotify-0.4.tar.bz2.

File metadata

File hashes

Hashes for igor-inotify-0.4.tar.bz2
Algorithm Hash digest
SHA256 8f687a50c19db03264cc1e528cf38667c58cbf63c3e0a35295e42e4113fa0fff
MD5 a3e254ceedfd989cb2fbe900e5553895
BLAKE2b-256 b8dc46400669124c02debc8a93ab63e11f0f67addc6632fa581861fde0b5a623

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page