适用于 Red Hat Enterprise Linux 和 CentOS 的安装和配置

本节描述了如何在 Red Hat Enterprise Linux 7 和 CentOS 7 上安装和配置根本原因分析服务。

手动

安装 Vitrage

安装 Vitrage 和 python-vitrageclient

  1. 安装 Vitrage

$ sudo pip install vitrage

$ sudo pip install python-vitrageclient

要安装特定版本,请添加版本号

$ sudo pip install vitrage==VITRAGE_VERSION

$ sudo pip install python-vitrageclient==VITRAGE_CLIENT_VERSION

发布版本

Vitrage 版本

客户端版本

Ocata

1.5.1

1.1.1

Pike

1.8.2

1.4.0

Queens

配置 Vitrage

创建 Vitrage 文件夹

  1. 创建 /etc/vitrage 文件夹和子文件夹,权限为 755

$ mkdir /etc/vitrage
$ chmod 755 /etc/vitrage

$ mkdir /etc/vitrage/static_datasources
$ chmod 755 /etc/vitrage/static_datasources

$ sudo mkdir /var/log/vitrage
$ sudo chmod 755 /var/log/vitrage

api-paste.ini 复制到 /etc/vitrage/

datasources_values 文件夹及其内容复制到 /etc/vitrage/ 下

注意: 您不需要复制此文件夹中的所有文件,只需复制属于您计划使用的数据源的文件即可。 唯一必须复制的文件是 vitrage.yaml

创建 vitrage.conf 文件

使用以下信息创建 /etc/vitrage/vitrage.conf 文件

[DEFAULT]
# debug = False
transport_url = <transport-url>
# notifiers = nova

[service_credentials]
auth_url = http://<ip>:5000
region_name = RegionOne
project_name = admin
password = <password>
project_domain_id = default
user_domain_id = default
username = admin
auth_type = password

[keystone_authtoken]
auth_uri = http://<ip>:5000
project_domain_name = Default
project_name = service
user_domain_name = Default
password = <password>
username = vitrage
auth_url = http://<ip>:5000
auth_type = password

<ip> 替换为您的控制器节点的 IP。 设置您希望 Vitrage 使用的数据源列表。

注意: 为了支持某个数据源,底层组件(如 Neutron、Heat、Zabbix 等)应单独安装。

[datasources]
types = nova.host,nova.instance,nova.zone,static,aodh,cinder.volume,neutron.network,neutron.port,heat.stack,doctor

配置来自其他数据源的通知

来自 Aodh 的通知

为了配置来自 Aodh 到 Vitrage 的通知,请在 /etc/aodh/aodh.conf 中设置以下内容

[oslo_messaging_notifications]
driver = messagingv2
topics = notifications,vitrage_notifications

来自其他 OpenStack 组件的通知

为了配置来自 OpenStack 组件(Nova、Cinder、Neutron、Heat 和 Aodh)到 Vitrage 的通知,请在它们的配置文件中设置以下内容

[DEFAULT]
notification_topics = notifications,vitrage_notifications
notification_driver=messagingv2

[notifications] versioned_notifications_topics = versioned_notifications,vitrage_notifications notification_driver = messagingv2

初始化 Vitrage

创建 Vitrage 帐户

openstack user create vitrage --password password --domain=Default
openstack role add admin --user vitrage --project service
openstack role add admin --user vitrage --project admin

创建 Vitrage 端点

openstack service create rca --name vitrage --description="Root Cause Analysis Service"
openstack endpoint create vitrage --region <region> public http://<ip>:8999
openstack endpoint create vitrage --region <region> internal http://<ip>:8999
openstack endpoint create vitrage --region <region> admin http://<ip>:8999

启动 Vitrage 服务

运行以下命令

vitrage-graph
vitrage-api
vitrage-notifier
vitrage-persistor
vitrage-ml

安装 Vitrage Dashboard

请按照 vitrage-dashboard 安装过程进行操作。

自动

RDO 的自动安装正在进行中;补丁可以在 RDO Gerrit 上找到