Client definition of workflows
Operators should be able to easily define a new workflow, based on existing workflow logic; this bottoms out to the supporting plugin support.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Jim Baker
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Configurable aspects for each workflow:
* roles for this workflow (coresponds to keys, but also includes r/w permissions)
* keys used by this workflow - input/output - defaults to the name of the workflow
* scheduling strategy - example: 'aisle,cabinet'
* some sort of packaging, including specific support for OSA; as well as things we need to push down to tooling like Ansible, eg
* the user do the OSA security audit ('root')
* packaging config variables
* (optional) performance data to help scheduling strategy
We should consider how to make this streamlined for one-off examples, such as running a bash script; and ensuring all necessary dependencies are packaged.
from cratonclient.v1 import make_session, inventory
session = make_session(...) # or use CRATON_* environ variables...
osa_base = inventory.
wf = osa_base.
wf.strategy = 'aisle,cabinet'
wf.isolate_
wf.repo = 'git://
wf.ansible_playbook = {
'name': 'Run openstack-
'user': 'root',
'roles': ['openstack-
# From
# http://
wf.variables[
wf.save()