Virtual Machine High Availability (VMHA) service for OpenStack.
Go to file
shilpa.devharakar d7592cbe25 Register and Document policy in code
Adds below things for the implementation of framework for registering and
using default policy rules.
* Policy-in-code
  The framework for registering and using default policy rules.
  Rules should be defined and returned from a module in
  masakari/policies/, and then added to the list in masakari/policies/__init__.py.
  A new context.can() method has been added for policy enforcement of
  registered rules. It has the same parameters as the enforce() method
  currently being used.
* Add policy sample generation
  The entry point and config file necessary for using the
  oslo.policy sample generation script. It also adds a tox target to
  simplify the usage of it.
* Add policy documentation and sample file
  Documentation and sample file for default policy in code feature.
* Hacking check for policy registration
  It ensures that policy registration happens in the centralized
  masakari/policies/ directory.
* Hacking check for _ENFORCER.enforce()
  Hacking check in order to ensure that only registered policies
  are used for authorization checks _ENFORCER.authorize should be used rather
  than _ENFORCER.enforce.
* Add entry_point for oslo policy scripts
  There are two helper scripts in oslo.policy to help deployers understand
  their policy configuration better. With the setup.cfg entry these can be
  called directly from oslo.policy.

Changes done here are with the reference of [1] at NOVA side
which is contributed by Andrew Laski and Claudiu Belu

[1] https://review.openstack.org/#/q/topic:bp/policy-in-code+project:openstack/nova+status:merged

Change-Id: If885a66d92c31be440d27d6780635800a0b12e3e
2018-07-27 12:15:14 +05:30
api-ref/source Masakari API Specifications 2017-11-27 05:29:45 +00:00
devstack Deploy masakari-api with uwsgi 2018-05-25 00:35:04 -07:00
doc Register and Document policy in code 2018-07-27 12:15:14 +05:30
etc/masakari Register and Document policy in code 2018-07-27 12:15:14 +05:30
masakari Register and Document policy in code 2018-07-27 12:15:14 +05:30
releasenotes Register and Document policy in code 2018-07-27 12:15:14 +05:30
.coveragerc Initial Cookiecutter Commit. 2016-06-28 13:28:27 +09:00
.gitignore Register and Document policy in code 2018-07-27 12:15:14 +05:30
.gitreview Added .gitreview 2016-06-23 06:57:16 +00:00
.mailmap Initial Cookiecutter Commit. 2016-06-28 13:28:27 +09:00
.stestr.conf Switch to using stestr 2018-07-03 12:02:08 -04:00
.testr.conf Initial Cookiecutter Commit. 2016-06-28 13:28:27 +09:00
.zuul.yaml add lower-constraints job 2018-04-20 16:23:35 -04:00
CONTRIBUTING.rst Optimize the link address 2017-06-08 18:37:08 +07:00
HACKING.rst Register and Document policy in code 2018-07-27 12:15:14 +05:30
LICENSE Initial Cookiecutter Commit. 2016-06-28 13:28:27 +09:00
MANIFEST.in Drop MANIFEST.in - it's not needed by pbr 2016-10-13 16:55:15 +05:30
README.rst Merge "Make readme more readable" 2018-04-10 10:06:11 +00:00
babel.cfg Initial Cookiecutter Commit. 2016-06-28 13:28:27 +09:00
lower-constraints.txt Switch to using stestr 2018-07-03 12:02:08 -04:00
requirements.txt Make accept-language tests work with webob 1.8.x 2018-05-20 21:56:28 -07:00
setup.cfg Register and Document policy in code 2018-07-27 12:15:14 +05:30
setup.py Updated from global requirements 2017-04-02 01:04:58 +00:00
test-requirements.txt Switch to using stestr 2018-07-03 12:02:08 -04:00
tox.ini Register and Document policy in code 2018-07-27 12:15:14 +05:30

README.rst

Masakari

Virtual Machine High Availability (VMHA) service for OpenStack

Masakari provides Virtual Machine High Availability (VMHA) service for OpenStack clouds by automatically recovering the KVM-based Virtual Machine(VM)s from failure events such as VM process down, provisioning process down, and nova-compute host failure. It also provides API service for manage and control the automated rescue mechanism.

NOTE: Use masakari only if instance path is configured on shared storage system i.e, 'instances_path' config option of nova has a path of shared directory otherwise instance data will be lost after the evacuation of instance from failed host if, * instance is booted from image * flavor using ephemeral disks is used

Original version of Masakari: https://github.com/ntt-sic/masakari

Tokyo Summit Session: https://www.youtube.com/watch?v=BmjNKceW_9A

Masakari is distributed under the terms of the Apache License, Version 2.0. The full terms and conditions of this license are detailed in the LICENSE file.

Configure masakari-api

  1. Create masakari user:

    openstack user create --password-prompt masakari
    (give password as masakari)
  2. Add admin role to masakari user:

    openstack role add --project service --user masakari admin
  3. Create new service:

    openstack service create --name masakari --description "masakari high availability" masakari
  4. Create endpoint for masakari service:

    openstack endpoint create --region RegionOne masakari --publicurl http://<ip-address>:<port>/v1/%\(tenant_id\)s --adminurl http://<ip-address>:<port>/v1/%\(tenant_id\)s --internalurl http://<ip-address>:<port>/v1/%\(tenant_id\)s
  5. Clone masakari using

    git clone https://github.com/openstack/masakari.git
  6. Run setup.py from masakari

    sudo python setup.py install
  7. Create directory /etc/masakari

  8. Copy masakari.conf, api-paste.ini and policy.json file from masakari/etc/ to /etc/masakari folder

  9. To run masakari-api simply use following binary:

    masakari-api

Configure masakari database

  1. Create 'masakari' database

  2. After running setup.py for masakari (sudo python setup.py install), run masakari-manage command to sync the database

    masakari-manage db sync

Features

  • TODO