Aspire :: End-to-end management :: Jasmine



This section describes the usage of OW2 Jasmine to manage autonomically the components of the Aspire middleware.

Context

OW2 Jasmine enables the autonomic management of distributed infrastructure of machines executed the Aspire components (ALE, BEG, EPCIS, ...).

OW2 Jasmine elements are:

Usecases

Static topology

Bootstrap
  • µJOnAS : provides utility MBeans (send a file to the server, ...)
  • Jasmine Agent
Artifact repository
Configuration repository

In order to ease the deployment and to have a homogeneous platform, all configuration files (ECSpec, LRSpec, ...) may be available on a specific repository, common for all servers.

Machine wakeup

The code from the GreenIT demo for machines wake up is based on the WakeOnLAN standard.

This standard can't cross routers, and may have to be used in internal networks.

Also, the ALE server may be automatically started when the system is up (Unix daemon, Windows service...), or started via a JASMINe Agent.

Initial provisioning

Different ways has been discussed for the initial provisioning :

  • via deployment plans
  • by sending bundles JAR files to the server (via its sendFile() capable MBean), then load it with a FileInstall bundle, or via the AdminMBean
  • by using PaxRunner or Tomcat

Provisioning update

  • There is no information about updating a deployment plan.
  • Sending an updated file, and use it with FileInstall or AdminMBean may not be difficult

Configuration provisioning and recovery

When the µJOnAS is started, it provides some utility MBeans. One of them allows to send a binary file to the server (via a bytes array).

This way, when JASMINe is able to recognize that a new server is up, a drools rule can provide base ECSpec and LRSpecs XML files.

Metrics collection and alarms

All data may be collected throught JMX MBeans.

Some metrics are purely informative (uptime...), but other ones may be used in order to control the server state (number of generated reports, event cycles...).

By using the '-rate' option of the JASMINe stat command and a threshold, a drools rule is able to test the ale server activity, and notify the administrator, via JASMINe notifications, if the server runs to slow or to fast.

Hints

Server start-up

The server may be started by using an agent able to launch Pax Runner with a specified configuration file provided through an MBean method call.

Server configuration

By using MBeanCmd, JASMINe events can be used to detect new servers, and send them their specific configuration via MBeans.

A sample rule has been developed to demonstrate this mechanism :

  • JASMINe polls periodically an ALE server MBean attribute : the uptime
  • When the server is down, no event are triggered
  • When the server is up, a rule handles the event, and sends a server-specific configuration (Logical readers, ECSpecs, subscriptions) via ALE server MBeans.
TODO attach the demonstration files

Access MBeans through the network

MBeans can be accessed directly on a local machine, but a little trick allows a remote access : in the ALE server command line, the JMX remote options must be defined.

Example :

$ java 
    -Dcom.sun.management.jmxremote.port=8088           # Listening port
    -Dcom.sun.management.jmxremote.authenticate=false  # no authentication
    -Dcom.sun.management.jmxremote.ssl=false           # No SSL connexion
    -Dfelix.config.properties=file:felix/config.ini
    -jar bundles/org.apache.felix.main_2.0.2.jar

This way, the ALE server can be accessed by MBeanCmd in JASMINe, by using the corresponding JNDI target address :

service:jmx:rmi://ale_server_address/jndi/rmi://ale_server_address:1111/jmxrmi

MBean value polling with MBeanCmd

MBeanCmd and its command stat allows to retrieve periodically informations about the current server state.

Each time a requested attribute has been read, a JasmineEventEB event is raised, and can be handled in a Drool script.

Example : Retrieve the server uptime everey 5 seconds

$ stat 
    -p 5                                                    # Poll delay
    -name "org.ow2.aspirerfid:type=aleserver,name=server"   # Source MBean
    -a Uptime                                               # MBean attribute to read
    -target service:jmx:rmi://localhost/jndi/rmi://localhost:1111/jmxrmi
    -jasmine vm://MBeanCmd_dispatcher                       # Event handler (JASMINe)

Links