Avatar

Programmable Infrastructure

Some hardware vendors are talking about their products as if they invented the concept of infrastructure as code. Cisco UCS was architected as programmable infrastructure from its inception seven years ago. We’ve continued to enhance the programmability we offer you with application program interfaces (APIs), tools, orchestration and integration to fit your coding desires and requirements.

Unified UCS Management

The latest release of UCS Manager, version 3.1, brings together into one place support for the 2nd generation UCS hardware and the latest 3rd generation UCS hardware. It includes support for UCS Mini, the UCS C-Series and B-Series servers, Cisco HyperFlex hyperconverged infrastructure, and Cisco composable infrastructure – the UCS C3260 and M-Series. It features a new HTLM5 interface.

bog-ucs-management-02

UCS PowerTool Suite, It’s Sweet

I’m really excited about UCS Manager 3.1 and I think you should be too, because it is supplemented by some really great programmability tools. There is the UCS PowerTool 2.0 suite with support for Microsoft’s Desired State Configuration (DSC) , PowerTool has a unified installer, support for UCS Manager, UCS Central and UCS IMC on C and E-Series, as well as consolidation of duplicated Cmdlets across the suite. For example, Set-UcsCentralConfiguration, and Set-UcsPowerToolConfiguration are combined into Set-UcsPowerToolConfiguration. These changes as well as a listing of all the newly added Cmdlets are fully described in the UCS PowerTool Release Notes.

Be sure to read the release notes and the user guides as well as download the software.

A little more about UCS PowerTool and and Microsoft DSC, UCS PowerTool includes a ConvertTo-UcsDSCConfig cmdlet, this cmdlet generates DSC configuration code based on actions carried out in the UCS Manager GUI. Utilize the ConvertTo-UcsDSCConfig cmdlet along with the DSC support for UCS Objects, syncing a UCS Object from a reference UCS Domain, syncing a UCS Object from a backup or running a script to bring UCS objects to their desired state.

UCS Python SDK

Maybe PowerShell isn’t you’re thing, perhaps you prefer Python. Well it just so happens that there is a UCS Manager Python SDK in the final stages of development. The UCS Manager Python SDK is currently hosted on github under the CiscoUcs account. The SDK is currently beta.You can follow the progress of the UCS Python SDK in the UCS section of Cisco Communities and check out the ever growing library of UCS Manager Python SDK samples as well as the documentation.

The UCS Python SDKs are built to support Python 2 & 3, the SDKs can be installed via PIP, are PEP8 compliant and have support to create python code from actions in the UCS Manager Graphical Interface with the built-in convert_to_ucs_python() functionality. Let me reiterate to make sure I get the point across; the UCS Manager Python SDK can generate UCS Manager Python SDK code!

Go Right to the Source

UCS PowerTool and the Python SDK are built on top of the UCS Management open XML APIs, they compose the XML needed for the API request and parse the response. Of course you could always go straight to the source and use the XML API directly. There are user guides for each of the UCS XML API choices. As long as the programming language you want to use supports writing an HTTP client you’re good to go or use utilities like curl or Postman to quickly prototype.

Emulation at it’s Best

I know what you’re thinking, I can’t just have my developers go at it on our systems, they’re in production or being used for dev, CI, UA testing, UI testing, etc. No problem just get the UCS Platform Emulator 3.1, each developer could have their own. The great thing about the UCS Platform Emulator is that it is built on the same code as the actual product. Code that is written against the emulator works with UCS Manager.

The emulator also has the complete UCS Manager Object Model documentation; the object model documentation alone is worth the download! The Object Model Documentation, has all the classes, methods, faults, syslog messages, and more. Another benefit is that one or more UCS Platform Emulators can be registered to UCS Central, to truly represent a real UCS deployment. The UCS Platform Emulator works so well that it has become an integral part of the offerings at Cisco dCloud, for example the “Application Policy Infrastructure Controller 1.2 with Cisco CloudCenter 4.5 v1”, dCloud offering utilizes the 3.1 UCS Platform Emulator.

Free Tools and Community Support

Perhaps the biggest news of all is that UCS PowerTool Suite 2.X with support for Microsoft DSC, the Python UCS Manager SDK, the Python UCS IMC SDK and the UCS Platform Emulator are all Free! And UCS Programmability tools have community support and are represented in Cisco DevNet

UCS Central is Also Programmable

I’ve mentioned UCS Central a couple of times. It was very recently updated with a significant number of additional capabilities, an HTML5 interface and a new task based orientation. Even if you only have one UCS Domain you should really be using UCS Central. UCS Management over multiple UCS domains through UCS Central is as programmable and automated as the other UCS management options via UCS Central PowerTool for UCS Central, and you can also go straight to the UCS Central XML API.

PowerShell, Python, the emulator, and all Cisco UCS and Cisco HyperFlex products allow you take advantage of the ALL programmatic capabilities that UCS management options have to offer.  How you use them is up to you…

I hope this helps in your scripting and automation efforts.