在控制节点上执行

#!/bin/bash
MYSQL_ROOT_PASSWD='m4r!adbOP'
GNOCCHI_PASSWD='gnocchi1234!'
CEILOMETER_PASSWD='ceilometer1234!'
RABBIT_PASSWD='0penstackRMQ'
AODH_PASSWD='aodh1234!'
controllerHost='controller'
OPENSTACK_RELEASE='queens'
controller-aodh(){
mysql -uroot -p${MYSQL_ROOT_PASSWD} << EOF
      DROP DATABASE IF EXISTS aodh;
      CREATE DATABASE aodh;
      GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' IDENTIFIED BY '${AODH_PASSWD}';
      GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' IDENTIFIED BY '${AODH_PASSWD}';
EOF
source ~/admin-openrc
openstack user create --domain default --password ${AODH_PASSWD} 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://${controllerHost}:8042
openstack endpoint create --region RegionOne alarming internal http://${controllerHost}:8042
openstack endpoint create --region RegionOne alarming admin http://${controllerHost}:8042
yum -y install openstack-aodh-api openstack-aodh-evaluator openstack-aodh-notifier openstack-aodh-listener openstack-aodh-expirer python-aodhclient
cp /etc/aodh/aodh.conf /etc/aodh/aodh.conf_bak
openstack-config --set /etc/aodh/aodh.conf DEFAULT log_file /var/log/aodh/api.log
openstack-config --set /etc/aodh/aodh.conf DEFAULT transport_url  rabbit://openstack:${RABBIT_PASSWD}@${controllerHost}:5672
openstack-config --set /etc/aodh/aodh.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/aodh/aodh.conf database connection  mysql+pymysql://aodh:${AODH_PASSWD}@${controllerHost}/aodh
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken auth_uri  http://${controllerHost}:5000
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken auth_url  http://${controllerHost}:35357
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken memcached_servers  ${controllerHost}:11211
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken interface  internalURL
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken region_name  RegionOne
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken auth_type  password
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken project_domain_id  default
openstack-config --set /etc/aodh/aodh.conf keystone_authtoken user_domain_id  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  ${AODH_PASSWD}
openstack-config --set /etc/aodh/aodh.conf service_credentials auth_type  password
openstack-config --set /etc/aodh/aodh.conf service_credentials auth_url  http://${controllerHost}:5000/v3
openstack-config --set /etc/aodh/aodh.conf service_credentials memcached_servers  ${controllerHost}:11211
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/aodh.conf service_credentials project_domain_id  default
openstack-config --set /etc/aodh/aodh.conf service_credentials user_domain_id  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  ${AODH_PASSWD}
openstack-config --set /etc/aodh/aodh.conf service_credentials interface  internalURL
openstack-config --set /etc/aodh/aodh.conf service_credentials region_name  RegionOne
su -s /bin/sh -c "aodh-dbsync" aodh
sed -i "/ExecStart/c\ExecStart=/usr/bin/aodh-api --port 8042" /usr/lib/systemd/system/openstack-aodh-api.service
systemctl daemon-reload
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
systemctl status openstack-aodh-api.service openstack-aodh-evaluator.service openstack-aodh-notifier.service openstack-aodh-listener.service
aodh capabilities list
}

安装aodh的更多相关文章

  1. OpenStack Telemetry系统架构及实践

    1. 概述 早期OpenStack的计量功能由Ceilometer项目负责,后来Ceilometer一分为四,每个项目负责一个方面的工作.不得不说这是OpenStack开发中的一个特色,比如Cinde ...

  2. packstack安装ironic

    KVM Centos7.3虚机 安装openstack Pike版本, 其它版本安装方法类似. packstack目前对NetworkManager 还不支持,我们修改下配置: systemctl d ...

  3. ansible无网络安装openstack(Newton)

    概要 apt使用本地源,pip使用本地源 网络环境 物理机环境 网络名 网络地址 VLAN br-ex 192.168.200.250/24 90 br-mgmt 92.0.0.100/24 92 a ...

  4. 使用packstack安装pike版本的openstack

    最近由于工作需要,需要调研安装pike版本的gnocchi.由于ceilometer与gnocchi版本的强相关性,所以需要部署一个同一版本的openstack环境,在同事的推荐下使用了packsta ...

  5. 如何一步步使用国内yum源一键安装openstack-ocata版本基于centos7

    写在前面的话,在网上看了一个国外的一键安装视频,我也照着做,结果出现很多错误,现在把坑解决了,照着做肯定能安装成功的 环境 virtualhost 下的centos7 配置 双网卡 一个10网段,na ...

  6. OpenStack-iaas之“先点”云平台安装

    1.认识OpenStack 1.云计算的起源 早在2006年3月,亚马逊公司首先提出弹性计算云服务.2006年8月9日,谷歌公司首席执行官埃里克·施密特(Eric Schmidt)在谷歌搜索引擎大会( ...

  7. docker——容器安装tomcat

    写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...

  8. 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法

    如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...

  9. Sublime Text3安装JsHint

    介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...

随机推荐

  1. location - URL

    1.hash:获取或设置href 属性中跟在数字符号 # 之后的内容 2.跳转页面: 1)location.href 2)location.replace() 3)location.reload(tr ...

  2. 【Wince-禁止重复启动程序】Wince 不重复启动程序

    创建类Mutex.cs: using System; using System.Linq; using System.Collections.Generic; using System.Text; u ...

  3. keras计算指定层的输出

    import keras model = keras.models.Sequential([ keras.layers.Dense(4, activation='relu', input_dim=1, ...

  4. pycharm批量查找替换,正则匹配

    ctrl + r:查找替换 ctrl+f:查找 ctrl+shift+r:全局查找替换 ctrl+alt+f:全局查找 shift+tab将代码左对齐 replace all 完成

  5. python第三方库安装

    如安装jieba分词库 代码对Python 2/3均兼容 全自动安装:easy_install jieba或者pip install jieba / pip3 install jieba 半自动安装: ...

  6. 牛客练习赛52 B题【树状数组维护区间和{查询区间和,如果区间元素重复出现则计数一次}】补题ing

    [题目] 查询区间和,如果区间元素重复出现则计数一次. 链接:https://ac.nowcoder.com/acm/contest/1084/B [题解] 将询问按r排序,维护每个数最后出现的位置, ...

  7. FtpHelper.cs

    网上找了好多,感觉还是自己这个使用起来方便点,记录一下! using System; using System.Collections; using System.IO; using System.L ...

  8. sfmlearner剖析

    下面是slam14讲公式5.7 $Z\left(\begin{array}{l}{u} \\ {v} \\ {1}\end{array}\right)=\left(\begin{array}{ccc} ...

  9. Django从Models 10分钟定制一个Admin后台

    目录 Django从Models 10分钟建立一套RestfulApi Django从Models 10分钟定制一个Admin后台 简介 Django自带一个Admin后台, 支持用户创建,权限配置和 ...

  10. BZOJ 2402 陶陶的难题II (树链剖分、线段树、凸包、分数规划)

    毒瘤,毒瘤,毒瘤-- \(30000\)这个数据范围,看上去就是要搞事的啊... 题目链接: https://www.lydsy.com/JudgeOnline/problem.php?id=2402 ...