OpenStack Epoxy : Configure Aodh |
Install OpenStack Alarming Service (Aodh). This example is based on the emvironment like follows. ------------+--------------------------+--------------------------+------------
| | |
eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51
+-----------+-----------+ +-----------+-----------+ +-----------+-----------+
| [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] |
| (Control Node) | | (Network Node) | | (Compute Node) |
| | | | | |
| MariaDB RabbitMQ | | Open vSwitch | | Libvirt |
| Memcached Nginx | | Neutron Server | | Nova Compute |
| Keystone httpd | | OVN-Northd | | Open vSwitch |
| Glance Nova API | | Nginx iSCSI Target | | OVN Metadata Agent |
| Cinder API | | Cinder Volume | | OVN-Controller |
| | | Gnocchi httpd | | Ceilometer Compute |
| | | Ceilometer Central | | |
| | | Aodh Services | | |
+-----------------------+ +-----------------------+ +-----------------------+
|
| [1] | Install Gnocchi and Ceilometer first. |
| [2] | Add users and others for Aodh in Keystone. |
# create [aodh] user in [service] project root@dlp ~(keystone)# openstack user create --domain default --project service --password servicepassword aodh +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | a60814a6c56241edbbdfae6c290f8abc | | domain_id | default | | email | None | | enabled | True | | id | e9d9779cc4e043aca38e41b18f8bde0b | | name | aodh | | description | None | | password_expires_at | None | +---------------------+----------------------------------+ # add [aodh] user in [admin] role root@dlp ~(keystone)# openstack role add --project service --user aodh admin # create service entry for [aodh] root@dlp ~(keystone)# openstack service create --name aodh --description "Telemetry Alarming" alarming +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | id | 24d29f7f928b47e5894ea9459ba92a9a | | name | aodh | | type | alarming | | enabled | True | | description | Telemetry Alarming | +-------------+----------------------------------+ # define Aodh API Host root@dlp ~(keystone)# export controller=network.srv.world # add endpoint for aodh (public) root@dlp ~(keystone)# openstack endpoint create --region RegionOne alarming public https://$controller:8042 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 14230b35ffdd447496f66e5a58dc74b0 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 24d29f7f928b47e5894ea9459ba92a9a | | service_name | aodh | | service_type | alarming | | url | https://network.srv.world:8042 | +--------------+----------------------------------+ # add endpoint for aodh (internal) root@dlp ~(keystone)# openstack endpoint create --region RegionOne alarming internal https://$controller:8042 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | b87179c719524484b736063ee5e4e91c | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 24d29f7f928b47e5894ea9459ba92a9a | | service_name | aodh | | service_type | alarming | | url | https://network.srv.world:8042 | +--------------+----------------------------------+ # add endpoint for aodh (admin) root@dlp ~(keystone)# openstack endpoint create --region RegionOne alarming admin https://$controller:8042 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 8b8389cb0d434cab88c88e158a7b80c4 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 24d29f7f928b47e5894ea9459ba92a9a | | service_name | aodh | | service_type | alarming | | url | https://network.srv.world:8042 | +--------------+----------------------------------+ |
| [3] | Add a User and Database on MariaDB for Aodh. |
| root@network:~# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 53477883 Server version: 11.8.2-MariaDB-1 from Debian -- Please help get to 10k stars at https://github.com/MariaDB/Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database aodh; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on aodh.* to aodh@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> grant all privileges on aodh.* to aodh@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit Bye |
| [4] | Install Aodh on Network Node. |
| root@network:~# apt -y install aodh-api aodh-evaluator aodh-notifier aodh-listener aodh-expirer python3-aodhclient |
| [5] | Configure Aodh. |
| root@network:~# mv /etc/aodh/aodh.conf /etc/aodh/aodh.conf.org root@network:~# vi /etc/aodh/aodh.conf # create new [DEFAULT] log_dir = /var/log/aodh # RabbitMQ connection info transport_url = rabbit://openstack:password@dlp.srv.world [api] auth_mode = keystone gnocchi_external_project_owner = service [database] # MariaDB connection info connection = mysql+pymysql://aodh:password@127.0.0.1/aodh # Keystone auth info [keystone_authtoken] www_authenticate_uri = https://dlp.srv.world:5000 auth_url = https://dlp.srv.world:5000 memcached_servers = dlp.srv.world:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = aodh password = servicepassword service_token_roles_required = true # if using self-signed certs on httpd Keystone, turn to [true] insecure = false [service_credentials] auth_url = https://dlp.srv.world:5000 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = aodh password = servicepassword interface = public root@network:~# vi /etc/apache2/sites-available/aodh.conf # create new Listen 127.0.0.1:8042
<VirtualHost *:8042>
<Directory /usr/bin>
AllowOverride None
Require all granted
</Directory>
CustomLog /var/log/apache2/aodh_wsgi_access.log combined
ErrorLog /var/log/apache2/aodh_wsgi_error.log
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess aodh display-name=aodh_wsgi user=aodh group=aodh processes=6 threads=6
WSGIProcessGroup aodh
WSGIScriptAlias / /usr/bin/aodh-api
</VirtualHost>
chmod 640 /etc/aodh/aodh.conf root@network:~# chgrp aodh /etc/aodh/aodh.conf |
| [6] | Configure Nginx for proxy settings. |
root@network:~# vi /etc/nginx/nginx.conf # add into the [stream] section stream {
upstream neutron-api {
server 127.0.0.1:9696;
}
server {
listen 10.0.0.50:9696 ssl;
proxy_pass neutron-api;
}
upstream aodh-api {
server 127.0.0.1:8042;
}
server {
listen 10.0.0.50:8042 ssl;
proxy_pass aodh-api;
}
ssl_certificate "/etc/letsencrypt/live/network.srv.world/fullchain.pem";
ssl_certificate_key "/etc/letsencrypt/live/network.srv.world/privkey.pem";
}
|
| [7] | Add Data into Database and start Gnocchi services. |
| root@network:~# su -s /bin/bash aodh -c "aodh-dbsync" root@network:~# a2enmod wsgi root@network:~# a2enmod ssl root@network:~# a2ensite aodh root@network:~# systemctl disable --now aodh-api root@network:~# systemctl restart aodh-evaluator aodh-notifier aodh-listener apache2 root@network:~# systemctl restart nginx |
| [10] | Verify state on Control Node. |
root@dlp ~(keystone)# apt -y install python3-aodhclient root@dlp ~(keystone)# openstack alarm list # OK if no error is shown |
Matched Content
No comments:
Post a Comment