Cloud computing infrastructure platform iaas (openstack) super detailed building (XVI) installation Alarm Monitoring Services

Note: access and update the content on a blog
because the entire installation process is too cumbersome openstack open source, command is too long, too complicated, so the entire installation shell script commands written.

Script amount of content too, has pushed the self github source of the care center.
This is a github repository location Benpian script content resides
controller node

Scripting Introduction

#!/bin/bash
source /etc/xiandian/openrc.sh
source /etc/keystone/admin-openrc.sh
mysql -uroot -p$DB_PASS -e "create database IF NOT EXISTS aodh ;"
mysql -uroot -p$DB_PASS -e "GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' IDENTIFIED BY '$AODH_DBPASS' ;"
mysql -uroot -p$DB_PASS -e "GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' IDENTIFIED BY '$AODH_DBPASS' ;"

openstack user create --domain $DOMAIN_NAME --password $AODH_PASS aodh
openstack role add --project service --user aodh admin
openstack service create --name aodh --description "Telemetry" alarming
openstack endpoint create --region RegionOne alarming public http://$HOST_NAME:8042
openstack endpoint create --region RegionOne alarming internal http://$HOST_NAME:8042
openstack endpoint create --region RegionOne alarming admin http://$HOST_NAME:8042

yum install -y openstack-aodh-api openstack-aodh-evaluator openstack-aodh-notifier openstack-aodh-listener openstack-aodh-expirer pytho
n-ceilometerclient

crudini --set /etc/aodh/aodh.conf database connection mysql+pymysql://aodh:$AODH_DBPASS@$HOST_NAME/aodh
crudini --set /etc/aodh/aodh.conf DEFAULT rpc_backend rabbit
crudini --set /etc/aodh/aodh.conf oslo_messaging_rabbit rabbit_host $HOST_NAME
crudini --set /etc/aodh/aodh.conf oslo_messaging_rabbit rabbit_userid $RABBIT_USER
crudini --set /etc/aodh/aodh.conf oslo_messaging_rabbit rabbit_password  $RABBIT_PASS

crudini --set /etc/aodh/aodh.conf DEFAULT auth_strategy keystone
crudini --set /etc/aodh/aodh.conf keystone_authtoken auth_uri  http://$HOST_NAME:5000
crudini --set /etc/aodh/aodh.conf keystone_authtoken auth_url  http://$HOST_NAME:35357
crudini --set /etc/aodh/aodh.conf keystone_authtoken memcached_servers  $HOST_NAME:11211
crudini --set /etc/aodh/aodh.conf keystone_authtoken auth_type  password
crudini --set /etc/aodh/aodh.conf keystone_authtoken project_domain_name  $DOMAIN_NAME
crudini --set /etc/aodh/aodh.conf keystone_authtoken user_domain_name $DOMAIN_NAME
crudini --set /etc/aodh/aodh.conf keystone_authtoken project_name  service
crudini --set /etc/aodh/aodh.conf keystone_authtoken username  aodh
crudini --set /etc/aodh/aodh.conf keystone_authtoken password  $AODH_PASS

crudini --set /etc/aodh/aodh.conf service_credentials auth_type  password
crudini --set /etc/aodh/aodh.conf service_credentials auth_url  http://$HOST_NAME:5000/v3
crudini --set /etc/aodh/aodh.conf service_credentials project_domain_name  $DOMAIN_NAME
crudini --set /etc/aodh/aodh.conf service_credentials user_domain_name  $DOMAIN_NAME

Here are the details of the operation command In this part of the (script already contains all the operations command of the articles, but the proposal is still running again after become familiar with the whole process script)

12 Installing Alarm Monitoring Services

12.1 By scripts to install alarm service
12.2-12.8 Alarm监控服务的操作命令已经编写成shell脚本,通过脚本进行一键安装。如下:
#Controller节点
执行脚本iaas-install-alarm.sh进行安装


12.2 Creating a database
# mysql -u root -p
mysql> CREATE DATABASE aodh;
mysql> GRANT ALL PRIVILEGES ON aodh.* TO aodh@'localhost' IDENTIFIED BY '000000'; mysql> GRANT ALL PRIVILEGES ON aodh.* TO aodh@'%' IDENTIFIED BY  '000000';

12.3 Creating keystone user
openstack user create --domain default --password 000000 aodh
openstack role add --project service --user aodh admin

12.4 Creating and API Endpoint
openstack service create --name aodh --description "Telemetry" alarming
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

12.5 installation package
yum install -y openstack-aodh-api openstack-aodh-evaluator openstack-aodh-notifier openstack-aodh-listener openstack-aodh-expirer python-ceilometerclient
12.6 Configuration aodh
openstack-config --set /etc/aodh/aodh.conf database connection mysql+pymysql://aodh:000000@controller/aodh
openstack-config --set /etc/aodh/aodh.conf DEFAULT rpc_backend rabbit
openstack-config --set /etc/aodh/aodh.conf oslo_messaging_rabbit rabbit_host controller
openstack-config --set /etc/aodh/aodh.conf oslo_messaging_rabbit rabbit_userid openstack
openstack-config --set /etc/aodh/aodh.conf oslo_messaging_rabbit rabbit_password  000000

openstack-config --set /etc/aodh/aodh.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken auth_uri  http://controller:5000
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken auth_url  http://controller:35357
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken memcached_servers  controller:11211
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken auth_type  password
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken project_domain_name  default
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken project_name  service
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken username  aodh
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken password  000000
openstack-config --set /etc/aodh/aodh.conf service_credentials auth_type  password
openstack-config --set /etc/aodh/aodh.conf service_credentials auth_url  http://controller:5000/v3
openstack-config --set /etc/aodh/aodh.conf service_credentials project_domain_name  default
openstack-config --set /etc/aodh/aodh.conf service_credentials user_domain_name  default
openstack-config --set /etc/aodh/aodh.conf service_credentials project_name  service
openstack-config --set /etc/aodh/aodh.conf service_credentials username  aodh
openstack-config --set /etc/aodh/aodh.conf service_credentials password  000000
openstack-config --set /etc/aodh/aodh.conf service_credentials interface  internalURL
openstack-config --set /etc/aodh/aodh.conf service_credentials region_name  RegionOne
openstack-config --set /etc/aodh/api_paste.ini  filter:authtoken oslo_config_project aodh

12.7 synchronize database
su -s /bin/sh -c "aodh-dbsync" aodh

12.8 Start Service
systemctl enable openstack-aodh-api.service openstack-aodh-evaluator.service openstack-aodh-notifier.service openstack-aodh-listener.service
systemctl restart openstack-aodh-api.service openstack-aodh-evaluator.service openstack-aodh-notifier.service openstack-aodh-listener.service


Guess you like

Origin blog.csdn.net/qq_28513801/article/details/90172627