1
0
mirror of https://github.com/gryf/mistral-evacuate.git synced 2026-02-08 09:25:46 +01:00
Files
mistral-evacuate/README.rst
Dawid Deja 44c00b9ca4 Separate geting flavors and filtering into separe tasks
Also minimalize numbers of calls to nova API

Signed-off-by: Dawid Deja <dawid.deja@intel.com>
2016-02-03 18:24:07 +01:00

1.4 KiB

This is a PoC for providing automatic evacuation for VMs in OpenStack cloud using Mistral.

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

    [entry_points]
    mistral.actions =
        
        custom.filter_vm = filter_vm_action:FilterVmAction
        custom.find_flavors = find_flavors_by_extra_spec:FindFlavorsByExtraSpecs

    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:

    {
        "search_opts": {
            "host": "compute-hostanme"
        },
        "on_shared_storage": false,
        "flavor_extra_specs": {
            "evacuation:evacuate": true
        }
    }
  6. Trigger the action via:

    $ mistral execution-create host-evacuate input.json

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