gryf / mistral-evacuate

PoC for providing automatic evacuation for VMs in OpenStack cloud using Mistral

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mistral evacuate plugin

This is a PoC for providing automatic evacuation for VMs in OpenStack cloud using Mistral. It uses flavor extra specs and VM metadata to tell if given instance should be evacuated. Extra spec is 'evacuation:evacuate' and VM metadata is 'evacuate'. If one of them is set to True, instance will be evacuated.

Installation

  1. Copy filter_vm_action.py and evacuate_vm_action.py to the place reachable by python interpreter -see PYTHONPATH or sys.path for reference.
  2. Append lines

    to setup.cfg file under Mistral repository

  3. Run db-sync tool via either

    $ tools/sync_db.sh --config-file <path-to-config>

    or

    $ mistral-db-manage --config-file <path-to-config> populate
  4. Register Mistral workflow:

    $ mistral workflow-create host-evacuate.yaml
  5. Create JSON file with content similar to:

  6. Trigger the action via:

    $ mistral execution-create host-evacuate input.json

    where input.json is a file created in previous step.

About

PoC for providing automatic evacuation for VMs in OpenStack cloud using Mistral


Languages

Language:Python 100.0%