OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, [email protected] Toni...

22
OpenStack Ceilometer Lucas Graf, ZHAW, [email protected] Toni Zehnder, ZHAW, [email protected]

Transcript of OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, [email protected] Toni...

Page 1: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

OpenStack CeilometerLucas Graf, ZHAW, [email protected]

Toni Zehnder, ZHAW, [email protected]

Page 2: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Intro

● Beginning 2012:○ Billing left out of OpenStack core○ But almost every deployment needs to track usage

information● Ceilometer started in May 2012● Written in Python● Main targets of Ceilometer in the beginning:

○ unique point of contact for billing systems○ easy to extend○ collectors should be independent

Page 3: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

What?

● Metering○ Measure the use of resources○ Data for billing

● Monitoring○ Is the system running?○ Notice system failures

Ceilometercurrently: meteringfuture: collect data for monitoring

Page 4: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Why?

Metering and Monitoring is important....

● Billing and Rating● Know how many resources are available

○ Is the infrastructure currently big enough?○ How many tenants could be served?○ Are there any bottlenecks?

● Prove that a system is running○ Are all hard disks running?○ Are the temperatures in the correct range?

Page 5: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

v0.1 Folsom

● Delivered in Oct 2012● Collects base metering

○ nova (instance, memory, cpu, ...)○ glance (image, image size, ...)○ cinder (volume, volume size)○ quantum (duration of network)

Page 6: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Grizzly

● Release 4th April 2013● Incubated Project● Integration in Horizon● Multi-Publisher● API v2 support

Page 7: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Havana

● Release Fall 2013● Integration with Synaps● Integration with Healthnmon (alerting)● ICCLab Hardware agent● ...

Page 8: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Architecture: Big Picture

Page 9: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Architecture

Two main behaviours● Polling Flow

○ Used disk space○ RAM usage○ Processor usage○ ...

● Notification Flow○ Start/Stop VM○ Create Image○ ...

Page 10: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Poll: 1

Page 11: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Poll: 2

Page 12: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Poll: 3

Page 13: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Notification: 1

Page 14: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Notification: 2

Page 15: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Ceilometer Requirements

● Database○ MongoDB○ SQLAlchemy supported DB○ Future supported DB drivers: cassandra, hbase

● Message Queue○ RabbitMQ○ Qpid○ ZeroMQ(not tested)

Page 16: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Using Ceilometer

● Install manually○ Collector○ Compute Agent○ API Server

● Install automated○ devstack http://docs.openstack.

org/developer/ceilometer/install.html#configuring-devstack

○ puppethttps://github.com/enovance/puppet-ceilometer

● Request ressources○ via Web API (RESTful)

Page 17: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

- Key from Keystonecurl -d '{"auth": {"tenantName": "admin", "passwordCredentials":{"username": "admin", "password": "admin_pass"}}}' -H "Content-type: application/json" http://192.168.1.1:35357/v2.0/tokens

Demo: authorization

Page 18: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

curl -v -H 'X-Auth-Token: '$KID -X GET http://192.168.1.2:9000/v2/resources/(resource_id)/meters/(meter_id)/

API v2 Demo: Request data

Page 19: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

{ "counter_name": "instance", "counter_type": "gauge", "counter_unit": "instance", "counter_volume": 1.0, "message_id": "5460acc-4fd6-480d-ab18-9735ec7b1996", "project_id": "35b17138-b364-4e6a-a131-8f3099c5be68", "resource_id": "bd9431c1-8d69-4ad3-803a-8d4a6bfd36", "resource_metadata": {}, "source": "openstack", "timestamp": "2013-02-14T15:16:04.773256", "user_id": "efd87807-12d2-4b38-9c70-5f5c2ac427ff"}

Demo: Data sample JSON

Page 20: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Extending

● Agent○ Loads all plugins in ceilometer.poll.compute○ call get_counters() Method from the plugins

● Plugin

http://docs.openstack.org/developer/ceilometer/contributing/index.html

Page 21: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

ICCLab and Ceilometer

● Currently○ Deploying Ceilometer on test bed

● Future○ Extend Ceilometer with a hardware agent

■ Collect/Record hardware data■ Easy to extend

● new Plugins for collecting data such as IPMI, SMART, ...■ In Havana Release

Page 22: OpenStack Ceilometer - SystemsX.ch Ceilometer Lucas Graf, ZHAW, graflu0@students.zhaw.ch Toni Zehnder, ZHAW, zehndton@students.zhaw.ch Intro Beginning 2012: Billing left out of OpenStack

Thanks!Questions?