Eye on Blades Blog: Trends in Infrastructure
Get HP BladeSystem news, upcoming event information, technology trends, and product information to stay up to date with what is happening in the world of blades.

Infrastructure changes. Stay in the loop with the HP OneView state change message

IT is under pressure to respond more rapidly to changing business conditions due to factors like mobility, cloud computing and big data.  I’ve stated in my previous blogs that one of the key reasons customers are using HP OneView is because of its automation capabilities through its RESTful APIs.  Another critical element for infrastructure automation is the state change message bus (SCMB), a key feature in HP OneView.  I’ve alluded to the SCMB in some of my previous blogs, but this important topic deserves a deeper dive.  To experience these automation capabilities for yourself, and how HP OneView can benefit your data center, download HP OneView software free for 60 days.

 

The SCMB allows enterprises to closely integrate with HP OneView in ways that would have previously been cost prohibitive.  Competing management solutions depend on inefficient polling mechanisms that are difficult to implement and do not scale.

 

The HP OneView SCMB is based on an industry standard protocol, Advanced Message Queuing Protocol.  The implementation we are using is the open source, RabbitMQ, technology.  Using the SCMB, you can automate any task in HP OneView based on a wide variety of activities in the system, including:

  • Arrival of critical alerts
  • Deployment of enclosures
  • Maintenance of server profiles

                                                                       

Tune-in to alerts

In order to connect to the HP OneView SCMB, you must first establish a secure connection using certificates.  As you may have guessed, there is a REST API that is used to create and download certificates for use by the SCMB.  This one-time operation is detailed in the HP OneView online help.  Once you have certificates in place, it’s time to connect to message bus.  This can be accomplished using nearly any language ranging from Python to C# to Java.  For these examples I will use Python.  A complete example of this is in the online help, so I will only touch on the highlights here to give you an idea for how the SCMB works.

 

First, setup the SSL options.  This step creates the data structure pointing to the certificates which have been created and downloaded from the appliance.

 

ssl_options = ({"ca_certs": caFile,

                "certfile": certFile,

                "keyfile": sslFile,

                "cert_reqs": ssl.CERT_REQUIRED,

                "server_side": False})

 

Next you define the message exchange and the routing key.  This is a really important step as it defines which messages are sent to you on the exchange.  In the example below, you can see how it’s easy to fine-tune the types of messages you receive.  It’s recommended that you define your key as narrow as possible to limit traffic on the message bus to only those messages need.  For example, ROUTING_KEY1 will result in all messages on the SCMB getting published on the message bus.  ROUTING_KEY2 will result in only alert messages getting published on the message bus.  Likewise the ROUTING_KEY3 will result in only messages pertaining to enclosure resources getting published on the message bus.

 

EXCHANGE_NAME  = "scmb"

ROUTING_KEY1   = "scmb.#"

#ROUTING_KEY2  = "scmb.alerts.#"

#ROUTING_KEY3  = “scmb.enclosures.#”

 

Finally, it’s time to start listening on the message bus.  This method starts the listener and instructs it to invoke the process_messages() function when each new message is received. 

 

channel.basic_consume(   process_messages,

      queue=queue_name,

no_ack=True)

 

Within the process_messages() method, you can take any action necessary, including operations such as:

  • Automated profile movement – In the unlikely event that a hardware resource experience a fault, you can detect that alert on the SCMB and use the RESTful API to move the server profile to a spare hardware resource to reduce downtime.
  • Update asset trackers - When you add a new enclosure, you can read the hardware information, such as the serial number, UUID, and asset tag from the SCMB messages, and store details for enclosures and server in your asset tracking system.
  • Enable application monitoring – When you deploy server profiles, you can update your application monitoring tool to begin managing the application.

 

The ability to automate processes in your data center can save you time and money and reduce the chance for human errors. Using the state change message bus in HP OneView can help you respond with more agilely to the needs of your business.

 

~Bryan

Labels: HP OneView
Leave a Comment

We encourage you to share your comments on this post. Comments are moderated and will be reviewed
and posted as promptly as possible during regular business hours

To ensure your comment is published, be sure to follow the community guidelines.

Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Search
About the Author


Follow Us
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation