Install and configure for Ubuntu¶
This section describes how to install and configure Masakari-monitors for Ubuntu 18.04 (bionic).
Prerequisites¶
Before you install and configure Masakari-monitors, you must verify installations below:
To install and confirm Masakari installation:
Masakari - is an OpenStack project designed to ensure high availability of instances and compute processes running on hosts. For detailed installation steps please refer to masakari documentation
Verify Masakari installation by verifying status of services:
$ systemctl list-unit-files devstack@masakari-*.service UNIT FILE STATE devstack@masakari-api.service enabled devstack@masakari-engine.service enabled 2 unit files listed.
IPMI support is needed for
masakari-hostmonitor servicewhich is a remote hardware health monitoring and management system that defines interfaces for use in monitoring the physical health of servers.Check if IPMI Hardware support is enabled:
$ stonith -L | grep external/ipmi external/ipmi
Install ipmitool and verify:
- IPMItool
utility is an open-source command-line interface (CLI) for controlling IPMI (Intelligent Platform Management Interface) enabled devices.
$ sudo apt-get -y install ipmitool $ sudo ipmitool -V
Note
Check for IPMI Hardware support with the command:
sudo ipmitool lan print 1.If IPMI configuration found, then proceed to steps below.
Install crm and verify:
crm is a Pacemaker command line interface for configuration and management.
$ sudo apt-get -y install crmsh $ sudo crm --version
Install pacemaker and corosync and verify: Refer Ubuntu Manpage for control and configure pacemaker and corosync.
corosync - It is a Cluster Engine and a Group Communication System with additional features for implementing high availability within applications.
$ sudo apt-get -y install corosync $ sudo corosync -v
pacemaker - It is an open-source high availability resource manager software used on computer clusters.
$ sudo apt-get -y install pacemaker $ sudo crmadmin --version
Edit the
/etc/corosync/corosync.conffile as described below:Configure
bindnetaddrvalue as network address of the interface to bind:totem { ... interface { ... bindnetaddr: BINDNETADDR Replace ``BINDNETADDR`` with network address used for mutual communication between hosts.
Add the service section at end of file:
service { name: pacemaker ver: 0 use_mgmtd: yes }
Edit the
/etc/default/corosyncfile as described below:# Start corosync at boot [yes|no] START=yes
Start corosync and pacemaker services:
# systemctl start corosync.service # systemctl start pacemaker.service
Install and confirm STONITH resource:
STONITH (Shoot The Other Node In The Head) is a Linux service for maintaining the integrity of nodes in a high-availability (HA) cluster. More description on how to create STONITH resource is here cluster resources
Install and configure Masakari Monitors¶
Note
Masakari-monitors can be installed on the ComputeNodes only.
Clone masakari-monitors using:
# git clone https://opendev.org/openstack/masakari-monitors.git
Prepare masakari-monitors configuration files:
Generate via tox: Go to ‘opt/stack/masakari-monitors’ and execute the command below, this will generate
masakarimonitors.conf.sample, sample configuration file at/opt/stack/masakari-monitors/etc/masakarimonitors/# tox -egenconfig
Or download them:
Rename
masakarimonitors.conf.sampleto file tomasakarimonitors.conf, and edit as described below:In the
[api]section, verify keys below for sending notifications:[api] ... auth_url = http://CONTROLLER/identity project_name = service project_domain_name = default username = masakari password = MASAKARI_PASS
Replace
CONTROLLERwith the IP address or hostname of ControllerNode. And replaceMASAKARI_PASSwith the password you chose for themasakariuser in the Identity service.In the
[host]section, configure about pacemaker:[host] ... corosync_multicast_interfaces = MULTICAST_INTERFACES corosync_multicast_ports = MULTICAST_PORTS
Replace
MULTICAST_INTERFACESwith the interface that corosync is using for mutual communication between hosts. You can find the interface from the value ofbindnetaddrin /etc/corosync/corosync.conf. If there are multiple interfaces, specify them by comma-separated like ‘corosync_multicast_interfaces = enp0s3,enp0s8’.Replace
MULTICAST_PORTSwith themcastportdescribed in /etc/corosync/corosync.conf. If there are multiplemcastport, specify them by comma-separated like ‘corosync_multicast_ports = 5405,5406’.
Rename
process_list.yaml.sample, sample configuration file at/opt/stack/masakari-monitors/etc/masakarimonitors/. Edit the file for the processes to be monitored.Create
masakarimonitorsdirectory in /etc/. Copymasakarimonitors.confandprocess_list.yamlfiles to/etc/masakarimonitors/# cp -p etc/masakarimonitors/masakarimonitors.conf.sample /etc/masakarimonitors/masakarimonitors.conf # cp -p etc/masakarimonitors/process_list.yaml.sample /etc/masakarimonitors/process_list.yaml
To install masakari-monitors run setup.py from the directory masakari-monitors:
# cd masakari-monitors # sudo python3 setup.py install
Finalize installation¶
Restart the masakari-monitors services:
# masakari-hostmonitor # masakari-introspectiveinstancemonitor # masakari-processmonitor # masakari-instancemonitor