Install and configure for Ubuntu¶
This section describes how to install and configure the Telemetry service, code-named ceilometer, on the controller node.
Prerequisites¶
Before you install and configure the Telemetry service, you must configure a target to send metering data to. The recommended endpoint is Gnocchi.
- Source the - admincredentials to gain access to admin-only CLI commands:- $ . admin-openrc
- To create the service credentials, complete these steps: - Create the - ceilometeruser:- $ openstack user create --domain default --password-prompt ceilometer User Password: Repeat User Password: +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | e0353a670a9e496da891347c589539e9 | | enabled | True | | id | c859c96f57bd4989a8ea1a0b1d8ff7cd | | name | ceilometer | +-----------+----------------------------------+ 
- Add the - adminrole to the- ceilometeruser.- $ openstack role add --project service --user ceilometer admin- Note - This command provides no output. 
- Create the - ceilometerservice entity:- $ openstack service create --name ceilometer \ --description "Telemetry" metering +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Telemetry | | enabled | True | | id | 5fb7fd1bb2954fddb378d4031c28c0e4 | | name | ceilometer | | type | metering | +-------------+----------------------------------+ 
 
- Register Gnocchi service in Keystone: - Create the - gnocchiuser:- $ openstack user create --domain default --password-prompt gnocchi User Password: Repeat User Password: +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | e0353a670a9e496da891347c589539e9 | | enabled | True | | id | 8bacd064f6434ef2b6bbfbedb79b0318 | | name | gnocchi | +-----------+----------------------------------+ 
- Create the - gnocchiservice entity:- $ openstack service create --name gnocchi \ --description "Metric Service" metric +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Metric Service | | enabled | True | | id | 205978b411674e5a9990428f81d69384 | | name | gnocchi | | type | metric | +-------------+----------------------------------+ 
- Add the - adminrole to the- gnocchiuser.- $ openstack role add --project service --user gnocchi admin- Note - This command provides no output. 
- Create the Metric service API endpoints: - $ openstack endpoint create --region RegionOne \ metric public http://controller:8041 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | b808b67b848d443e9eaaa5e5d796970c | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 205978b411674e5a9990428f81d69384 | | service_name | gnocchi | | service_type | metric | | url | http://controller:8041 | +--------------+----------------------------------+ $ openstack endpoint create --region RegionOne \ metric internal http://controller:8041 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | c7009b1c2ee54b71b771fa3d0ae4f948 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 205978b411674e5a9990428f81d69384 | | service_name | gnocchi | | service_type | metric | | url | http://controller:8041 | +--------------+----------------------------------+ $ openstack endpoint create --region RegionOne \ metric admin http://controller:8041 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | b2c00566d0604551b5fe1540c699db3d | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 205978b411674e5a9990428f81d69384 | | service_name | gnocchi | | service_type | metric | | url | http://controller:8041 | +--------------+----------------------------------+ 
 
Install Gnocchi¶
- Install the Gnocchi packages. Alternatively, Gnocchi can be installed using pip: - # apt-get install gnocchi-api gnocchi-metricd python-gnocchiclient- Note - Depending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu. 
- Install the uWSGI packages. The following method uses operating system provided packages. Another alternative would be to use pip(or pip3, depending on the distribution); using pip is not described in this doc: - # apt-get install uwsgi-plugin-python3 uwsgi- Note - Since the provided gnocchi-api wraps around uwsgi, you need to make sure that uWSGI is installed if you want to use gnocchi-api to run Gnocchi API. As Gnocchi API tier runs using WSGI, it can also alternatively be run using Apache httpd and mod_wsgi, or any other HTTP daemon. 
- Create the database for Gnocchi’s indexer: - Use the database access client to connect to the database server as the - rootuser:- $ mysql -u root -p
- Create the - gnocchidatabase:- CREATE DATABASE gnocchi;
- Grant proper access to the - gnocchidatabase:- GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'localhost' \ IDENTIFIED BY 'GNOCCHI_DBPASS'; GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'%' \ IDENTIFIED BY 'GNOCCHI_DBPASS'; - Replace - GNOCCHI_DBPASSwith a suitable password.
- Exit the database access client. 
 
- Edit the - /etc/gnocchi/gnocchi.conffile and add Keystone options:- In the - [api]section, configure gnocchi to use keystone:- [api] auth_mode = keystone port = 8041 uwsgi_mode = http-socket 
- In the - [keystone_authtoken]section, configure keystone authentication:- [keystone_authtoken] ... auth_type = password auth_url = http://controller:5000/v3 project_domain_name = Default user_domain_name = Default project_name = service username = gnocchi password = GNOCCHI_PASS interface = internalURL region_name = RegionOne - Replace - GNOCCHI_PASSwith the password you chose for the- gnocchiuser in the Identity service.
- In the - [indexer]section, configure database access:- [indexer] url = mysql+pymysql://gnocchi:GNOCCHI_DBPASS@controller/gnocchi - Replace - GNOCCHI_DBPASSwith the password you chose for Gnocchi’s indexer database.
- In the - [storage]section, configure location to store metric data. In this case, we will store it to the local file system. See Gnocchi documenation for a list of more durable and performant drivers:- [storage] # coordination_url is not required but specifying one will improve # performance with better workload division across workers. coordination_url = redis://controller:6379 file_basepath = /var/lib/gnocchi driver = file 
 
- Initialize Gnocchi: - gnocchi-upgrade
Finalize Gnocchi installation¶
- Restart the Gnocchi services: - # service gnocchi-api restart # service gnocchi-metricd restart 
Install and configure components¶
- Install the ceilometer packages: - # apt-get install ceilometer-agent-notification \ ceilometer-agent-central 
- Edit the - /etc/ceilometer/pipeline.yamlfile and complete the following section:- Configure Gnocchi connection: - publishers: # set address of Gnocchi # + filter out Gnocchi-related activity meters (Swift driver) # + set default archive policy - gnocchi://?filter_project=service&archive_policy=low 
 
- Edit the - /etc/ceilometer/ceilometer.conffile and complete the following actions:- In the - [DEFAULT]section, configure- RabbitMQmessage queue access:- [DEFAULT] ... transport_url = rabbit://openstack:RABBIT_PASS@controller - Replace - RABBIT_PASSwith the password you chose for the- openstackaccount in- RabbitMQ.
- 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 = ceilometer password = CEILOMETER_PASS interface = internalURL region_name = RegionOne - Replace - CEILOMETER_PASSwith the password you chose for the- ceilometeruser in the Identity service.
 
- Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage: - # ceilometer-upgrade
Finalize installation¶
- Restart the Telemetry services: - # service ceilometer-agent-central restart # service ceilometer-agent-notification restart 
