Restarting mongodb service is not required since we are stopping and starting the service in the step above and restarting the services does the same thing. Change-Id: I7bcb0e69a5480ba444451b7a304fd3c96fc6540e
16 KiB
Install and configure controller node
This section describes how to install and configure the Telemetry module, code-named ceilometer, on the controller node. The Telemetry module uses separate agents to collect measurements from each OpenStack service in your environment.
To configure prerequisites
Before you install and configure Telemetry, you must install
MongoDB, create a MongoDB database, service credentials,
and API endpoint.
obs
Enable the Open Build Service repositories for MongoDB based on your openSUSE or SLES version:
On openSUSE:
# zypper addrepo -f obs://server:database/openSUSE_13.2 DatabaseOn SLES:
# zypper addrepo -f obs://server:database/SLE_12 DatabaseNote
The packages are signed by GPG key
562111AC05905EA8. You should verify the fingerprint of the imported GPG key before using it.Key Name: server:database OBS Project <server:database@build.opensuse.org> Key Fingerprint: 116EB86331583E47E63CDF4D562111AC05905EA8 Key Created: Thu Oct 11 20:08:39 2012 Key Expires: Sat Dec 20 20:08:39 2014Install the MongoDB package:
# zypper install mongodb
rdo
Install the MongoDB package:
# yum install mongodb-server mongodb
ubuntu
Install the MongoDB package:
# apt-get install mongodb-server mongodb-clients python-pymongo
obs
- Edit the
/etc/mongodb.conffile and complete the following actions:Configure the
bind_ipkey to use the management interface IP address of the controller node.bind_ip = 10.0.0.11By default, MongoDB creates several 1 GB journal files in the
/var/lib/mongodb/journaldirectory. If you want to reduce the size of each journal file to 128 MB and limit total journal space consumption to 512 MB, assert thesmallfileskey:smallfiles = trueYou can also disable journaling. For more information, see the MongoDB manual.
Start the MongoDB services and configure them to start when the system boots:
# systemctl enable mongodb.service # systemctl start mongodb.service
rdo
- Edit the
/etc/mongod.conffile and complete the following actions:Configure the
bind_ipkey to use the management interface IP address of the controller node.bind_ip = 10.0.0.11By default, MongoDB creates several 1 GB journal files in the
/var/lib/mongodb/journaldirectory. If you want to reduce the size of each journal file to 128 MB and limit total journal space consumption to 512 MB, assert thesmallfileskey:smallfiles = trueYou can also disable journaling. For more information, see the MongoDB manual.
Start the MongoDB services and configure them to start when the system boots:
# systemctl enable mongod.service # systemctl start mongod.service
ubuntu
- Edit the
/etc/mongodb.conffile and complete the following actions:Configure the
bind_ipkey to use the management interface IP address of the controller node.bind_ip = 10.0.0.11By default, MongoDB creates several 1 GB journal files in the
/var/lib/mongodb/journaldirectory. If you want to reduce the size of each journal file to 128 MB and limit total journal space consumption to 512 MB, assert thesmallfileskey:smallfiles = trueIf you change the journaling configuration, stop the MongoDB service, remove the initial journal files, and start the service:
# service mongodb stop # rm /var/lib/mongodb/journal/prealloc.* # service mongodb startYou can also disable journaling. For more information, see the MongoDB manual.
obs or ubuntu
Create the
ceilometerdatabase:# 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_DBPASSwith a suitable password.
rdo
Create the
ceilometerdatabase:# mongo --host controller --eval ' db = db.getSiblingDB("ceilometer"); db.createUser({user: "ceilometer", pwd: "CEILOMETER_DBPASS", roles: [ "readWrite", "dbAdmin" ]})' MongoDB shell version: 2.6.x connecting to: controller:27017/test Successfully added user: { "user" : "ceilometer", "roles" : [ "readWrite", "dbAdmin" ] }Replace
CEILOMETER_DBPASSwith a suitable password.
Source the
admincredentials to gain access to admin-only CLI commands:$ source admin-openrc.shTo create the service credentials, complete these steps:
Create the
ceilometeruser:$ openstack user create --password-prompt ceilometer User Password: Repeat User Password: +----------+----------------------------------+ | Field | Value | +----------+----------------------------------+ | email | None | | enabled | True | | id | b7657c9ea07a4556aef5d34cf70713a3 | | name | ceilometer | | username | ceilometer | +----------+----------------------------------+Add the
adminrole to theceilometeruser.$ openstack role add --project service --user ceilometer admin +-------+----------------------------------+ | Field | Value | +-------+----------------------------------+ | id | cd2cb9a39e874ea69e5d4b896eb16128 | | name | admin | +-------+----------------------------------+Create the
ceilometerservice entity:$ openstack service create --name ceilometer \ --description "Telemetry" metering +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Telemetry | | enabled | True | | id | 3405453b14da441ebb258edfeba96d83 | | name | ceilometer | | type | metering | +-------------+----------------------------------+
Create the Telemetry module API endpoint:
$ openstack endpoint create \ --publicurl http://controller:8777 \ --internalurl http://controller:8777 \ --adminurl http://controller:8777 \ --region RegionOne \ metering +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | adminurl | http://controller:8777 | | id | d3716d85b10d4e60a67a52c6af0068cd | | internalurl | http://controller:8777 | | publicurl | http://controller:8777 | | region | RegionOne | | service_id | 3405453b14da441ebb258edfeba96d83 | | service_name | ceilometer | | service_type | metering | +--------------+----------------------------------+
To install and configure the Telemetry module components
obs
Install the packages:
# zypper install openstack-ceilometer-api \ openstack-ceilometer-collector \ openstack-ceilometer-agent-notification \ openstack-ceilometer-agent-central python-ceilometerclient \ openstack-ceilometer-alarm-evaluator \ openstack-ceilometer-alarm-notifier
rdo
Install the packages:
# yum install openstack-ceilometer-api \ openstack-ceilometer-collector openstack-ceilometer-notification \ openstack-ceilometer-central openstack-ceilometer-alarm \ python-ceilometerclient
ubuntu
Install the packages:
# apt-get install ceilometer-api ceilometer-collector \ ceilometer-agent-central ceilometer-agent-notification \ ceilometer-alarm-evaluator ceilometer-alarm-notifier \ python-ceilometerclient
Generate a random value to use as the telemetry secret:
$ openssl rand -hex 10Edit the
/etc/ceilometer/ceilometer.conffile and complete the following actions:In the
[database]section, configure database access:[database] ... connection = mongodb://ceilometer:CEILOMETER_DBPASS@controller:27017/ceilometerReplace
CEILOMETER_DBPASSwith the password you chose for the Telemetry module database. You must escape special characters such as ':', '/', '+', and '@' in the connection string in accordance with RFC2396.In the
[DEFAULT]and[oslo_messaging_rabbit]sections, configureRabbitMQmessage queue access:[DEFAULT] ... rpc_backend = rabbit [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASSReplace
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] ... auth_uri = http://controller:5000/v2.0 identity_uri = http://controller:35357 admin_tenant_name = service admin_user = ceilometer admin_password = CEILOMETER_PASSReplace
CEILOMETER_PASSwith the password you chose for theceilometeruser in the Identity service.Note
Comment out any
auth_host,auth_port, andauth_protocoloptions because theidentity_urioption replaces them.In the
[service_credentials]section, configure service credentials:[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 = RegionOneReplace
CEILOMETER_PASSwith the password you chose for theceilometeruser in the Identity service.In the
[publisher]section, configure the telemetry secret:[publisher] ... telemetry_secret = TELEMETRY_SECRETReplace TELEMETRY_SECRET with the telemetry secret that you generated in a previous step.
obs
In the
[collector]section, configure the dispatcher:[collector] ... dispatcher = database(Optional) To assist with troubleshooting, enable verbose logging in the
[DEFAULT]section:[DEFAULT] ... verbose = True
rdo or ubuntu
(Optional) To assist with troubleshooting, enable verbose logging in the
[DEFAULT]section:[DEFAULT] ... verbose = True
To finalize installation
obs
Start the Telemetry services and configure them to start when the system boots:
# systemctl enable openstack-ceilometer-api.service \ openstack-ceilometer-agent-notification.service \ openstack-ceilometer-agent-central.service \ openstack-ceilometer-collector.service \ openstack-ceilometer-alarm-evaluator.service \ openstack-ceilometer-alarm-notifier.service # systemctl start openstack-ceilometer-api.service \ openstack-ceilometer-agent-notification.service \ openstack-ceilometer-agent-central.service \ openstack-ceilometer-collector.service \ openstack-ceilometer-alarm-evaluator.service \ openstack-ceilometer-alarm-notifier.service
rdo
Start the Telemetry services and configure them to start when the system boots:
# systemctl enable openstack-ceilometer-api.service \ openstack-ceilometer-notification.service \ openstack-ceilometer-central.service \ openstack-ceilometer-collector.service \ openstack-ceilometer-alarm-evaluator.service \ openstack-ceilometer-alarm-notifier.service # systemctl start openstack-ceilometer-api.service \ openstack-ceilometer-notification.service \ openstack-ceilometer-central.service \ openstack-ceilometer-collector.service \ openstack-ceilometer-alarm-evaluator.service \ openstack-ceilometer-alarm-notifier.service
ubuntu
Restart the Telemetry services:
# service ceilometer-agent-central restart # service ceilometer-agent-notification restart # service ceilometer-api restart # service ceilometer-collector restart # service ceilometer-alarm-evaluator restart # service ceilometer-alarm-notifier restart