OpenStack Train版 简单部署流程- ceilometer

Posted omgasw

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenStack Train版 简单部署流程- ceilometer相关的知识,希望对你有一定的参考价值。

ceilometer

openstack project create --domain default --description "Service Project" service
yum -y install redis libvirt epel-release
yum -y install python-pip python-devel
sed -i s/^bind 127.0.0.1/bind 0.0.0.0/g /etc/redis.conf
sed -i s/^protected-mode yes/protected-mode no/g /etc/redis.conf
sed -i s/^daemonize no/daemonize yes/g /etc/redis.conf
systemctl enable redis libvirtd;systemctl restart redis libvirtd;systemctl status redis libvirtd
pip install uwsgi

 

controller node

mysql -u root -p1234qwer
CREATE DATABASE gnocchi;
GRANT ALL PRIVILEGES ON gnocchi.* TO gnocchi@localhost IDENTIFIED BY gnocchi;
GRANT ALL PRIVILEGES ON gnocchi.* TO gnocchi@% IDENTIFIED BY gnocchi;
quit
. /root/admin-openrc
openstack user create --domain default --password ceilometer123 ceilometer
openstack role add --project service --user ceilometer admin
openstack user create --domain default --password gnocchi123 gnocchi
openstack service create --name gnocchi --description "Metric Service" metric
openstack role add --project service --user gnocchi admin
openstack endpoint create --region RegionOne metric public http://controller:8041
openstack endpoint create --region RegionOne metric internal http://controller:8041
openstack endpoint create --region RegionOne metric admin http://controller:8041
yum -y install openstack-gnocchi-api openstack-gnocchi-metricd python-gnocchiclient
openstack-config --set /etc/gnocchi/gnocchi.conf api auth_mode keystone
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken auth_type password
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken auth_url http://controller:5000/v3
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken project_name service
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken username gnocchi
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken password gnocchi123
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken interface internalURL
openstack-config --set /etc/gnocchi/gnocchi.conf keystone_authtoken region_name RegionOne
openstack-config --set /etc/gnocchi/gnocchi.conf indexer url mysql+pymysql://gnocchi:gnocchi@controller/gnocchi
openstack-config --set /etc/gnocchi/gnocchi.conf storage coordination_url redis://controller:6379
openstack-config --set /etc/gnocchi/gnocchi.conf storage file_basepath /var/lib/gnocchi
openstack-config --set /etc/gnocchi/gnocchi.conf storage driver file
gnocchi-upgrade
systemctl enable openstack-gnocchi-api.service openstack-gnocchi-metricd.service;systemctl restart openstack-gnocchi-api.service openstack-gnocchi-metricd.service
systemctl status openstack-gnocchi-api.service openstack-gnocchi-metricd.service
yum -y install openstack-ceilometer-notification openstack-ceilometer-central

vim /etc/ceilometer/pipeline.yaml
publishers:
    # set address of Gnocchi
    # + filter out Gnocchi-related activity meters (Swift driver)
    # + set default archive policy
    - gnocchi://?filter_project=service&archive_policy=low

openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT transport_url rabbit://openstack:RABBIT_PASS@controller
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials auth_type password
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials auth_url http://controller:5000/v3
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials project_domain_id default
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials user_domain_id default
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials project_name service
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials username ceilometer
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials password ceilometer123
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials interface internalURL
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials region_name RegionOne
ceilometer-upgrade
systemctl enable openstack-ceilometer-notification.service openstack-ceilometer-central.service;systemctl start openstack-ceilometer-notification.service openstack-ceilometer-central.service
systemctl status openstack-ceilometer-notification.service openstack-ceilometer-central.service

 

compute node

yum -y install openstack-ceilometer-compute openstack-ceilometer-ipmi
openstack-config --set /etc/ceilometer/ceilometer.conf DEFAULT transport_url rabbit://openstack:RABBIT_PASS@controller
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials auth_type password
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials auth_url http://controller:5000/v3
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials project_domain_id default
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials user_domain_id default
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials project_name service
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials username ceilometer
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials password ceilometer123
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials interface internalURL
openstack-config --set /etc/ceilometer/ceilometer.conf service_credentials region_name RegionOne

openstack-config --set /etc/nova/nova.conf DEFAULT instance_usage_audit True
openstack-config --set /etc/nova/nova.conf DEFAULT instance_usage_audit_period hour
openstack-config --set /etc/nova/nova.conf notifications notify_on_state_change vm_and_task_state
openstack-config --set /etc/nova/nova.conf oslo_messaging_notifications driver messagingv2

vim /etc/sudoers
ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf *

vim /etc/ceilometer/polling.yaml
- name: ipmi
  interval: 300
  meters:
    - hardware.ipmi.temperature


systemctl enable openstack-ceilometer-compute.service openstack-ceilometer-ipmi.service;systemctl restart openstack-ceilometer-compute.service openstack-ceilometer-ipmi.service openstack-nova-compute.service
systemctl status openstack-ceilometer-compute.service openstack-ceilometer-ipmi.service openstack-nova-compute.service

 

echo export OS_AUTH_TYPE=password >>/root/admin-openrc

 

以上是关于OpenStack Train版 简单部署流程- ceilometer的主要内容,如果未能解决你的问题,请参考以下文章

自动化快速部署OpenStack Train版控制节点

OpenStack 运维 - 部署Keystone组件 [Train版]

⑩ OpenStack高可用集群部署方案(train版)—OpenStack对接Ceph存储

构建基于openEuler2209的OpenStack云平台

OpenStack Train版-1.环境安装

OpenStack Train版-7.neutron网络服务概述