ntt-sic / masakari

[UNMAINTAINED]
https://wiki.openstack.org/wiki/Masakari
Apache License 2.0
40 stars 24 forks source link

[UNMAINTAINED]

Current version of masakari is maintained as a OpenStack official project [1]. Current documentation is here [2]. Since we are actively developing latest version of masakari in [1], I would like to tag this repo as UNMAINTAINED. Thank you all for your contribution and support. Please feel free to contact masakari team for any help on latest version of masakari or any other masakari related issues.

[1] https://wiki.openstack.org/wiki/Masakari

[2] https://docs.openstack.org/masakari/latest/

Masakari

What is Masakari ?

Masakari provides a Virtual Machine High Availability(VMHA), and rescues a KVM-based Virtual Machine(VM) from a failure events of the following:

Try masakari-deploy for all-in-one scripts to deploy it on your laptop.

Architecture

Alt text

Prerequisites

Installation

components installation

ex) Ubuntu

# cd (each components directory)  * ex: masakari, hostmonitor etc
# ./debian/rules binary
# dpkg -i (each components).deb

database setting

create database and tables for masakari

# cd masakari-controller/db
# vi db.conf
DB_USER=<mysql user>
DB_PASSWORD=<mysql user password>
DB_HOST=<mysql host ip>
# bash create_vmha_database.sh

config setting

masakari-controller.conf

# vi /etc/masakari/masakari-controller.conf
...
[db]
host = <mysql host ip>
name = vm_ha 
user = <mysql user>
passwd = <mysql user password>
charset = utf8
...
[nova]
domain = <keystone top level domain name>
admin_user = <admin user>
admin_password = <admin user password>
auth_url =  <auth_url>
project_name = <tenant name>
...

masakari-instancemonitor.conf

# vi /etc/masakari/masakari-instancemonitor.conf
[callback]
# Event notification destination URL
url = http://<masakari server ip>:15868
...
# regionID
regionID=<openstack region name. ex) RegionOne >
...

masakari-hostmonitor.conf

# vi /etc/masakari/masakari-hostmonitor.conf
# URL of recovery controller
RM_URL="http://<masakari server ip>:15868"
...
# Region unit
# This item is necessary
REGION_ID="<openstack region name ex) RegionOne>"

masakari-processmonitor.conf

# vi /etc/masakari/masakari-processmonitor.conf
RESOURCE_MANAGER_URL="http://<masakari server ip>:15868"
...
REGION_ID=<openstack region name. ex) RegionOne >

Reserved host setting for nova-compute host failure

If a nova-compute host fails, masakari evacuates instances on the failed host to the reserved host. In advance, you reserve one or two host(s) per a pacemaker cluster. Please follow this instruction.

# cd masakari/utils

Add

# python reserve_host_manage.py --mode add  --port "226.94.1.1:5405" --host compute2  --db-user root --db-password mysql --db-host 127.0.0.1

List

# python reserve_host_manage.py --mode list  --db-user root --db-password mysql --db-host 127.0.0.1

Delete

# python reserve_host_manage.py --mode delete  --port "226.94.1.1:5405" --host compute2  --db-user root --db-password mysql --db-host 127.0.0.1

Update

# python reserve_host_manage.py --mode update  --port "226.94.1.1:5405"  --before-host compute2  --after-host compute1  --db-user root --db-password mysql --db-host 127.0.0.1

Copyright

Copyright (C) 2015 Nippon Telegraph and Telephone Corporation. Released under Apache License 2.0.