mirror of
https://github.com/gryf/mistral-evacuate.git
synced 2026-02-07 08:45:48 +01:00
d29e2d2f9ebf9787e63edea1785a42641b755fe9
Signed-off-by: Dawid Deja <dawid.deja@intel.com>
This is a PoC for providing automatic evacuation for VMs in OpenStack cloud using Mistral.
Installation
Copy filter_vm_action.py and evacuate_vm_action.py to the place reachable by python interpreter - see PYTHONPATH or sys.path for reference.
Append lines
[entry_points] mistral.actions = … custom.filter_vm = filter_vm_action:FilterVmAction custom.evacuate = evacuate_vm_action:EvacuateVmActionto setup.cfg file under Mistral repository
Run db-sync tool via either
$ tools/sync_db.sh --config-file <path-to-config>or
$ mistral-db-manage --config-file <path-to-config> populateRegister Mistral workflow:
$ mistral workflow-create host-evacuate.yamlCreate JSON file with content similar to:
{ "search_opts": { "host": "compute-hostanme" } }Trigger the action via:
$ mistral execution-create host-evacuate input.jsonwhere input.json is a file created in previous step.
Description
Languages
Python
100%