in OpenStack ~ read.

OpenStack Telemetry 警告服务部署

下列操作在控制节点上进行:

1 准备条件

在配置OpenStack Telemetry服务之前,你必须创建数据库、服务凭证和API端点。

1.1 数据库

以root用户连接数据库服务器,创建glance数据库,并赋予适当的权限:

$ mysql -u root -p

MariaDB [(none)]> CREATE DATABASE aodh;


MariaDB [(none)]> GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'controller3' \  
  IDENTIFIED BY 'pass123456';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' \  
  IDENTIFIED BY 'pass123456';
MariaDB [(none)]> exit  

1.2 服务凭证

创建aodh服务实体:

$ . admin-openrc

$ openstack user create --domain default \
  --password-prompt aodh
User Password:  
Repeat User Password:

$ openstack role add --project service --user aodh admin

$ openstack service create --name aodh \
  --description "Telemetry" alarming

1.3 API 端点

创建网络服务API端点:

$ openstack endpoint create --region RegionOne \
  alarming public http://controller3:8042
$ openstack endpoint create --region RegionOne \
  alarming internal http://controller3:8042
$ openstack endpoint create --region RegionOne \
  alarming admin http://controller3:8042

2 安装配置组件

2.1 安装包

# yum install -y openstack-aodh-api \
  openstack-aodh-evaluator openstack-aodh-notifier \
  openstack-aodh-listener openstack-aodh-expirer \
  python-aodhclient

2.2 配置

编辑配置文件/etc/aodh/aodh.conf

[DEFAULT]
...
transport_url = rabbit://openstack:pass123456@controller3  
auth_strategy = keystone

[database]
...
connection = mysql+pymysql://aodh:pass123456@controller3/aodh

[keystone_authtoken]
...
auth_uri = http://controller3:5000  
auth_url = http://controller3:35357  
memcached_servers = controller3:11211  
auth_type = password  
project_domain_name = default  
user_domain_name = default  
project_name = service  
username = aodh  
password = pass123456

[service_credentials]
...
auth_type = password  
auth_url = http://controller3:5000/v3  
project_domain_name = default  
user_domain_name = default  
project_name = service  
username = aodh  
password = pass123456  
interface = internalURL  
region_name = RegionOne  

2.3 运行初始化数据库脚本

aodh-dbsync  

3 完成安装

启动Telemetry Alarming服务,并配置随系统启动:

# systemctl enable openstack-aodh-api.service \
  openstack-aodh-evaluator.service \
  openstack-aodh-notifier.service \
  openstack-aodh-listener.service
# systemctl start openstack-aodh-api.service \
  openstack-aodh-evaluator.service \
  openstack-aodh-notifier.service \
  openstack-aodh-listener.service
comments powered by Disqus