fuel-web/tasklib
Dima Shulyak 26832b8771 Remove puppet daemonizing tests
- this test runs very slow on CI, therefore should
  be removed

Change-Id: I33b2be846f79e2d9b7a1607786555c6ceea1e04f
2014-10-16 12:50:04 +03:00
..
tasklib Remove puppet daemonizing tests 2014-10-16 12:50:04 +03:00
.gitignore Tasklib implementation in python 2014-10-15 09:51:15 +03:00
MANIFEST.in Tasklib implementation in python 2014-10-15 09:51:15 +03:00
README.md Tasklib implementation in python 2014-10-15 09:51:15 +03:00
requirements.txt Tasklib implementation in python 2014-10-15 09:51:15 +03:00
setup.py Tasklib implementation in python 2014-10-15 09:51:15 +03:00
test-requirements.txt Tasklib implementation in python 2014-10-15 09:51:15 +03:00
tox.ini Tasklib implementation in python 2014-10-15 09:51:15 +03:00

Tasklib

Tasklib is mediator between different configuration management providers and orchestration mechanism in Fuel.

It will try to cover next areas:

  • part of the plugable fuel architecture See tasklib/tasklib/tests/functional for detailed descriptionof how tasklib plugability will work
  • Control mechanism for tasks in fuel To support different types of workflow we will provide ability to terminate, list all running, stop/pause task
  • Abstraction layer between tasks and orchestration, which will allow easier development and debuging of tasks
  • General reporting solution for tasks

Executions drivers

  • puppet
  • exec

Puppet

Puppet executor supports general metadata for running puppet manifests. Example of such metadata (task.yaml):

type: puppet                        - required
puppet_manifest: file.pp            - default is site.pp
puppet_moduels: /etc/puppet/modules
puppet_options: --debug

All defaults you can find in:

taskcmd conf

It works next way: After task.yaml is found - executor will look for puppet_manifest and run: puppet apply --modulepath=/etc/puppet/modules file.pp with additional options you will provide

Exec

type: exec       - required
cmd: echo 12     - required

will execute any cmd provided as subprocess

EXAMPLES:

taskcmd -c tasklib/tests/functional/conf.yaml conf

taskcmd -c tasklib/tests/functional/conf.yaml list

taskcmd -c tasklib/tests/functional/conf.yaml daemon puppet/sleep taskcmd -c tasklib/tests/functional/conf.yaml status puppet/sleep

taskcmd -c tasklib/tests/functional/conf.yaml run puppet/cmd

taskcmd -c tasklib/tests/functional/conf.yaml run puppet/invalid

HOW TO RUN TESTS:

python setup.py develop pip install -r test-requires.txt

nosetests tasklib/tests

For some functional tests installed puppet is required, so if you dont have puppet - they will be skipped