From eb87e3a28e83f82914536e2501cd9cb7a626a811 Mon Sep 17 00:00:00 2001 From: KATO Tomoyuki Date: Mon, 13 Jul 2015 13:55:48 +0900 Subject: [PATCH] [install-guide] convert ceilometer config to RST * section_ceilometer-nova.xml * section_ceilometer-glance.xml * section_ceilometer-cinder.xml * section_ceilometer-swift.xml Change-Id: I8f0e3e6763db72c793aa40209f892adb04b8e222 Implements: blueprint installguide-liberty --- .../source/ceilometer-cinder.rst | 53 ++++++ ....rst => ceilometer-controller-install.rst} | 0 .../source/ceilometer-glance.rst | 41 ++++ .../source/ceilometer-nova.rst | 178 ++++++++++++++++++ .../source/ceilometer-swift.rst | 128 +++++++++++++ doc/install-guide-rst/source/ceilometer.rst | 2 +- 6 files changed, 401 insertions(+), 1 deletion(-) rename doc/install-guide-rst/source/{ceilometer-controller.rst => ceilometer-controller-install.rst} (100%) diff --git a/doc/install-guide-rst/source/ceilometer-cinder.rst b/doc/install-guide-rst/source/ceilometer-cinder.rst index 89cc3d8c44..af05a62bdf 100644 --- a/doc/install-guide-rst/source/ceilometer-cinder.rst +++ b/doc/install-guide-rst/source/ceilometer-cinder.rst @@ -1,3 +1,56 @@ =================================== Configure the Block Storage service =================================== + +To retrieve volume-oriented events and samples, you must configure +the Block Storage service to send notifications to the message bus. +Perform these steps on the controller and storage nodes. + +To configure prerequisites +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Edit the :file:`/etc/cinder/cinder.conf` file and complete the +following actions: + +1. In the ``[DEFAULT]`` section, configure notifications: + + .. code-block:: ini + + [DEFAULT] + ... + control_exchange = cinder + notification_driver = messagingv2 + +.. only:: obs or rdo + + 2. Restart the Block Storage services on the controller node: + + .. code-block:: console + + # systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service + + 3. Restart the Block Storage services on the storage nodes: + + .. code-block:: console + + # systemctl restart openstack-cinder-volume.service + +.. only:: ubuntu + + 2. Restart the Block Storage services on the controller node: + + .. code-block:: console + + # service cinder-api restart + # service cinder-scheduler restart + + 3. Restart the Block Storage services on the storage nodes: + + .. code-block:: console + + # service cinder-volume restart + +4. Use the ``cinder-volume-usage-audit`` command to retrieve meters + on demand. For more information, see `Block Storage audit script + setup to get notifications `__. diff --git a/doc/install-guide-rst/source/ceilometer-controller.rst b/doc/install-guide-rst/source/ceilometer-controller-install.rst similarity index 100% rename from doc/install-guide-rst/source/ceilometer-controller.rst rename to doc/install-guide-rst/source/ceilometer-controller-install.rst diff --git a/doc/install-guide-rst/source/ceilometer-glance.rst b/doc/install-guide-rst/source/ceilometer-glance.rst index 91e5288235..f9e48c7980 100644 --- a/doc/install-guide-rst/source/ceilometer-glance.rst +++ b/doc/install-guide-rst/source/ceilometer-glance.rst @@ -1,3 +1,44 @@ =========================== Configure the Image service =========================== + +To retrieve image-oriented events and samples, configure +the Image service to send notifications to the message bus. +Perform these steps on the controller node. + +Edit the :file:`/etc/glance/glance-api.conf` and +:file:`/etc/glance/glance-registry.conf` files and +complete the following actions: + +1. In the ``[DEFAULT]`` section, configure notifications + and RabbitMQ message broker access: + + .. code-block:: ini + + [DEFAULT] + ... + notification_driver = messagingv2 + rpc_backend = rabbit + rabbit_host = controller + rabbit_userid = openstack + rabbit_password = RABBIT_PASS + + Replace ``RABBIT_PASS`` with the password you chose for + the ``openstack`` account in ``RabbitMQ``. + +.. only:: obs or rdo + + 2. Restart the Image service: + + .. code-block:: console + + # systemctl restart openstack-glance-api.service openstack-glance-registry.service + +.. only:: ubuntu + + 2. Restart the Image service: + + .. code-block:: console + + # service glance-registry restart + # service glance-api restart diff --git a/doc/install-guide-rst/source/ceilometer-nova.rst b/doc/install-guide-rst/source/ceilometer-nova.rst index 03036dbab8..62b2cfefe7 100644 --- a/doc/install-guide-rst/source/ceilometer-nova.rst +++ b/doc/install-guide-rst/source/ceilometer-nova.rst @@ -1,3 +1,181 @@ ============================= Configure the Compute service ============================= + +Telemetry uses a combination of notifications and an agent to +collect Compute meters. Perform these steps on each compute node. + +To install and configure the agent +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. only:: obs + + 1. Install the packages: + + .. code-block:: console + + # zypper install openstack-ceilometer-agent-compute + +.. only:: rdo + + 1. Install the packages: + + .. code-block:: console + + # yum install openstack-ceilometer-compute python-ceilometerclient python-pecan + +.. only:: ubuntu + + 1. Install the packages: + + .. code-block:: console + + # apt-get install ceilometer-agent-compute + +2. Edit the :file:`/etc/ceilometer/ceilometer.conf` file and + complete the following actions: + + a. In the ``[publisher]`` section, configure the telemetry secret: + + .. code-block:: ini + :linenos: + + [publisher] + ... + telemetry_secret = TELEMETRY_SECRET + + Replace ``TELEMETRY_SECRET`` with the telemetry secret you + chose for the Telemetry module. + + b. In the ``[DEFAULT]`` and ``[oslo_messaging_rabbit]`` sections, + configure ``RabbitMQ`` message queue access: + + .. code-block:: ini + :linenos: + + [DEFAULT] + ... + rpc_backend = rabbit + + [oslo_messaging_rabbit] + ... + rabbit_host = controller + rabbit_userid = openstack + rabbit_password = RABBIT_PASS + + Replace ``RABBIT_PASS`` with the password you chose for the + ``openstack`` account in ``RabbitMQ``. + + c. In the ``[keystone_authtoken]`` section, + configure Identity service access: + + .. code-block:: ini + :linenos: + + [keystone_authtoken] + ... + auth_uri = http://controller:5000/v2.0 + identity_uri = http://controller:35357 + admin_tenant_name = service + admin_user = ceilometer + admin_password = CEILOMETER_PASS + + Replace ``CEILOMETER_PASS`` with the password you chose for the + Telemetry module database. + + .. note:: + + Comment out any ``auth_host``, ``auth_port``, and + ``auth_protocol`` options because the ``identity_uri`` + option replaces them. + + d. In the ``[service_credentials]`` section, configure service + credentials: + + .. code-block:: ini + :linenos: + + [service_credentials] + ... + os_auth_url = http://controller:5000/v2.0 + os_username = ceilometer + os_tenant_name = service + os_password = CEILOMETER_PASS + os_endpoint_type = internalURL + os_region_name = RegionOne + + Replace ``CEILOMETER_PASS`` with the password you chose for + the ``ceilometer`` user in the Identity service. + + e. (Optional) To assist with troubleshooting, enable verbose + logging in the ``[DEFAULT]`` section: + + .. code-block:: ini + :linenos: + + [DEFAULT] + ... + verbose = True + +To configure notifications +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configure the Compute service to send notifications to the message bus. + +1. Edit the :file:`/etc/nova/nova.conf` file and configure + notifications in the ``[DEFAULT]`` section: + + .. code-block:: ini + :linenos: + + [DEFAULT] + ... + instance_usage_audit = True + instance_usage_audit_period = hour + notify_on_state_change = vm_and_task_state + notification_driver = messagingv2 + +To finalize installation +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. only:: obs + + 1. Start the Telemetry agent and configure it to start when the + system boots: + + .. code-block:: console + + # systemctl enable openstack-ceilometer-agent-compute.service + # systemctl start openstack-ceilometer-agent-compute.service + +.. only:: rdo + + 1. Start the Telemetry agent and configure it to start when the + system boots: + + .. code-block:: console + + # systemctl enable openstack-ceilometer-compute.service + # systemctl start openstack-ceilometer-compute.service + +.. only:: obs or rdo + + 2. Restart the Compute service: + + .. code-block:: console + + # systemctl restart openstack-nova-compute.service + +.. only:: ubuntu + + 1. Restart the agent: + + .. code-block:: console + + # service ceilometer-agent-compute restart + + 2. Restart the Compute service: + + .. code-block:: console + + # service nova-compute restart diff --git a/doc/install-guide-rst/source/ceilometer-swift.rst b/doc/install-guide-rst/source/ceilometer-swift.rst index c3c4ef0a37..46d9a549e3 100644 --- a/doc/install-guide-rst/source/ceilometer-swift.rst +++ b/doc/install-guide-rst/source/ceilometer-swift.rst @@ -1,3 +1,131 @@ ==================================== Configure the Object Storage service ==================================== + +To retrieve storage-oriented events and samples, configure the +Object Storage service to send notifications to the message bus. + +To configure prerequisites +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Telemetry service requires access to the Object Storage +service using the ``ResellerAdmin`` role. Perform +these steps on the controller node. + +1. Source the ``admin`` credentials to gain access to admin-only + CLI commands. + + .. code-block:: console + + $ source admin-openrc.sh + +2. Create the ``ResellerAdmin`` role: + + .. code-block:: console + + $ openstack role create ResellerAdmin + +-------+----------------------------------+ + | Field | Value | + +-------+----------------------------------+ + | id | 462fa46c13fd4798a95a3bfbe27b5e54 | + | name | ResellerAdmin | + +-------+----------------------------------+ + +3. Add the ``ResellerAdmin`` role to the ``service`` tenant and + ``ceilometer`` user: + + .. code-block:: console + + $ openstack role add --project service --user ceilometer ResellerAdmin + +-------+----------------------------------+ + | Field | Value | + +-------+----------------------------------+ + | id | 462fa46c13fd4798a95a3bfbe27b5e54 | + | name | ResellerAdmin | + +-------+----------------------------------+ + +To configure notifications +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Perform these steps on the controller and any other nodes that +run the Object Storage proxy service. + +1. Edit the :file:`/etc/swift/proxy-server.conf` file + and complete the following actions: + + a. In the ``[filter:keystoneauth]`` section, add the + ``ResellerAdmin`` role: + + .. code-block:: ini + :linenos: + + [filter:keystoneauth] + ... + operator_roles = admin,user,ResellerAdmin + + b. In the ``[pipeline:main]`` section, add ``ceilometer``: + + .. code-block:: ini + :linenos: + + [pipeline:main] + ... + pipeline = authtoken cache healthcheck keystoneauth proxy-logging ceilometer proxy-server + + c. In the ``[filter:ceilometer]`` section, configure notifications: + + .. code-block:: ini + :linenos: + + [filter:ceilometer] + ... + paste.filter_factory = ceilometermiddleware.swift:filter_factory + control_exchange = swift + url = rabbit://openstack:RABBIT_PASS@controller:5672/ + driver = messagingv2 + topic = notifications + log_level = WARN + + Replace ``RABBIT_PASS`` with the password you chose for the + ``openstack`` account in ``RabbitMQ``. + +2. Add the ``swift`` system user to the ``ceilometer`` system group + to permit access to the Telemetry configuration files by the + Object Storage service: + + .. code-block:: console + + # usermod -a -G ceilometer swift + +.. only:: obs + + + 3. Restart the Object Storage proxy service: + + .. code-block:: console + + # systemctl restart openstack-swift-proxy.service + +.. only:: rdo + + 3. Install the ``ceilometermiddleware`` package: + + .. Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1214928 + + .. code-block:: console + + # pip install ceilometermiddleware + + 4. Restart the Object Storage proxy service: + + .. code-block:: console + + # systemctl restart openstack-swift-proxy.service + +.. only:: ubuntu + + 3. Restart the Object Storage proxy service: + + .. code-block:: console + + # service swift-proxy restart diff --git a/doc/install-guide-rst/source/ceilometer.rst b/doc/install-guide-rst/source/ceilometer.rst index ee63b9cdaf..175fdb946c 100644 --- a/doc/install-guide-rst/source/ceilometer.rst +++ b/doc/install-guide-rst/source/ceilometer.rst @@ -4,7 +4,7 @@ Add the Telemetry module .. toctree:: - ceilometer-controller.rst + ceilometer-controller-install.rst ceilometer-nova.rst ceilometer-glance.rst ceilometer-cinder.rst