OpenStack Ocata Telemetry 警告服務部署

下列操做在控制節點上進行:python

1 準備條件

在配置OpenStack Telemetry服務以前,你必須建立數據庫、服務憑證和API端點。mysql

1.1 數據庫

以root用戶鏈接數據庫服務器,建立glance數據庫,並賦予適當的權限:sql

$ 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端點: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.confbash

[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
相關文章
相關標籤/搜索