Jump to: navigation, search

Difference between revisions of "Ceilometer/blueprints/multi-publisher"

 
m (Text replace - "__NOTOC__" to "")
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
* '''Launchpad Entry''': [[GlanceSpec]]:server-templates
+
* '''Launchpad Entry''': [[CeilometerSpec]]:multi-publisher
* '''Created''': 28 Sep 2011
+
* '''Created''': 05 Dec 2012
* '''Contributors''': Glen Campbell
+
* '''Contributors''': Yunhong Jiang
  
 
== Summary ==
 
== Summary ==
  
A server template consists of a base image plus the definitions of configuration metadata. For example, a server template might include an Apache HTTP server; the metadata would include the server name, location of the HTML root directory, and tuning parameters. Glance stores the template in its registry; Nova, when creating a new server from the template, would validate the required metadata and configure the internal applications directly.
+
Multiple publishers in ceilometer transform collected measurements into different format, like meter, metrics etc, and publish to different target, like data storage, synaps etc, through different conduit, like rpc, UDP etc.
  
The metadata could also be used to drive automatically-generated web interfaces to solicit the configuration metadata.
+
To support different requirement from different publishers, a set a transformers are orgnized as pipeline, to transform the data from counter to meter, metrics etc.
 
 
Server templates could greatly increase the flexibility and usability of compute clouds; rather than creating a "bare" server and configuring it manually, this could allow users to prepopulate applications in a server image and configure them automatically.
 
  
 
== Release Note ==
 
== Release Note ==
  
This section should include a paragraph describing the end-user impact of this change.  It is meant to be included in the release notes of the first release in which it is implemented.  (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)
+
== Rationale ==
  
It is mandatory.
+
== User stories ==
  
== Rationale ==
+
Disk usage data are published to ceilometer collector through message bus as meter, and published to synaps through [[PutMetricData]] API as metrics.
  
== User stories ==
+
Metering system publish network usage data as per-vnic usage information, while CW publish the network usage data as a whole.
  
 
== Assumptions ==
 
== Assumptions ==
  
Glance ''stores'' the server template and metadata map; Nova must ''implement'' the server template.
+
== Design ==
  
== Design ==
+
This is just one possible design for this feature (keep that in mind).
 +
 
 +
Five components for multiple publisher support, data collector, transformer, publisher and pipeline, pipeline manager.
  
This is just one possible design for this feature (keep that in mind). At its simplest, a server template consists of a core image and a ''metadata map''. The metadata map defines metadata that must be collected during server creation and a list of files (on the server) that must be modified using the defined metadata.
+
* Data collectors collect measurements from other openstack project. Now two types of data collector in ceilometer, pollster and notification handler.
 +
* Transformers transform the data from data collectors or from other transformers. They can change the counter name, translate to another data format, drop some data etc.
 +
* Publishers publish data to the world through conduit.
 +
* Pipeline is a logic components chaining the data collectors, transformers and publishers together, so that measurement flows from different data collectors to different publishers. Multiple pipeline exists in the system.
 +
* Pipeline manager manages the pipelines in the system. Only one pipeline manager exist in the system. The measurement collected from the collector will be dispatched to the pipeline manager.
  
Here is a simple example: let's assume that the server template has a Linux server with Apache HTTP installed. Apache needs to know the IP address of the server and the directory on the server that contains the HTML files.
+
== Implementation ==
  
The metadata map would look something like this:
+
Below is the pipeline definition.
  
 +
Top level is an array of pipeline definition.
 +
 +
Each pipeline item defines a list of targeted counter, an list of transformers with their corresponding parameter as dictionary, and publishers.
  
 
<pre><nowiki>
 
<pre><nowiki>
  metadata {
+
[
  IP_ADDRESS;
+
    {
  HTML_ROOT : string(1,255) : "/var/www/";
+
        "counter_names" : ["counter_1", "counter_2"],
  }
+
 
  map {
+
        "tranformers":[
  /etc/httpd/includes/server.inc
+
                          {"Transformer_name": "Transformer_1",
  }
+
                            "Transformer_param": {}},
 +
                          {"Transformer_name": "Transformer_2",
 +
                            "Transformer_param": {}}
 +
                      ],
 +
 
 +
        "publishers": ["publisher_1", "publisher_2"]
 +
 
 +
    },
 +
 
 +
    {
 +
 
 +
        "counter_names" : ["counter_3", "counter_4"],
 +
 
 +
 
 +
        "tranformers":  [
 +
 
 +
                              {"Transformer_name": "Transformer_1",
 +
 
 +
                              "Transformer_param": {}},
 +
 
 +
                              {"Transformer_name": "Transformer_2",
 +
 
 +
                              "Transformer_param": {}}
 +
 
 +
                        ],
 +
 
 +
        "publishers": ["publisher_1", "publisher_2"]
 +
 
 +
    }
 +
 
 +
]
 +
 
 
</nowiki></pre>
 
</nowiki></pre>
  
  
In this case, the <code><nowiki>metadata</nowiki></code> section defines the metadata components required; the <code><nowiki>map</nowiki></code> section defines the files that must be parsed and have the metadata configured. Within the <code><nowiki>metadata</nowiki></code> section, there are two defined items. <code><nowiki>IP_ADDRESS</nowiki></code> is a predefined (built-in) value, and <code><nowiki>HTML_ROOT</nowiki></code> is the root directory of the web server.
+
Target counter name format: "*", "counter_name", or "!counter_name". It's from the 'name' field in the Counter named tuple.
  
For <code><nowiki>HTML_ROOT</nowiki></code>, there are three sub-fields: the name, the data type, and (in this case) the default value. The token <code><nowiki>required</nowiki></code> could be used for items that must be supplied by the user.  
+
Transformer_name is from namespace definitions in setup.py.
  
When the server is created, a (as-yet-undefined) process would look at the files in the <code><nowiki>map</nowiki></code> section and replace metadata tokens with the defined values. For example, the file might contain:
+
Publisher_name is from namespace definitions in setup.py.
 +
 
 +
=== UI Changes ===
 +
 
 +
User should provide a config file for the pipeline definition. Currently we support yaml file format.
 +
 
 +
An alternate syntax in YAML might be:
  
  
 
<pre><nowiki>
 
<pre><nowiki>
<VirtualHost {{IP_ADDRESS}}:*>
+
---
   DocumentRoot "{{HTML_ROOT}}";
+
  -
</VirtualHost>
+
    counters: counter_1, counter_2
 +
    transformers:
 +
      -
 +
        name: Transformer_1
 +
        parameters:
 +
          p1: value
 +
    publishers:
 +
      - publisher_1
 +
      - publisher_2
 +
 
 +
   -
 +
    counters: counter_3, counter_4
 +
    transformers:
 +
      -
 +
        name: Transformer_2
 +
        parameters:
 +
          p1: value
 +
    publishers:
 +
      - publisher_1
 +
      - publisher_2
 
</nowiki></pre>
 
</nowiki></pre>
  
  
== Implementation ==
+
or more compactly
  
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
 
  
=== UI Changes ===
+
<pre><nowiki>
 +
 
 +
- counters: counter_1, counter_2
 +
  publishers: [publisher_1, publisher_2]
 +
  transformers:
 +
  - name: Transformer_1
 +
    parameters: {p1: value}
 +
- counters: counter_3, counter_4
 +
  publishers: [publisher_1, publisher_2]
 +
  transformers:
 +
  - name: Transformer_2
 +
    parameters: {p1: value}
 +
</nowiki></pre>
  
Should cover changes required to the UI, or specific UI that is required to implement this
 
  
 
=== Code Changes ===
 
=== Code Changes ===
  
Code changes should include an overview of what needs to change, and in some cases even the specific details.
+
Changes to agent manager, central manager, collect service to load the transformers and publishers, to setup the pipeline manager.
 +
 
 +
Add the implementation of transformer, the publishers etc.
  
 
=== Migration ===
 
=== Migration ===

Latest revision as of 23:29, 17 February 2013

  • Launchpad Entry: CeilometerSpec:multi-publisher
  • Created: 05 Dec 2012
  • Contributors: Yunhong Jiang

Summary

Multiple publishers in ceilometer transform collected measurements into different format, like meter, metrics etc, and publish to different target, like data storage, synaps etc, through different conduit, like rpc, UDP etc.

To support different requirement from different publishers, a set a transformers are orgnized as pipeline, to transform the data from counter to meter, metrics etc.

Release Note

Rationale

User stories

Disk usage data are published to ceilometer collector through message bus as meter, and published to synaps through PutMetricData API as metrics.

Metering system publish network usage data as per-vnic usage information, while CW publish the network usage data as a whole.

Assumptions

Design

This is just one possible design for this feature (keep that in mind).

Five components for multiple publisher support, data collector, transformer, publisher and pipeline, pipeline manager.

  • Data collectors collect measurements from other openstack project. Now two types of data collector in ceilometer, pollster and notification handler.
  • Transformers transform the data from data collectors or from other transformers. They can change the counter name, translate to another data format, drop some data etc.
  • Publishers publish data to the world through conduit.
  • Pipeline is a logic components chaining the data collectors, transformers and publishers together, so that measurement flows from different data collectors to different publishers. Multiple pipeline exists in the system.
  • Pipeline manager manages the pipelines in the system. Only one pipeline manager exist in the system. The measurement collected from the collector will be dispatched to the pipeline manager.

Implementation

Below is the pipeline definition.

Top level is an array of pipeline definition.

Each pipeline item defines a list of targeted counter, an list of transformers with their corresponding parameter as dictionary, and publishers.

[
    {
         "counter_names" : ["counter_1", "counter_2"], 

         "tranformers":[
                           {"Transformer_name": "Transformer_1",
                            "Transformer_param": {}},
                           {"Transformer_name": "Transformer_2",
                            "Transformer_param": {}}
                       ],

         "publishers": ["publisher_1", "publisher_2"]

     },

     {

         "counter_names" : ["counter_3", "counter_4"], 


         "tranformers":  [

                              {"Transformer_name": "Transformer_1",

                               "Transformer_param": {}},

                              {"Transformer_name": "Transformer_2",

                               "Transformer_param": {}}

                         ],

         "publishers": ["publisher_1", "publisher_2"]

     }

]


Target counter name format: "*", "counter_name", or "!counter_name". It's from the 'name' field in the Counter named tuple.

Transformer_name is from namespace definitions in setup.py.

Publisher_name is from namespace definitions in setup.py.

UI Changes

User should provide a config file for the pipeline definition. Currently we support yaml file format.

An alternate syntax in YAML might be:


---
  -
    counters: counter_1, counter_2
    transformers:
      -
        name: Transformer_1
        parameters:
          p1: value
    publishers:
      - publisher_1
      - publisher_2

  -
    counters: counter_3, counter_4
    transformers:
      -
        name: Transformer_2
        parameters:
          p1: value
    publishers:
      - publisher_1
      - publisher_2


or more compactly



- counters: counter_1, counter_2
  publishers: [publisher_1, publisher_2]
  transformers:
  - name: Transformer_1
    parameters: {p1: value}
- counters: counter_3, counter_4
  publishers: [publisher_1, publisher_2]
  transformers:
  - name: Transformer_2
    parameters: {p1: value}


Code Changes

Changes to agent manager, central manager, collect service to load the transformers and publishers, to setup the pipeline manager.

Add the implementation of transformer, the publishers etc.

Migration

Include:

  • data migration, if any
  • redirects from old URLs to new ones, if any
  • how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.