vCloud Director 1.5 blocking tasks and notification package using AMQP

Version 8

    This package for the vCenter Orchestrator plug-in for vCloud Director 1.5 allows to trigger custom workflows on vCloud Director blocking tasks and notifications with including:

    • "Create a vCD notification subscription" (including AMQP host, exchange, queue, binding) with getting AMQP configuration from the vCloud Director configuration. Select end user custom workflow to run on specific blocking task or notification.
    • "Start a subscription listener workflow" Start a looping workflow waiting for new messages from the selected subscription created with the workflow "Create a vCloud Director notification subscription" and then run the workflow runner which convert the message to vCD inputs and pass these to the end user selected workflow.
    • Workflows samples to be triggered by the blocking tasks and notifications: 
      • Approve vApp (Simple) : Sent email notification with details to approver with link to web page to approve vApp.
      • Approve vApp (AD) : Same plus add computer to AD Organization matching vCloud Director Organization.
      • Customize VM names and IP : Upon deployment of new vApp set custom vApp VM names & IPs.
      • Log all : Log all the information passed by the workflow runner. Usefull to check what information can be obtained from a given event.


    Disclaimer: These samples workflows are provided AS IS and are not production quality. Use at your own risk. Feel free to modify and expand and share your contributions.




    These are the instructions to have the sample workflows working

    • Pre-requisite : 
      • vCO installed and configured
      • AMQP plug-in installed
      • vCloud Director 1.5 vCO plug-in installed and configured using the System org
      • Microsoft AD vCO plug-in installed and configured
      • Perspective plug-in installed
      • Mail plug-in configured
      • AMQP server freshly installed (if you messed up with AMQP before chances are something will be set wrong)


    • vCloud Director: 
      • Configure blocking tasks settings with AMQP server info and Test the AMQP Connection
      • Check "Instantiate vApp from Template" blocking task
    • Import package in vCO:  
      • Start vCenter Orchestrator Client.
      • Import package com.vmware.coe.vcd.notifications.package
    • Configure email notifications for sample workflows
      • Run the workflow "customization Config" (Approver group, email, parent OU to create new OU, timeouts)
    • Configure Perspectives (the web front-end)
      • Start the "Initialize vCD Notifications Perspective" workflowUse Perspectives to create a new notification subscription:
      • Upon successful execution of workflow, open browser to http://<vco server>:8280
      • Click “Web View List”
      • Click “Perspectives”
      • Login to Perspectives as your vCO Administrator
      • Load the “vCD Notification Admin” perspective by clicking the link
      • Run the “Create a vCloud Director notification subscription” workflow by clicking the link in the left pane and then the “Start task” button in the right pane
        • Give a subscription name (i.e "On vAppTemplate Instantiation")
        • Set AMQP password
        • Create a broker: yes
        • Filter on blocking task operation type: yes
        • Select event type (this should display the one you enable in vCD)
        • Filter on entity type: no
        • Filter on notification age: no
        • Select a Workflow to start (i.e Approve vApp)
        • Next screen will show the calculated routing key. Do not change it ! Submit.
    • Start the listener workflow:
      • Click “Start a subscription listener workflow”, choose the Subscription that was just created and click Submit
    • Test:
      • Go to vCD and attempt to Instantiate (deploy in vCD UI terms) a template from the catalog
      • Open the vCO client and check "Start a subscription listener workflow" has a new Workflow run
      • Check the Approve vApp workflow you selected ran as well. If successful check email of the approver.
      • Click on the approve link, login, approve.