OpenStack双节点部署—M Aodh(报警服务)

aodh安装

    • 一、数据库配置
    • 二、创建服务凭证和API端点
    • 三、安装并配置aodh服务
    • 四、验证ceilometer服务

一、数据库配置

    # mysql -uroot -p123456
    MariaDB [(none)]> CREATE DATABASE aodh;
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' IDENTIFIED BY '123456';
    MariaDB [(none)]> GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' IDENTIFIED BY '123456';
    MariaDB [(none)]> exit

二、创建服务凭证和API端点

1.创建服务凭证

    # . /root/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

OpenStack双节点部署—M Aodh(报警服务)_第1张图片
2.API端点

    # openstack endpoint create --region RegionOne alarming public http://controller:8042
    # openstack endpoint create --region RegionOne alarming internal http://controller:8042
    # openstack endpoint create --region RegionOne alarming admin http://controller:8042

OpenStack双节点部署—M Aodh(报警服务)_第2张图片

三、安装并配置aodh服务

1.安装aodh相关包

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

2.编辑/etc/aodh/aodh.conf文件

    # vi /etc/aodh/aodh.conf
    [DEFAULT]
    rpc_backend = rabbit
    auth_strategy = keystone
    
    [database]
    connection = mysql+pymysql://aodh:123456@controller/aodh
    
    [oslo_messaging_rabbit]
    rabbit_host = controller
    rabbit_userid = openstack
    rabbit_password = 123456
    
    [keystone_authtoken]
    auth_uri = http://controller:5000
    auth_url = http://controller:35357
    memcached_servers = controller:11211
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = aodh
    password = 123456
    
    [service_credentials]
    auth_type = password
    auth_url = http://controller:5000/v3
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = aodh
    password = 123456
    interface = internalURL
    region_name = RegionOne

3.同步数据库

    # su -s /bin/sh -c "aodh-dbsync" aodh

4.启动aodh服务并设置开机自启

   # 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

四、验证ceilometer服务

    # . /root/admin-openrc
    # ceilometer meter-list
    
    # IMAGE_ID=$(glance image-list | grep 'cirros' | awk '{ print $2 }')
    # glance image-download $IMAGE_ID > /tmp/cirros.img
   
    # ceilometer meter-list
    # ceilometer statistics -m image.download -p 60
    # rm /tmp/cirros.img
    rm: remove regular file ‘/tmp/cirros.img’? y

OpenStack双节点部署—M Aodh(报警服务)_第3张图片
OpenStack双节点部署—M Aodh(报警服务)_第4张图片
OpenStack双节点部署—M Aodh(报警服务)_第5张图片

你可能感兴趣的:(OpenStack,Mitaka版—双节点部署)