This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Introduction

The evasion project allows the creation of programs from configuration.

This is achieved by loading “controller sections” from configuration. A controller is a Python package or module that provides some functionality. It is given all the configuration inside its section. The evasion-director manages controllers in a similar fashion to init.d on linux. The evasion director starts up and loads each of the sections.

The most common evasion-director controller used is the evasion agency. This manages “agents”. An agent is a Python package or Module. Agents are used to control hardware devices or services. The agency provides a device tree of nodes which can be referred to in an abstract fashion.

Message passing between Controllers, Agents and all interested parties can be done using the evasion-messenger. This project part is currently being rewritten to use ZeroMQ. Old versions used a combination of PyDispatch, Stomp, Morbid Broker and Twisted. This messaging is entirely optional.

Note: The evasion-agency project has been merged with the director code base. The “evasion.agency” package is now provided by the evasion-director code base.

Github:

Other Docs

I’m in the process of bring together various documents. For the moment information can be found here:

Basic Examples

Simplest configuration

The most basic example is using the minimal configuration “app.ini”:

[director]
messaging = 'no'

This can then be run from the command line:

$ director --config app.ini
evasion.director.manager.Manager INFO main: running.
evasion.director.manager.Manager INFO controllerSetup: loading controllers from config.
evasion.director.manager.Manager INFO controllerSetup: 1 controller(s) recovered.
evasion.director.manager.Manager WARNING Ctrl-C, Exiting.
$

The only controller load is the “director” controller. This isn’t very useful as nothing is run.

Run a program

You can run and manage any type of program using the commandline controller. For example:

[director]
messaging = 'no'

[command_line_example]
# Set this to 'yes' to stop this controller from being used.
disabled = 'no'

# This is optional and allows the order in which controllers are started
# to be set.
order = 1

# Where the "Controller" class is to be found.
controller = 'evasion.director.controllers.commandline'

# The command line specific options:
#
# The command to run.
command = 'ls'
# Where the command is to be run from.
workingdir = '/tmp'

Running this configuration gets:

$ director --config app.ini
root WARNING No valid logging found in configuration. Using console logging.
evasion.director.manager.Manager INFO main: running.
evasion.director.manager.Manager INFO controllerSetup: loading controllers from config.
evasion.director.manager.Manager INFO controllerSetup: 2 controller(s) recovered.
evasion.director.controllers.commandline DEBUG setUp: command <ls> workingdir </tmp>
evasion.director.manager.Manager INFO appmain: The controller '<Controller: order:1 name:command_line_example disabled:no>' needs to be started.
evasion.director.controllers.commandline INFO start:  'ls' running. PID 87808
evasion.director.manager.Manager INFO appmain: Started ok 'command_line_example'? 'True'
1564b4fc7dd26  ics41562  icssuis1316027648  launch-0FvLcQ  launch-7vMUyC  launch-9uZ0bO  launch-ASdWau  launch-RUjEPx  launchd-460.ZFsfn1
evasion.director.manager.Manager INFO appmain: The controller '<Controller: order:1 name:command_line_example disabled:no>' needs to be started.
evasion.director.controllers.commandline INFO start:  'ls' running. PID 87809
evasion.director.manager.Manager INFO appmain: Started ok 'command_line_example'? 'True'
1564b4fc7dd26  ics41562  icssuis1316027648  launch-0FvLcQ  launch-7vMUyC  launch-9uZ0bO  launch-ASdWau  launch-RUjEPx  launchd-460.ZFsfn1
evasion.director.manager.Manager INFO appmain: The controller '<Controller: order:1 name:command_line_example disabled:no>' needs to be started.
evasion.director.controllers.commandline INFO start:  'ls' running. PID 87810
evasion.director.manager.Manager INFO appmain: Started ok 'command_line_example'? 'True'
icssuis1316027648  launch-0FvLcQ  launch-7vMUyC  launch-9uZ0bO  launch-ASdWau  launch-RUjEPx  launchd-460.ZFsfn1
evasion.director.manager.Manager WARNING Ctrl-C, Exiting.
evasion.director.controllers.commandline INFO stop: stopping the process PID:'87810' and all its children.
evasion.director.tools.proc INFO kill: pid <87810>
evasion.director.controllers.commandline WARNING pkill: call failure [Errno 3] No such process
$

The director loads the controller sections. Th commandline controller is started. The “ls” command lists the contents of the “/tmp” directory. The output is captured and logged. The director then notices that the command has exited needs running again and the process repeats. The director will keep running all “controllers” that make up the program.

Use the Agency

The minimal Agency configuration is:

[director]
messaging = 'no'

[agency]
#disabled = 'yes'
controller = 'evasion.director.controllers.agencyctrl'

If this is run you would see:

$ director --config ../app.ini
evasion.director.manager.Manager INFO main: running.
evasion.director.manager.Manager INFO controllerSetup: loading controllers from config.
evasion.director.manager.Manager INFO controllerSetup: 2 controller(s) recovered.
evasion.director.controllers.agencyctrl INFO setUp: setting up the agency and recovering agents.
evasion.agency.manager.Manager INFO load: 0 agent(s) present.
evasion.agency.manager.Manager WARNING There are no agents to set up.
evasion.director.controllers.agencyctrl INFO setUp: agents loaded '0'.
evasion.director.manager.Manager INFO appmain: The controller '<Agency: order:2 disabled:no>' needs to be started.
evasion.agency.manager.Manager WARNING There are no agents to start.
evasion.director.manager.Manager INFO appmain: Started ok 'agency'? 'True'
evasion.director.manager.Manager WARNING Ctrl-C, Exiting.
evasion.agency.manager.Manager WARNING There are no agents to stop.
evasion.agency.manager.Manager WARNING There are no agents to tear down.

This loads the agency however there are no agents for it to manage.

If we add the test agent to give the agency something to managed, the configuration would now look like:

[director]
messaging = 'no'

[agency]
#disabled = 'yes'
controller = 'evasion.director.controllers.agencyctrl'

    # indent is convention to visually distinguish agents from controllers.
    [testswipe]
    cat = 'swipe'
    agent = 'evasion.agency.agents.testing.fake'

If this is run you would see:

$ director --config ../app.ini
2012-05-29 17:21:56,674 evasion.director.manager.Manager INFO main: running.
2012-05-29 17:21:56,675 evasion.director.manager.Manager INFO controllerSetup: loading controllers from config.
2012-05-29 17:21:56,711 evasion.director.manager.Manager INFO controllerSetup: 2 controller(s) recovered.
2012-05-29 17:21:56,711 evasion.director.controllers.agencyctrl INFO setUp: setting up the agency and recovering agents.
2012-05-29 17:21:56,712 evasion.agency.manager.Manager INFO load: 1 agent(s) present.
2012-05-29 17:21:56,712 evasion.director.controllers.agencyctrl INFO setUp: agents loaded '1'.
2012-05-29 17:21:56,712 evasion.director.manager.Manager INFO appmain: The controller '<Agency: order:2 disabled:no>' needs to be started.
2012-05-29 17:21:56,712 evasion.director.manager.Manager INFO appmain: Started ok 'agency'? 'True'
2012-05-29 17:21:58,134 evasion.director.manager.Manager WARNING Ctrl-C, Exiting.
$

Development Process

The source code mangement and release process follows roughly the gitflow process.

Issues

All issues for the other evasion-* project parts should be logged on the evasion-director project.

Release Notes

1.1.6

The evasion-agency repository code has been merged with the evasion-director. What this means in practice is the evasion-director now provides the “evasion.agency” namespace. The director no longer depends on the “evasion-agency”.

1.1.5:

In this release of fixed the issue “default behaviour change: failed controller & agent imports cause exit.”. The director will now exit when a controller raises an exception.

Release History

Release History

1.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
evasion-director-1.1.6.tar.gz (52.9 kB) Copy SHA256 Checksum SHA256 Source May 31, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting