Install and configure for Ubuntu¶
This section describes how to install and configure the Telemetry Alarming service, code-named aodh, on the controller node.
This section assumes that you already have a working OpenStack environment with at least the following components installed: Compute, Image Service, Identity.
Prerequisites¶
Before you install and configure the Telemetry service, you must create a database, service credentials, and API endpoints.
To create the database, complete these steps:
Use the database access client to connect to the database server as the
rootuser:$ mysql -u root -pCreate the
aodhdatabase:CREATE DATABASE aodh;Grant proper access to the
aodhdatabase:GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'localhost' \ IDENTIFIED BY 'AODH_DBPASS'; GRANT ALL PRIVILEGES ON aodh.* TO 'aodh'@'%' \ IDENTIFIED BY 'AODH_DBPASS';
Replace
AODH_DBPASSwith a suitable password.Exit the database access client.
Source the
admincredentials to gain access to admin-only CLI commands:$ . admin-openrcTo create the service credentials, complete these steps:
Create the
aodhuser:$ openstack user create --domain default \ --password-prompt aodh User Password: Repeat User Password: +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | default | | enabled | True | | id | b7657c9ea07a4556aef5d34cf70713a3 | | name | aodh | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+
Add the
adminrole to theaodhuser:$ openstack role add --project service --user aodh adminNote
This command provides no output.
Create the
aodhservice entity:$ openstack service create --name aodh \ --description "Telemetry" alarming +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Telemetry | | enabled | True | | id | 3405453b14da441ebb258edfeba96d83 | | name | aodh | | type | alarming | +-------------+----------------------------------+
Create the Alarming service API endpoints:
$ openstack endpoint create --region RegionOne \ alarming public http://controller:8042 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 340be3625e9b4239a6415d034e98aace | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 | | service_name | aodh | | service_type | alarming | | url | http://controller:8042 | +--------------+----------------------------------+ $ openstack endpoint create --region RegionOne \ alarming internal http://controller:8042 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 340be3625e9b4239a6415d034e98aace | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 | | service_name | aodh | | service_type | alarming | | url | http://controller:8042 | +--------------+----------------------------------+ $ openstack endpoint create --region RegionOne \ alarming admin http://controller:8042 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 340be3625e9b4239a6415d034e98aace | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 8c2c7f1b9b5049ea9e63757b5533e6d2 | | service_name | aodh | | service_type | alarming | | url | http://controller:8042 | +--------------+----------------------------------+
Install and configure components¶
Note
Default configuration files vary by distribution. You might need to add these sections and options rather than modifying existing sections and options. Also, an ellipsis (…) in the configuration snippets indicates potential default configuration options that you should retain.
Install the packages:
# apt-get install aodh-api aodh-evaluator aodh-notifier \ aodh-listener aodh-expirer python-aodhclient
Edit the
/etc/aodh/aodh.conffile and complete the following actions:In the
[database]section, configure database access:[database] ... connection = mysql+pymysql://aodh:AODH_DBPASS@controller/aodh
Replace
AODH_DBPASSwith the password you chose for the Telemetry Alarming module database. You must escape special characters such as:,/,+, and@in the connection string in accordance with RFC2396.In the
[DEFAULT]section, configureRabbitMQmessage queue access:[DEFAULT] ... transport_url = rabbit://openstack:RABBIT_PASS@controller
Replace
RABBIT_PASSwith the password you chose for theopenstackaccount inRabbitMQ.In the
[DEFAULT]and[keystone_authtoken]sections, configure Identity service access:[DEFAULT] ... auth_strategy = keystone [keystone_authtoken] ... www_authenticate_uri = http://controller:5000 auth_url = http://controller:5000 memcached_servers = controller:11211 auth_type = password project_domain_id = default user_domain_id = default project_name = service username = aodh password = AODH_PASS
Replace
AODH_PASSwith the password you chose for theaodhuser in the Identity service.In the
[service_credentials]section, configure service credentials:[service_credentials] ... auth_type = password auth_url = http://controller:5000/v3 project_domain_id = default user_domain_id = default project_name = service username = aodh password = AODH_PASS interface = internalURL region_name = RegionOne
Replace
AODH_PASSwith the password you chose for theaodhuser in the Identity service.
In order to initialize the database please run the
aodh-dbsyncscript.
Finalize installation¶
Restart the Alarming services:
# service aodh-api restart # service aodh-evaluator restart # service aodh-notifier restart # service aodh-listener restart