The WSGIScriptAlias in ``/etc/apache2/sites-available/ceilometer.conf`` shoule be ``/usr/lib/python2.7/dist-packages/ceilometer/api/app.wsgi`` Closes-Bug: #1644972 Change-Id: Id795520b1330114243c6045162abad6d4d1f1ae8 Signed-off-by: liyuenan <liyuenan@huawei.com>
3.1 KiB
Install and configure for Ubuntu
This section describes how to install and configure the Telemetry service, code-named ceilometer, 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. However,
unlike other services, the Telemetry service uses a NoSQL database. See
environment-nosql-database-ubuntu
to install and
configure MongoDB before proceeding further.
Create the
ceilometer
database:# mongo --host controller --eval ' db = db.getSiblingDB("ceilometer"); db.addUser({user: "ceilometer", pwd: "CEILOMETER_DBPASS", roles: [ "readWrite", "dbAdmin" ]})' MongoDB shell version: 2.4.x connecting to: controller:27017/test { "user" : "ceilometer", "pwd" : "72f25aeee7ad4be52437d7cd3fc60f6f", "roles" : [ "readWrite", "dbAdmin" ], "_id" : ObjectId("5489c22270d7fad1ba631dc3") }
Replace
CEILOMETER_DBPASS
with a suitable password.Note
If the command fails saying you are not authorized to insert a user, you may need to temporarily comment out the
auth
option in the/etc/mongodb.conf
file, restart the MongoDB service usingservice mongodb restart
, and try calling the command again.
Install and configure components
Install the packages:
# apt-get install ceilometer-api ceilometer-collector \ ceilometer-agent-central ceilometer-agent-notification \ python-ceilometerclient
Configure the Apache HTTP server
Create the
/etc/apache2/sites-available/ceilometer.conf
file with the following content:8777 Listen <VirtualHost *:8777> =ceilometer group=ceilometer display-name=%{GROUP} WSGIDaemonProcess ceilometer-api processes=2 threads=10 user WSGIProcessGroup ceilometer-api WSGIScriptAlias / "/usr/lib/python2.7/dist-packages/ceilometer/api/app.wsgi" WSGIApplicationGroup %{GLOBAL} /var/log/apache2/ceilometer_error.log ErrorLog /var/log/apache2/ceilometer_access.log combined CustomLog</VirtualHost> WSGISocketPrefix /var/run/apache2
Enable the Telemetry service virtual hosts:
# a2ensite ceilometer
Finalize installation
Reload the Apache HTTP server:
# service apache2 reload
Restart the Telemetry services:
# service ceilometer-agent-central restart # service ceilometer-agent-notification restart # service ceilometer-collector restart