PowerTool Overview, Integration with Windows 2012 DHCP / DNS / DHCP and SCVMM
At Microsoft Management Summit 2013, Eric Williams and Jason Shaw delivered a presentation providing an overview over Cisco UCS PowerTool, integration of Cisco UCS with Microsoft Windows 2012 DHCP, DNS, and WDS demonstrating Bare Metal Windows 2012 installation on Cisco UCS, and integration of Cisco UCS with Microsoft Windows Hyper-V 2012 and Microsoft System Center VIrtual Machine Manager 2012. Below are the scripts from the examples that were demonstrated at MMS 2013.
If you would like to watch the entire MMS 2013 session, please follow this link:
http://channel9.msdn.com/Events/MMS/2013/IM-B394
Integration with Micrsoft Windows 2012 DHCP / DNS / Windows Deployment Solution and Cisco UCS
This example shows end to end deployment of Cisco UCS plus Windows 2012. In the script and video, you will see a UCS Service Profile being created from a UCS Service Profile Template, associated with a blade, DHCP and DNS entries created based on the hardware attributes derived from the service profile created, and Windows Deployment Solutions Pre-staged device was created from the hardware attributes derived from the service profile created and the unattended installation files needed to drive the unattended Windows 2012 installation. After the service profile is fully associated and DNS / DHCP / WDS configurations are created, the server is powered on and WDS will automate OS installation utilizing the UCS Drivers added to the WDS driver repository previously.
The script can be downloaded directly here:
Integration with Microsoft Systems Center 2012 and Cisco UCS
This examples shows end to end bare metal deployment of a set of service profiles defined in a specific organization of UCS Manager. In the script and video, you will see a set of associated Service Profiles in a paricular organization on a UCS domain be provisioined as SCVMM Hyper-V hypervisors. The script will syncronize any service profiles in the target organization in UCSM to SCVMM as VM Hosts, triggering a task sequence in SCVMM to bare metal provision the service profiles with Windows 2012 and Hyper-V. The script ensure the configuration on the service profiles has the appropriate IPMI users and passwords defined to ensure SCVMM can communicate to the servers to start the task sequences needed to deploy Windows 2012 Hyper-V on the hosts.
The script can be downloaded directly here:
https://developer.cisco.com/documents/2048839/6142701/Sync-UCStoVMM.ps1.zip
PowerTool / WDS / DHCP / SCVMM Integration Video (no audio): https://developer.cisco.com/documents/2048839/2079866/mms2013-powershell.mp4
UCS PowerTool and VMWare PowerCLI automated management of Auto-deploy
Detailed in the video below is a joint PowerShell integration utilizing both Cisco UCS PowerTool and VMware PowerCLI. The goal of the integration is to show how easy it is in PowerShell to integrate across different functional areas within a virtualized infrastructure stack. By taking the power of managing UCS with UCS Powertool and coupling it with the power of managing VMware with PowerCLI an infrastructure administrator can fully automated configuration of a net-new cluster of hypervisors from bare metal in UCS to fully configured clusters in vSphere within minutes with very minimal script writing.
There was very minimal prework performed for both UCS and VMware in the environment being demoed in the video below. For UCS, the prework that was performed was racking, stacking, and cabling the physical UCS gear and performing an initial configuration of UCS manager. On the storage side, a 200 GB LUN was created and zoned to a range of 18 WWPN's as well. For VMware, vSphere and Auto-Deploy software were both installed and configured inside of a Windows 2008 R2 server that had DNS, DHCP, and TFTP installed and configured to best practices from VMware for Auto-Deploy.
From there, PowerShell utilizing the Cisco UCS PowerTool module and VMware PowerCLI snap-ins takes over!!! Three different scripts were created to perform the following functions:
- Initial Configuration - The first scripts configures all of the pools, policies, VLANs, VSANs, Service Profile Templates, etc. needed on the UCS side to create new servers to be used in the cluster to be created in VMware. On the VMware side, this script will download the latest and greatest ESXi hypervisor, as well as create separate Auto-Deploy Hypervisor and Cluster rules that define the hypervisor version and destination cluster for net new servers with the Service Profile Template name provided in the oem strings like "oemstring=$SPT:CL2012", where CL2012 is the service profile template name. The script will create new service profile from a template, associate it with a server from a pool, monitor the progress of the association and addition of the host into the cluster, perform initial configuration of the new host in the cluster and create a host profile from the configuration, and create a rule for the cluster to use the new host profile. Download Script
- Addition of New Hypervisors - The second script is run to add new hypervisors to the cluster created in step one. This script accomplishs that by creating a new service profile from the template created in script one, associating it, and booting it which will cause the server to boot via AutoDeploy based on the autodeploy and cluster rules created from script one, which are triggered from the service profile template name. The script will verify the host is added to the cluster and is fully compliant with the host profile created in step one. Download Script
- Rolling Hypervisor and Server Firmware Upgrade of a Cluster - The third script will download the newest version of a ESXi hypervisor from VMware, create a new Auto-Deploy rule utilizing it for servers that are created from the Service Profile Template created in step one. Once the rules are updated, the script will loop through each hypervisor one by one in the cluster by first setting the hypervisor in maintenance which will trigger VM evacuation, shutting the hypervisor down, change the host firmware pack on the service profile which upgrades the firmware on the server, powering the server on which will cause the server to boot ESXi via Auto-Deploy and rejoin the cluster. Download Script
These scripts are provided freely as examples of how you can use both UCS PowerTool and VMware PowerCLI together to achieve end to end automation. Please feel free to modify and utilize them as examples of how you might automate UCS and VMware in your own datacenter.
Recommendation: The video is best viewed in full screen mode
Direct Video Download: http://developer.cisco.com/documents/2048839/2079866/PowerTool-PowerCLI-AutoDeploy.mp4
Following the best practices outlined in the whitepaper, Citrix XenDesktop: Best Practices with Cisco UCS (http://support.citrix.com/article/CTX135305), a Windows PowerShell script was written to automate the creation and configuration of many of the pools, policies, and templates necessary in a Citrix XenDesktop environment, culminating in the creation of a UCS Service Profile that can be used to create 1 or more Service Profiles that will ultimately be applied to physical servers used to host XenDesktop created hosted virtual desktops.
Designed primarily for Proof Of Concept environments, there is an assumption that a relatively clean UCS environment is being used, with very little configuration already completed (there are no checks in the script for existing configurations, and if there is a conflict, the script will issue an error).
The script takes the name of an Excel Configuration file containing information needed for configuration, and, optionally, a switch to output logs to the console, as input.
Download the script here: http://developer.cisco.com/documents/2048839/6142701/CitrixXDBP_Powertool.zip/cae83bf1-f491-47a3-82e6-c742774559ca
Cisco Live 2012 - UCS PowerTool and VMware PowerCLI