Jump to: navigation, search

Difference between revisions of "Trove/ceilometer integration"

(Created page with "= Ceilometer integration = == Notifications == Trove will emit events for resources as they are manipulated. These events can be used to meter the service and possibly used...")
 
(Notifications)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Ceilometer integration =
 
= Ceilometer integration =
  
== Notifications ==
+
=== Description ===
Trove will emit events for resources as they are manipulated.  These events can be used to meter the service and possibly used to calculate bills. Notification Events: [[trove/trove-notifications]]
+
==== Use cases ====
  
 +
Use cases:
 +
* get stats about instances/backups usage
 +
* get notifications about instance status changes (eg. crash, resize, etc.)
 +
* get notifications about backups status changes
  
=== Description ===
+
==== Notifications ====
 
 
 
Trove should emit notifications in for different events, such as:
 
Trove should emit notifications in for different events, such as:
  
Line 12: Line 15:
 
** instance.create.start|end|error
 
** instance.create.start|end|error
 
** instance.delete.start|end|error
 
** instance.delete.start|end|error
** instance.resize.start|end|error
+
** instance.modify_flavor.start|end|error
 +
** instance.modify_volume.start|end|error
 
** instance.migrate.start|end|error
 
** instance.migrate.start|end|error
 
** instance.reboot(restart?).start|end|error
 
** instance.reboot(restart?).start|end|error
** instance.fail
+
 
 +
*Cluster events:
 +
** cluster.create.start|end|error
 +
** cluster.delete.start|end|error
 +
** cluster.resize.start|end|error
 +
 
 +
 
 +
Note: cluster notifications are emmited by taskmanager.
 +
 
 +
 
 +
Note: clusters notification payload looks like:
 +
 
 +
      {
 +
              "id": cluster.id,
 +
              "name": cluster.name,
 +
              "task": {
 +
                              "id": cluster.task_id,
 +
                              "name": cluster.task_name,
 +
                              "description": cluster.task_description
 +
              },
 +
              "created": cluster.created,
 +
              "updated": cluster.updated,
 +
              "datastore": {
 +
                              "type": cluster.datastore.name,
 +
                              "version": cluster.datastore_version.name,
 +
              },
 +
              "cluster_size": 3,
 +
              "instances": [
 +
                              {
 +
                                    'instance_id': <UUID>,
 +
                                    'name': 'MyDB,
 +
                                    'created_at': UTCDATE,
 +
                                    'instance_id': <UUID>,
 +
                                    'volume_size': 1,
 +
                                    'volume_id': <UUID>,
 +
                                    'type': config_serv,
 +
                              },
 +
                              ...
 +
              ]
 +
      }
 +
 
 +
Noteː instance notification payload isn't changed.
  
 
*Backup events:
 
*Backup events:
 
** backup.create.start|end|error
 
** backup.create.start|end|error
 
** backup.delete.start|end|error
 
** backup.delete.start|end|error
 +
 +
Backup notifications are emitted by the next services:
 +
* backup.create:
 +
** trove-taskmanger emmits start|error
 +
** trove-conductor emmits end|error
 +
* backup-delete:
 +
** trove-taskmanger emmits start|end|error
 +
 +
Payload for backup eventsː
 +
  {
 +
        "created": "2014-02-13T21:47:16",
 +
        "description": "My Backup",
 +
        "id": "61f12fef-edb1-4561-8122-e7c00ef26a82",
 +
        "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
 +
        "locationRef": null,
 +
        "name": "snapshot",
 +
        "parent_id": null,
 +
        "size": null,
 +
        "status": "NEW",
 +
        "updated": "2014-02-13T21:47:16"
 +
        "tenant_id": "d4603f69-ec7e-4e9b-803f-600b9205276a",
 +
    }
 +
 +
Additional attribute of the payload is "exception" - string representation of raised exception. "exception" attribute appears only when error occures.
 +
 +
Noteː size, status, locationRef, parent_id values may vairy (depends on notification type).
 +
 +
=== Justification/Benefits ===
 +
 +
==== Justification ====
 +
Trove should emit events for resources as they are manipulated.  These events can be used to meter the service and possibly used to calculate bills. Notification Events: [[trove/trove-notifications]]
 +
 +
==== Benefits ====
 +
* Ability to integrate with Ceilometer
 +
* Ability to integrate with billing systems in terms of Public cloud deployments
 +
 +
 +
=== Impacts ===
 +
 +
Existing notifications events are going to be changed:
 +
* create -> instance.create.start|end|error
 +
* delete -> instance.delete.start|end|error
 +
* modify_flavor -> modify_flavor.start|end|error
 +
* modify_volume -> modify_volume.volume.start|end|error
 +
 +
New notifications are going to be added:
 +
* backup.create.start|end|error
 +
** start and/or error notifications are going to be sent by taskmanager
 +
** end and/or error notifications are going to be sent by conductor (because conductor is the only one place to verify that backup was created properly)
 +
* backup.delete.start|end|error (all notifications are emited by taskmanager)
 +
 +
 +
==== Configuration ====
 +
No changes
 +
 +
=== Database ===
 +
No changes
 +
 +
=== Public API ===
 +
 +
==== New routes ====
 +
No changes
 +
 +
==== Modifications to existing ====
 +
No changes
 +
 +
=== Internal API ===
 +
-------------------------------------------------------------------------------------------------------------------------------------
 +
 +
==== From trove-api to trove-taskamanger ====
 +
 +
No changes
 +
 +
-------------------------------------------------------------------------------------------------------------------------------------
 +
 +
==== From trove-taskamanger to trove-guestagent ====
 +
No changes
 +
 +
= Ceilometer plugin =
 +
 +
Ceilometer plugin should be implemented right after all notification modifications are merged into Trove codebase
 +
Ceilometer blueprint https://blueprints.launchpad.net/ceilometer/+spec/trove-plugin

Latest revision as of 11:08, 8 September 2014

Ceilometer integration

Description

Use cases

Use cases:

  • get stats about instances/backups usage
  • get notifications about instance status changes (eg. crash, resize, etc.)
  • get notifications about backups status changes

Notifications

Trove should emit notifications in for different events, such as:

  • Instance events:
    • instance.create.start|end|error
    • instance.delete.start|end|error
    • instance.modify_flavor.start|end|error
    • instance.modify_volume.start|end|error
    • instance.migrate.start|end|error
    • instance.reboot(restart?).start|end|error
  • Cluster events:
    • cluster.create.start|end|error
    • cluster.delete.start|end|error
    • cluster.resize.start|end|error


Note: cluster notifications are emmited by taskmanager.


Note: clusters notification payload looks like:

     {
              "id": cluster.id,
              "name": cluster.name,
              "task": {
                             "id": cluster.task_id,
                             "name": cluster.task_name,
                             "description": cluster.task_description
              },
              "created": cluster.created,
              "updated": cluster.updated,
              "datastore": {
                             "type": cluster.datastore.name,
                             "version": cluster.datastore_version.name,
              },
              "cluster_size": 3,
              "instances": [
                             {
                                   'instance_id': <UUID>,
                                   'name': 'MyDB,
                                   'created_at': UTCDATE,
                                   'instance_id': <UUID>,
                                   'volume_size': 1,
                                   'volume_id': <UUID>,
                                   'type': config_serv,
                             },
                             ...
              ]
     }

Noteː instance notification payload isn't changed.

  • Backup events:
    • backup.create.start|end|error
    • backup.delete.start|end|error

Backup notifications are emitted by the next services:

  • backup.create:
    • trove-taskmanger emmits start|error
    • trove-conductor emmits end|error
  • backup-delete:
    • trove-taskmanger emmits start|end|error

Payload for backup eventsː

 {
       "created": "2014-02-13T21:47:16",
       "description": "My Backup",
       "id": "61f12fef-edb1-4561-8122-e7c00ef26a82",
       "instance_id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
       "locationRef": null,
       "name": "snapshot",
       "parent_id": null,
       "size": null,
       "status": "NEW",
       "updated": "2014-02-13T21:47:16"
       "tenant_id": "d4603f69-ec7e-4e9b-803f-600b9205276a",
   }

Additional attribute of the payload is "exception" - string representation of raised exception. "exception" attribute appears only when error occures.

Noteː size, status, locationRef, parent_id values may vairy (depends on notification type).

Justification/Benefits

Justification

Trove should emit events for resources as they are manipulated. These events can be used to meter the service and possibly used to calculate bills. Notification Events: trove/trove-notifications

Benefits

  • Ability to integrate with Ceilometer
  • Ability to integrate with billing systems in terms of Public cloud deployments


Impacts

Existing notifications events are going to be changed:

  • create -> instance.create.start|end|error
  • delete -> instance.delete.start|end|error
  • modify_flavor -> modify_flavor.start|end|error
  • modify_volume -> modify_volume.volume.start|end|error

New notifications are going to be added:

  • backup.create.start|end|error
    • start and/or error notifications are going to be sent by taskmanager
    • end and/or error notifications are going to be sent by conductor (because conductor is the only one place to verify that backup was created properly)
  • backup.delete.start|end|error (all notifications are emited by taskmanager)


Configuration

No changes

Database

No changes

Public API

New routes

No changes

Modifications to existing

No changes

Internal API


From trove-api to trove-taskamanger

No changes


From trove-taskamanger to trove-guestagent

No changes

Ceilometer plugin

Ceilometer plugin should be implemented right after all notification modifications are merged into Trove codebase Ceilometer blueprint https://blueprints.launchpad.net/ceilometer/+spec/trove-plugin