Tutorial: Using Asynchronous Notification

From Release 1.2 there are now two mechanisms for asynchronous notification of events in a virtual machine's lifecycle. These features are experimental and will change significantly in future release, based on the feedback from users. Please provide your feedback via the support mailing list.

Notifications via AMQP Messaging

If you provides messaging coordinates and credentials when starting a virtual machine, the StratusLab cloud will send a notification using that information each time the machine enters a new state (CREATE, RUNNING, DONE). Note that StratusLab does not provide a messaging service itself, so an existing, external AMQP server must be used.

You can provide the necessary information via the command line by using the –notify option. The value of the option, is a comma-separation list consisting of the AMQP server, the exchange, username, password, and queue. An example using the RabbitMQ test server is:

--notify="dev.rabbitmq.com,/,guest,guest,random_queue"

The option may be used multiple times to provide messages to more than one destination. Malformed coordinates will be silently ignored.

An example using the pika python library can be found in the standard StratusLab use cases: testVmStateNotification.py. You can check out the code via git:

git clone http://code.stratuslab.eu/public/git/stratuslab-use-cases.git

The code is constructed as a unit test and will have to be reworked into a standalone example.

The messages will contain the VM identifier and the state. They look like:

VM_ID=22; STATE=DONE

If you would like more information, please provide feedback to the support mailing list on what information you would like to see.

Notifications via Email

You can request that an image be saved (including its full state) after it has been shutdown. This can be done by using the –save option when starting the machine. You can be sent via email, the location of the saved image along with other information when the save is finished. Provide your email address using the –author-email option.

  • Bookmark at
  • Bookmark "Tutorial: Using Asynchronous Notification" at del.icio.us
  • Bookmark "Tutorial: Using Asynchronous Notification" at Digg
  • Bookmark "Tutorial: Using Asynchronous Notification" at Reddit
  • Bookmark "Tutorial: Using Asynchronous Notification" at Google
  • Bookmark "Tutorial: Using Asynchronous Notification" at StumbleUpon
  • Bookmark "Tutorial: Using Asynchronous Notification" at Facebook
  • Bookmark "Tutorial: Using Asynchronous Notification" at Twitter