25

Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform
Page 2: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

Managing UCS environments with UCS PowerTool (PowerShell)

Eric Williams Technical Marketing Engineer Cisco

Page 3: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Agenda

•  Introduction

•  What resources are available to get started automating UCS Infrastructure?

•  Cisco UCSM’s Programmatic Infrastructure –  Cisco UCS PowerTool for UCS Manager –  DEMO: Using UCS PowerTool for UCSM

•  Cisco IMC’s Programmatic Infrastructure –  Cisco UCS PowerTool for IMC

•  Conclusion

3

Page 4: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

What resources are available to get started automating UCS Infrastructure?

Page 5: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS User Community

•  Web Based End User Community

•  Tools, Downloads, Examples •  UCS Platform Emulator (UCSPE) •  goUCS Automation Tool •  XML API, PowerShell code Examples •  Cisco UCS PowerTool (PowerShell Module) •  Microsoft SCOM Management Pack for Cisco UCS •  Microsoft SCVMM UI Extension for Cisco UCS •  Microsoft SCO Integration Pack for Cisco UCS

•  Documentation •  Programming & Developer Guides •  Whitepapers •  Reference Guides (XML Model, Faults)

•  Collaboration •  Blogs •  Peer to peer forums •  Videos •  Access to Cisco Subject Matter Experts

http://communities.cisco.com/ucs

5

Page 6: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS Platform Emulator (UCSPE)

• No UCS Hardware Needed for API integration Development

•  Full featured emulator for the UCS Manager •  Installs as a Virtual Machine •  Provides complete support for all XML API calls •  Object Browser to peruse the UCSM model •  Import & replicate existing live UCS Manager

physical inventory •  Share saved physical inventories among UCS

Platform Emulators •  Drag-n-drop hardware builder to create custom

physical inventory

6

http://communities.cisco.com/ucspe

Page 7: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

What is Cisco UCS Manager’s Programmatic Infrastructure?

Page 8: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco Unified Computing System

8

Cisco UCS™ Manager (Read / Write Configuration Interfaces) UCS Manager GUI and CLI

Cisco UCS Fabric Interconnects (Read Only / Cut Through Interfaces) SNMP, Syslog, SMTP, SMASH CLP, CIM XML, Smart Call Home 20, 40, 48, and 96 ports Cisco UCS I/O modules

Cisco UCS Blade Server Chassis Cisco UCS Blade / Rack Servers (Cut through Interfaces to CIMC) Serial over LAN, KVM, IPMI

Cisco UCS I/O Adapters

Page 9: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS Manager Programmatic Infrastructure

•  Comprehensive XML API, standards-based interfaces •  Bi-Directional access to physical & logical internals

9

XML API

Direct UCS CLI UCS GUI 3rd Party Customer

Self Serve portals

Management Tools

Auditing Tools

System Status Physical Inventory Logical Inventory

Broad 3rd party integration support Faster custom integration for customer use cases Consistent data and views across ALL interfaces

Page 10: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

Cisco UCS PowerTool for UCS Manager

Page 11: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS PowerTool for UCS Manager Programmatic control over UCS hardware

•  Architected for Flexibility and coverage •  PowerShell Wrapper

–  Cmdlet definition and structure –  Get-help support

•  .NET UCS Namespace Library –  XML API call construction –  Class Definition –  Validation

•  PowerShell Design •  In-line get-help support •  Full Pipelining support •  Fully classed object definition •  All ‘legal’ verbs

•  .NET Namespace provides common base for all Microsoft focused integration

•  Targeted to support full manageability of UCS across multiple releases

Cisco UCS PowerTool Module

UCS .NET Namespace

UCS XML API

cmdlets

11

Page 12: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

UCS XML Schema

Processor

UCSM-IN.xsd

UCSM-OUT.xsd

Augment Schema

XML Method & MO Meta Information

PowerShell Generator

Microsoft SCO IP

Generator

XYZ Generator

Cisco UCS PowerTool

(1850+ cmdlets)

Microsoft SCO Integration Pack

XYZ Integration Pack

Cisco UCS PowerTool Automated Code Creation Automated Activity Generation from UCS XML Schema

12

Page 13: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS PowerTool for UCS Manager Most Commonly Used Objects and Assets

• Chassis –  Hardware – Power Supply / Fan

Modules / IO Modules –  Environmental statistical data

(Power, cooling, network) –  Config and Hardware Faults

• Fabric Interconnect –  Hardware – Power Supply / Fan

Modules / Network Expansion Modules

–  Power / cooling / network/ environmental statistical data

–  Network Elements (VLAN, VSAN, QoS, Port Profiles)

–  Config and Hardware Faults

• Config. Operations –  Pools (WWN, UUID, MAC, IP) –  Policy creation, manipulation,

deletion, and consumption –  vNIC / vHBA Templates –  Service profile template creation,

cloning, deletion, and consumption •  Simplistic service profile creation

(with a limited scope of what is available to configure)

•  Expert SP creation (use variabilized XML w/ config file)

–  Compare Managed Objects across orgs and/or domains

–  Sync Managed Objects across orgs and/or domains

• Service Profiles –  Policies (Firmware, Boot Order,

vNIC / vHBA config, Storage, IPMI, SoL, BIOS)

–  Pools (WWN, UUID, MAC, IP) –  Configuration Faults –  Launch UCS KVM for SP

• Servers –  Hardware - CPU, Memory,

Adaptors, CIMC –  Power Operations –  Power / cooling / network /

environmental statistical data –  Hardware Faults

13

Page 14: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

CiscoUcsPS Module Overview

ConvertTo-UcsCmdlet -UcsBackup -LiteralPath c:\ucs\backup.xml -OutputPath c:\ucs\output.ps1

14

Page 15: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: ConvertTo-UcsCmdlet

•  The best way to discover usage of PowerTool cmdlets and usage •  Usage: Option #1

•  Launch UCS GUI & Login

•  C:\> ConvertTo-UcsCmdlet

•  Usage: Option #2 •  C:\> Connect-Ucs 1.2.3.4

•  C:\> Start-UcsGuiSession -LogAllXml

•  C:\> ConvertTo-UcsCmdlet

•  Usage: Option #3 •  Create a ‘config-all’ XML backup from UCS Manager

•  C:\> ConvertTo-UcsCmdlet -UcsBackup -LiteralPath backup.xml -OutputPath output.ps1

15

Page 16: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: UCS Connections

•  Connect-Ucs returns a UcsHandle on a successful connection –  Connect to 1 UCS, by Name/IP –  Connect to ‘n’ UCS, by Name/IP, with the same credentials –  Connect to ‘n’ UCS with information from a file, protected by a key

•  If -NotDefault isn`t specified, handles go to a Default UcsHandle list

•  By default, not more than 1 UcsHandle is allowed in the Default UcsHandle list –  Override with: Set-UcsPowerToolConfiguration -SupportMultipleDefaultUcs $true

•  Refresh of the connection happens in the background

•  Get-UcsPSSession to see the Default UcsHandle list

•  Export-UcsPSSession to save a set of UcsHandles to file

16

Page 17: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: Get-UcsCmdletMeta Another Great way to learn about the PowerTool cmdlets

17

Page 18: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

What is Cisco IMC’s Programmatic Infrastructure?

Page 19: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Events    {xml}  

HTTP(S)  {xml}  

Syslog Server

Events  {SNMP  Traps}  

Polls  {SNMP      GET}  

SNMP-based NMS

Events  {Syslog    

Messages}  

C I

M C

Syslog

SNMP

XML API

Memory CPU

PCI Adaptors Fans PSU

System Board

Fault Engine IPMI

Cisco UCS C-Series Server

Storage Daemon

Inventory  Sensor  Data  

Config  

Faults  

Disk Storage Controller

Disk Disk Disk Disk Disk Disk Disk

Architecture of Cisco UCS C-Series IMC UCS PowerTool

19

Page 20: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

Cisco UCS PowerTool for IMC

Page 21: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Cisco UCS PowerTool for IMC Most Commonly Used Objects and Assets

• Server Inventory –  Hardware Inventory

•  CPU •  Memory •  Motherboard •  Power Supplies •  Hard Disk Drives •  Fans

–  Environmental statistical data (Power / Temperature)

–  Hardware Faults

• Equipment Operations –  Server Power State Change –  Enable / Disable LED –  KVM GUI Launch –  CIMC User Interface Launch

• CIMC Admin Config Operations –  Monitoring (SNMP, Syslog, NTP) –  Authentication (Local Users, LDAP, LDAP Group to

Role Mapping) –  Firmware Management via Host Update Utility Non-

Interactive –  Import / Export CIMC Configuration

• Server Config Operations –  BIOS Settings –  Boot Order (Legacy and Precision Boot Config) –  Local Storage Configuration –  Virtual Interface Card Adaptor Configuration –  Compare / Sync Objects across IMC’s

21

•  Adaptors –  Storage Controller –  Virtual Interface Card –  LOM’s –  Other PCI devices

Page 22: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: ConvertTo-ImcCmdlet

•  The best way to discover the UCS PowerTool cmdlets and usage •  Launch IMC GUI, login, and make changes In CIMC GUI (Example: Configure BIOS Settings)

•  Connect via UCS PowerTool for IMC and run:

•  C:\> Connect-Imc 1.2.3.4 •  C:\> $BiosSettings = Get-ImcBiosSettings -Hierarchy •  C:\> $BiosSettings | ConvertTo-ImcCmdlet

22

Page 23: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform

© 2014 Cisco and/or its affiliates. All rights reserved. LTRCOM-2005 Cisco Public

Getting Started: IMC Connections

•  Connect-Imc returns a ImcHandle on a successful connection –  Connect to 1 IMC, by Name/IP –  Connect to ‘n’ IMC, by Name/IP, with the same credentials –  Connect to ‘n’ IMC with information from a file, protected by a key

•  If -NotDefault isn`t specified, handles go to a Default ImcHandle list

•  By default, not more than 1 ImcHandle is allowed in the Default ImcHandle list –  Override with:

•  Set-ImcPowerToolConfiguration -SupportMultipleDefaultImc $true

•  Refresh of the connection happens in the background

•  Get-ImcPSSession to see the Default ImcHandle list

•  Export-ImcPSSession to save a set of ImcHandles to file

23

Page 24: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform
Page 25: Managing UCS environments with UCS PowerTool …files.meetup.com/11636312/RDU-PoSh UG PowerTool.pdf• Web Based End User Community • Tools, Downloads, Examples • UCS Platform