我要评分
获取效率
正确性
完整性
易理解

Installing Ceilometer

Ceilometer monitors and measures computing resources. Install Ceilometer on the controller and compute nodes. The operations for installing Ceilometer on the controller node are different from those on the compute node.

Installing and Configuring Ceilometer on the Controller Node

  1. Create Keystone resource objects.
    openstack user create --domain default --password-prompt ceilometer 
    openstack role add --project service --user ceilometer admin 
    openstack service create --name ceilometer --description "Telemetry" metering

    The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()

  2. Install Ceilometer.
    yum install openstack-ceilometer-notification openstack-ceilometer-central
  3. Modify the /etc/ceilometer/pipeline.yaml configuration file.
    1. Open the file.
      vi /etc/ceilometer/pipeline.yaml
    2. Press i to enter the insert mode and modify the following content:
      publishers: 
          # set address of Gnocchi 
          # + filter out Gnocchi-related activity meters (Swift driver) 
          # + set default archive policy 
          - gnocchi://?filter_project=service&archive_policy=low
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  4. Modify the /etc/ceilometer/ceilometer.conf configuration file.
    1. Open the file.
      vi /etc/ceilometer/ceilometer.conf
    2. Press i to enter the insert mode and modify the following content:
      [DEFAULT]  
      transport_url = rabbit://openstack:RABBIT_PASSWORD@controller
       
      [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_PASSWORD
      interface = internalURL 
      region_name = RegionOne

      Replace RABBIT_PASSWORD with the RabbitMQ password and replace CEILOMETER_PASSWORD with the password of the Ceilometer user. The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()

    1. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  5. Initialize the database.
    ceilometer-upgrade
  6. Start the Ceilometer service.
    systemctl enable openstack-ceilometer-notification.service openstack-ceilometer-central.service 
    systemctl start openstack-ceilometer-notification.service openstack-ceilometer-central.service

Installing and Configuring Ceilometer on the Compute Node

  1. Install Ceilometer.
    yum install openstack-ceilometer-compute
    yum install openstack-ceilometer-ipmi
  2. Modify the /etc/ceilometer/ceilometer.conf configuration file.
    1. Open the file.
      vi /etc/ceilometer/ceilometer.conf
    2. Press i to enter the insert mode and modify the following content:
      [DEFAULT]   
      transport_url = rabbit://openstack:RABBIT_PASSWORD@controller
      [service_credentials] 
      auth_url = http://controller:5000/v3 
      project_domain_id = default 
      user_domain_id = default 
      auth_type = password 
      username = ceilometer 
      project_name = service 
      password = CEILOMETER_PASSWORD
      interface = internalURL 
      region_name = RegionOne

      Replace RABBIT_PASSWORD with the RabbitMQ password of OpenStack and replace CEILOMETER_PASSWORD with the user authentication password of Ceilometer. The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()

    1. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  3. Modify the /etc/nova/nova.conf configuration file.
    1. Open the file.
      vi /etc/nova/nova.conf
    2. Press i to enter the insert mode and modify the following content:
      [DEFAULT] 
      instance_usage_audit = True 
      instance_usage_audit_period = hour 
       
      [notifications] 
      notify_on_state_change = vm_and_task_state 
       
      [oslo_messaging_notifications] 
      driver = messagingv2
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  4. Modify the /etc/sudoers file.
    1. Open the file.
      vi /etc/sudoers
    2. Press i to enter the insert mode and modify the following content:
      ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf *
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  5. Modify the /etc/ceilometer/polling.yaml file.
    1. Open the file.
      vi /etc/ceilometer/polling.yaml
    2. Press i to enter the insert mode and add the following content:
      - name: ipmi 
        interval: 300 
        meters: 
          - hardware.ipmi.temperature

      The following figure shows the format:

    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  6. Start the agent service.
    systemctl enable openstack-ceilometer-compute.service
    systemctl start openstack-ceilometer-compute.service
    systemctl enable openstack-ceilometer-ipmi.service
    systemctl start openstack-ceilometer-ipmi.service
  7. Restart the compute service.
    systemctl restart openstack-nova-compute.service

Enabling Service Measurement for Cinder

You need to perform the operations in this section on the controller and compute nodes. Pay attention to the node scenarios during the operations. The environment must contain block storage devices.

  1. Modify the /etc/cinder/cinder.conf configuration file.
    1. Open the file.
      vi /etc/cinder/cinder.conf
    2. Press i to enter the insert mode and add the following content under [oslo_messaging_notifications]:
      [oslo_messaging_notifications]
      driver = messagingv2
    1. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  2. Restart the block storage service on the controller node.
    systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service
    Restart the block storage service on the compute node.
    systemctl restart openstack-cinder-volume.service

Enabling Service Measurement for Glance

You need to perform the operations in this section on the controller node.

  1. Modify the /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf configuration files.
    1. Open the file (for example /etc/glance/glance-api.conf).
      vi /etc/glance/glance-api.conf

      To open the /etc/glance/glance-registry.conf file, run the following command:

      vi /etc/glance/glance-registry.conf
    1. Press i to enter the insert mode and add the following content:
      [DEFAULT]  
      transport_url = rabbit://openstack:RABBIT_PASSWORD@controller
       
      [oslo_messaging_notifications] 
      driver = messagingv2
    2. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  2. Restart the services.
    systemctl restart openstack-glance-api.service openstack-glance-registry.service

Enabling Service Measurement for Neutron

You need to perform the operations in this section on the controller node.

  1. Modify the /etc/neutron/neutron.conf file.
    1. Open the file.
      vi /etc/neutron/neutron.conf
    2. Press i to enter the insert mode and modify the following content:
      [oslo_messaging_notifications] 
      driver = messagingv2
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  2. Restart the network service.
    systemctl restart neutron-server.service