Einführung Cisco Data Center APIs und Tools · Einführung Cisco Data Center APIs und Tools...

Post on 21-May-2020

13 views 0 download

Transcript of Einführung Cisco Data Center APIs und Tools · Einführung Cisco Data Center APIs und Tools...

Einführung Cisco Data Center APIs und Tools

Antonio Licata

anlicata@cisco.com

16.04.2015

Kein Anspruch auf Vollständigkeit !!!

• Überblick APIs

• Hardware

• Software

• Use Cases

• Tools

• Referenzlinks

Agenda

Überblick

Überblick

Cisco UCS™ Manager

Cisco UCS Fabric Interconnects

Cisco UCS I/O modules

Cisco UCS Blade Server Chassis

Cisco UCS Blade and Rack

Servers

Cisco UCS I/O Adapters

5

API API

Basic Management Functionality

API

API

UCS Director API

Stand-Alone UCS C-Series Unified Computing

System

UCS CentralPolicy Driven Multi DC, Multi-Domain

Management

UCS Director

Policy Driven, Application Centric Infrastructure Management and

Orchestration

CIMC

Integrated & Converged Infrastructure

UCS Manager

Domain 1UCS Manager

Domain x

FlexPod vBlockStorage

Virtual Machines

Network Devices

Servers

Non-Cisco Infrastructure

Advanced Infrastructure Abstraction & Automation

UCS Management Portfolio

• Standardbasierende

• SNMP

• Syslog

• Netconf

• OMI

• IPMI

• XML (REST SOAP)

• Prioprietäre

• CLI

• KVM

• Serial over LAN

Überblick APIs

• Northbound

• Wird gesteuert

• Southbound

• steuert

Überblick

• Northbound

• Wird gesteuert

• Southbound

• steuert

Überblick

Hardware

• CIMC

• UCS-C

• UCS-E

• UCS-B

• UCS-M

• Fabric Interconnects

• Nexus

Hardware

• XML • Integrated SNMP and expanded XML API capabilities

• Local Storage Management (RAID config/monitoring) (WebUI/CLI)

• Scriptable FW Upgrades – Host Upgrade Utility (HUU)

• Scriptable vMedia – From local AND remote share

• Support for FTP, SFTP, SCP, HTTP updates

• Dual Flex Flash mirroring support

• UCS VIC management

• Fault Engine infrastructure for monitoring and reporting all system fault

CIMC

Python SDK verfügbar

• XML Rest API

• Netconf

• Scripting

• Python

• TCL

• APIC-EM (N9k)

• On Platform Kit (OnePK)

• IOS

• IOSd/XE

• XR

• NX-OS

Nexus

Nexus 7000 XML Guide

http://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/6_x/nx-

os/system_management/configuration/guide/sm_nx_os_cg.html

Software

• XML Rest API

UCS ManagerBlades und Fabric Interconnect

• Alle Einstellungen die per GUI verfügbar sind , sind auch per XML verfügbar. Die GUI nutzt „auch nur“ die API, und schickt die Befehle zum Data Management Engine (DME)

• EventSubscriptionAPI

http://<UCS Manger IP>/visore.html

http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/sw/api/b_ucs_api

_book.html

UCS Manager: behind the scenes

UCSM Management Information Model Summary:

• Data Management Engine (DME) contains full representative object model stored in the Management Information Tree (MIT)

• Interaction with DME occurs via Northbound External Interface Layer

• Northbound interfaces all resolve down to XML API

• Application Gateways couple UCSM with end points

UC

SMUCS CLI

Data Management EngineMIT

Management

Controller Application

Gateway

Nic

AG

Host

AG

Port

AG

Dcos

AG

NXOS(A)

UCS 6100

NXOS(B)

UCS 6100

IOM (CMC)

UCS 2100

B200/B250

(BMC)

MEZZ_CARD

M*KR

UCS UOS

telnet, ssh, netconf

Smash CLP

Component

Native XML API

Custom

Application GUI

Programmatic Infrastructure• Comprehensive XML API, standards-based interfaces

• Bi-Directional access to physical & logical internals

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

1

UCS XML API Overview

• Communicates over HTTP / HTTPS

• XML Based, Transactional

• XML Transactions are Order Agnostic

• Standard Request / Response cycle

• Role Based Authentication

• Object Model Hierarchy

• Built-in Object Browser

• Published XML Schema

• Java Doc Style documentation

• High Availability

• Event Stream

UCS XML API Features

XML API

1

Everything is an object

Objects are hierarchically organized

Class identifies object type Card, Port, VNIC…

Class InheritanceServer port is a subclass of port.

A server blade is a subclass of compute entity.

Set of attributes

identity states descriptions

references lifecycle

UCS XML Database contains comprehensive system information Discovered components

System configuration

Operational status including statistics and faults

Managed Objects (MO)

Managed Object

Root

1

Each object is uniquely identified by a DN

Slash delimited sequence of RNs

RNs (Relative Names) are unique within the context they are defined. Example compute blade slot id.

Rn format is defined in naming rules

Immutable

prefix naming properties

dn = {rn1}/{rn2}/{rn3}

rn1

rn2

rn3

Examples:

sys

sys/switch-A/envstats

sys/chassis-1/blade-5

org-root/ls-Webserver

topRoot DN is empty string

validation

Distinguished Names

Root

2

Authentication

Object Navigation

DN (Name) Resolution

Class Resolution

Ancestor-Descendant Resolution

Sub-tree “Scope”

Child

Parent

Object Property Filters

Apply to DN or matching class

Single or multiple objects

Apply a hierarchical config

Object Configuration

Event Channel

Events

Method Categories

Managed Object

Root

DN

{RN}*

DN

Registry

Class

RegistryInstance IDRegistry

21

Ähnlich wie UCS Manager, nur dass man mehrere Domains verwalten kann.

Zu Statistiken siehe:

https://communities.cisco.com/docs/DOC-36388

UCS Central

Cisco UCS Central XML API

http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-

central/api/b_UCSC_XML_API_book/b_UCSC_XML_API_book_chapter_01.html

You can use applications developed using this REST (Representational State Transfer) API to do the following:

• Get Cisco UCS Director reports about physical and virtual devices, networks, appliances, groups and users, policies, administration, resource accounting, funds, and other monitored entities within your Cisco UCS domains.

• Invoke orchestrator workflow and task operations.

• Invoke additional operations specific to Cisco UCS Director

UCS Director

http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-director/rest-

api-guide/4-1/b_Cisco_UCS_Director_REST_Developer_Guide_41.html

Use Cases

• Standard Einstellungen definieren

• Bootreihenfolge

• IP Adresse CIMC

• NTP Server

• Useraccounts

• SMTP Mail Einstellungen

• Service Profile anlegen

• VLANs einrichten

• VNics/ Ports einrichten

Use Cases

• Standard Configs generieren

• Änderungen automatisieren

• Configs sichern

• Abbilden von CVDs

• Dokumentation

Use Case

Tools

• Emulation of large-scale environments

• Changes in the hardware inventory (device discovery)

• Firmware upgrade testing

• Troubleshooting real UCS problems

• Test UCS XML API requests in lieu of a real server

• Invoke the UCS GUI to become familiar with its usage and features

• Invoke the model object browser and internal documentation

• Provide a convenient way to demonstrate UCS operations for training and other activities

UCS Platform Emulator

https://communities.cisco.com/docs/DOC-37827

• Import config from live system

• No need for real hardware

• Runs on VMWare Player, Workstation,….

UCS Platform Emulator

https://communities.cisco.com/ucspe

UCS Platform Emulator

UCS Platform Emulator

UCS Platform Emulator

Don’t reinvent the wheel…

PowerShell is the common management platform used across all Microsoft operating systems and applications

UCS PowerTool is a Cisco-built, user-friendly, PowerShell-based library that Microsoft tools understand

A simple way to utilize Windows PowerShell and customize tools to business needs

…build on it

UCS & C-Series

UCS PowerTool

UCS PowerToolBringing More Power to PowerShell

UCS PowerToolProgrammatic control over UCS C-Series hardware

Goal: Deliver comprehensive infrastructure management capabilities

based on .NET and PowerShell by leveraging open XML API

Cisco UCS

PoSh Wrapper

UCS .NET

Namespace

UCS XML API

cmdlet

s

• 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

• ‘Good’ 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

PowerTool for standalone rack servers

• Extend the power of PowerTool for standalone c-series servers

• Manage both UCSM managed and standalone C-series from PowerShell

• Cmdlets library for c-series management

• Support for complete management of servers

• Cmdlets to compare, clone configuration settings between servers

• Support for servers with CIMC v1.5

• https://communities.cisco.com/docs/DOC-37154

• Convertto-UCSCmdlet command• Einfaches Tool um UCS Klicks in PowerShell Befehle zu wandeln

• UCS Power Tools Starten

PowerShell

How to use:

https://www.youtube.com/watch?v=0GWjVJ1x3QQ

ConvertTo-UcsCmdlet -UcsBackup -LiteralPath backup.xml -OutputPath output.ps1

• connect-ucs <IPAddress>

• ConvertTo-UcsCmdlet

• Logdateien C:\Users\<username>\AppData\LocalLow\Sun\Java\Deployment\log\.ucsm

• VLAN anlegen:Get-UcsLanCloud | Add-UcsVlan -CompressionType "included" -DefaultNet "no" -Id333 -McastPolicyName "" -Name "TonisVLAN" -PolicyOwner "local" -PubNwName "" -Sharing "none"

• VLAN löschen:Get-UcsLanCloud | Get-UcsVlan -Name "TonisVLAN" -LimitScope | Remove-UcsVlan

PowerShell

• DEMO

PowerShell

Cisco UCS C-series server

Python SDK for UCS C-series serversProgrammatic control over UCS servers

Cisco IMC

3rd party tools

Python SDK (UCS XML wrapper)

UCS XML API

• Extend python based automation to UCS

servers seamlessly

• Architected for Flexibility and coverage

• Comprehensive coverage of all supported

operations

• Fully classed object definition

• Targeted to support full manageability of UCS

across multiple releases

• Sample scripts for shorter ramp up

Custom

scripts

Python SDK for C-series serversSupported Objects, Assets, Operations

• Server

• Inventory- CPU, Memory, Adapters, IMC, hard drive, fan, psu…)

• Power Operations

• Power / cooling / network /environmental statistical data

• Hardware Faults

• Connectivity management

• Cisco IMC connect/disconnect

• Cookie refresh

• Firmware management

• Non-interactive diagnostics

• KVM launch

• And more….

• Configuration Operations

• Configuration setting, manipulation, deletion

• vNIC / vHBA settings

• Boot order

• BIOS configuration

• IMC configuration

• Compare and Sync Managed Objects across servers

41

https://communities.cisco.com/docs/DOC-37174

Element Management Functionality

UCS Director API

Stand-Alone UCS C-Series

UCS Director Infrastructure Management & Orchestration

APICI

MC

API

UCS Manager Domain x

IntegratedConverged

Infrastructure

FlexPod

vBlock

Advanced Infrastructure Abstraction & Automation

API

UCS Manager Domain x

APICI

MC

APICI

MC

APICI

MCAPICI

MC

APICI

MC

APICI

MC

APICI

MC

APICI

MC Storage

VMs

Multi-Hypervisor

Network Devices

Non-Cisco Infrastructure

Physical Compute

APICI

MC

APICI

MC

HUUHost Update

Utilities

SCUServer ConfigUtilities

CIMCXML APIAdmin

Tools

goUCSAutomatio

n ToolUCS

Power ToolFor Power

Shell

ScriptingTools

PythonSDK API

UCS CentralMulti-Domain Management

UCSPlatformEmulator

MicrosoftSystem Center

BMCBladeLogi

c

Splunk

ENTTools

UCSDirector

UCSCentral

EMC -UIM

VCE -Vision

CA -Spectrum

Cisco UCS Management Tools

© 2009 Cisco Systems, Inc. All rights reserved. Cisco ConfidentialPresentation_ID 45

Cisco Developer Network – Datacenter

https://developer.cisco.com

Application Stack

UCS Visibility

and Control

OS and

Software

Management

Service Orchestration

Provisioning and Configuration

Monitoring and Analysis

Third Party Management

Unified Management API

Service Profiles

Cisco UCS Pools

Cisco UCS Manager

Manage UCS with Industry Standard Tools

UCS Management Ecosystem

4

Referenzlinks

• UCS Communityhttp://communities.cisco.com/ucs

• UCS Integrationshttp://communities.cisco.com/ucsintegrations

• CIMC C-Series

https://developer.cisco.com/site/ucs-dev-center/overview/ucs-c-series/c-series-cimc-xml-api/index.gsp

• CIMC XML API Programmer’s Guide for Cisco UCS E-Series Servers

https://developer.cisco.com/fileMedia/download/619ba969-6be8-4dfd-9143-758f6be69f28

• Cisco Live

Automation Tools for UCS Sysadmins Breakoutsession

Referenzlinks

• Python https://www.python.org/downloads/http://learnpythonthehardway.org/book/ex0.htmlhttp://docs.python-requests.org/en/latest/user/install/#installhttps://wiki.python.org/moin/BeginnersGuide/NonProgrammers

• Postman www.getpostman.com

• SoapUIhttp://www.soapui.org/Best-Practices/understanding-rest-headers-and-parameters.html

• http://sourceforge.net/projects/soapui/files/soapui/5.1.3/

Downloads

• PowerShellhttp://www.microsoft.com/de-de/download/details.aspx?id=40855

• Firefox Poster https://addons.mozilla.org/en-US/firefox/addon/2691

Referenzlinks

• Cisco UCS Manager XML API Introduction & Overviewhttps://www.youtube.com/watch?v=zk64pcs_vQA

Video

• CVD

• Communities

• UCS Domain Script

• Flexpod Script

• Racktables.org Integration

Ideen

• Service API

• apiconsole.cisco.com

Links