Anda di halaman 1dari 106

Extending Cisco UCS Director with

Orchestrator, APIs and the Open Automation


Framework
Harold Treat, Senior Product Manager

BRKDCT-1456

Agenda

Cisco UCS Director Overview

Extending UCS Director

Orchestrator
Programmability

Custom Tasks
APIs
Open Automation

Conclusion

Participating with Poll Everywhere


Pollev.com/cisco25

22333

cisco25

Web voting

Text voting
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Cisco UCS Director Overview

Business
Application
Requirements

Challenges:

Disparate management systems


Infrastructure inefficiency
Under utilization

Manual processes

High operational cost

IT
Planning

Add Users
and Groups

Define
Cost Models

Approvals

Rigid silos

Network Adm

Server Admins

Complex IT Processes to Deploy Application


Resources

Storage

VM provisioning under 5 minutes

Setup
Servers

Bare metal
Provisioning

Configure
Servers

Create Storage
Resources

Create
VLAN

Add VLAN to
Service Profile

Create
VLANs

Update
Trunks

Create
Network Policies

Create UCS
Service Profiles

Create
IP space

Create
vFilers

Map
NetApp LUN

Create
Storage Policy

Configure
SAN Zoning

Add vFilers
to Group
UCS Blade
Power On

Physical Infrastructure provisioning How Long?


BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Introducing Cisco UCS Director


Enabling Enterprise Private Clouds

UCS Director
Web
Apps

Business Critical
Apps

Dev./Test
Sandboxes

Network
Compute

BareMetal

BareMetal

Web

App

Web

DB

Web

Hyper-V/KVM
Bare-Metal

Storage

Physical

HYPERVISOR

HYPERVISOR

L4-7

Virtual
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Broad Multi-Vendor Infrastructure Support


UCS Director
Converged

VM

L4-L7

Compute

vASA,
CSR1000v

Network

Storage

Nexus
MDS
*
*
*
*
*

*
*
* Partner provided

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Key Use Cases

Application Infra. provisioning with UCS-Director : 100% VMs

Infrastructure Provisioning for Applications : 100% Virtual & Mixed

Rapid deployment of
Integrated Infrastructure

Application Ready
Infrastructure

Infrastructure as a
Service (IaaS)

BRKDCT-1456

Express Offering for


BigData Applications

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Cisco UCS Director Solution Overview


Tenant
Users

Admins

Self Service
Web Portal

LDAP, Active Directory


RBAC
IT Ticketing Systems
CMDB
Metering/Chargeback

Operators

Admin
Web Console

REST API

System
Integration

UCSD Unified Infrastructure Controller


Multi-tenant & integrated cloud platform

Cisco UCS Director


Integrated Multi-tenant Cloud Platform

Open
Automation
Framework
Custom Connector

3rd

Party Device

Server Managers

Storage
APIs

Network
Manager

vCenter

SCVMM

RHE-VM

UCS
Nexus

Physical Infrastructure

Virtual Infrastructure
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

10

Participating with Poll Everywhere


Pollev.com/cisco25

22333

cisco25

Web voting

Text voting
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

11

Orchestrator and Workflows

Introducing Orchestration and Workflows

Suspend/Resume Workflow

my-workflow
Start

Rollback Workflow
Approvals

Storage

Task-1
Complex logic (loops, if-else)

Network

Task-2

Import/Export, Versioning
Schedules

Compute

Task-3

Virtualization

Task-4

Custom Workflow Input Types


Publish to Catalog

End

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

13

Task Library 2000+ Tasks

What is a Task

Atomic Operation performed on a

UCS Tasks

Managed Node
Building block to perform a

complex operation
Task Library
Compute, Network, Storage, L4-

L7, Virtualization tasks are in the


library
Device support provides Task

Library

Select UCS Server


Reset UCS Server
Power On UCS Server
Power Off UCS Server
Create UCS Service Profile from
Template
Create UCS Service Profile
Select UCS Service Profile
Modify UCS Service Profile Boot
Policy
Delete UCS Service Profile
Associate UCS Service Profile
Disassociate UCS Service Profile
Create UCS Boot Policy

Modify UCS Boot Policy LUN ID


Clone UCS Boot Policy
Modify UCS Boot Policy WWPN
Add VLAN
Delete UCS Boot Policy
Delete UCS VLAN
Add VLAN to Service Profile
Add iSCSI vNIC to Service Profile
Add vNIC to Service Profile
Delete vNIC from Service Profile
Create Service Profile iSCSI Boot
Policy
Modify Service Profile Boot Policy to
Boot from iSCSI

Create Custom Tasks to extend

functionality
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

14

Real-World Workflow: OS Deployment Automation


on UCS
Create
VLANs

Update
Trunks

Create Network
Policies

Create UCS
Service Profiles

Configure
SAN Zoning

Service Profile
Creation

Bare metal
Provisioning
(ESX 5.1)

Configure
Servers

Create
LUNs & Volumes

Create
VLAN

Add VLAN to
Service Profile

Create
IP space

Create
vFilers

Add vFilers
to Group

Map
NetApp LUN

Create
Storage Policy

UCS Blade
Power On

Register
Host Node

Send Complete
Notifications

Orchestrated
Workflow

Legend
Network Admin
Storage Admin
Compute Admin

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

15

Workflow Designer
Workflow (Name, Location, Description, Inputs)

Verify Dependencies

Design Pane

Task Library (Searchable)

Tasks
Success
Fail

Help

Save
Workflow

Policies Orchestration Workflows <WorkflowName>


BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

16

Drag n Drop Workflow Creation


Orchestration, Workflow and Tasks Defined

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

17

Workflow Rollback
What is Rollback

De-provision resources

State-aware, Model-aware

Reverse-order of execution

Use Cases

Proof of concepts

DR Testing

Resource de-allocation on
customer termination
https://communities.cisco.com/docs/DOC-55502
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

19

Workflow Fundamentals

Legend

Rapid Orchestration with Input/Output Chaining

Tenant
User

Workflow
Inputs

Workflow
Inputs

Admin

Inputs

Task-1

Outputs

Workflow
Inputs
Task
Inputs
Task
Outputs
I/O
Chaining

Inputs

Inputs

Task-2

Workflow

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

20

Implementing Complex Logic in Workflows


Tru
e

False
If-Else

Path-2
Path-1

Path-3
Conditional

Failed

Lists

Failed

Counts

Start

Start

Start

Power Status
Start Loop

If Else

n=5

Conditional

VLAN test
VM Power
Action

Add VLAN

Delete VLAN

OFF

ON

DELETE

End Loop

End

End

End
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Workflow Versioning

Cisco UCS Director Orchestrator supports workflow version


history.
Version history allows reverting a workflow state to an earlier
one or increment the version.
Versioning is useful for comparing the differences between the
current state of a workflow with an earlier saved version.
Used in marking the workflows to be ready for production,
deployment, or for any other operation.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

22

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

23

Advanced Orchestration Features


Activities
Generalize IT Operations

Triggers
Corrective actions in response to monitoring conditions

Compound Workflow
Leverage existing workflows to build complex workflows

Custom Input Types


Easily create new variable and data types to meet your needs

Custom Tasks
Create new tasks to build Workflows to deliver business specific IT services
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

24

Extending UCS Director

Extending UCS Director

Various Options Where to start, Where to end?

Southbound
APIs

REST APIs

Open
Automation

Custom Tasks
SSH Tasks

PowerShell
Agents

Custom
Workflows

Workflows

Northbound
APIs

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

26

Extending UCS Director

Extending Orchestration

Importing workflows and tasks


Generic Tasks (SSH and PowerShell)
Custom Tasks

Accessing Programmatically

REST APIs (Northbound APIs)

Adding Devices

Open Automation (Southbound APIs)

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

27

Cisco UCS Director Solution Overview


Tenant
Users

Admins

Self Service
Web Portal

LDAP, Active Directory


RBAC
IT Ticketing Systems
CMDB
Metering/Chargeback

Operators

Admin
Web Console

REST API

System
Integration

UCSD Unified Infrastructure Controller


Multi-tenant & integrated cloud platform

Cisco UCS Director


Integrated Multi-tenant Cloud Platform

Open
Automation
Framework
Custom Connector

3rd

Party Device

Server Managers

Storage
APIs

Network
Manager

vCenter

SCVMM

RHE-VM

UCS
Nexus

Physical Infrastructure

Virtual Infrastructure
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

28

Participating with Poll Everywhere


Pollev.com/cisco25

22333

cisco25

Web voting

Text voting
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

29

Import and customize/localize


workflows

Workflows, and their


dependencies, are stored in
WDFX files.
WFD files are older workflows

Locate and upload the workflow

The contents of the WDFX file will


be shown giving the name of the
objects that will be imported.

(Optional) If testing the workflow,


it can be imported into an existing
or new folder in UCSD.

Save

Upload

Import

Orchestration
Import Workflow

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

31

Orchestration Workflow Localization


Overview

When importing a workflow from the Communities site or from


another instance of UCS Director it will be highly likely that the
workflow will have to be localized.

For example if the script was pointing at a storage array in the site of the
person who created it, you will need to update that pointer to your storage
array.

UCS Director has a validation mechanism to identify which


references need to be updated.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

32

Orchestration Workflow Localization


Validation

After Importing a workflow, the Validation State will show Failed indicating
the workflow needs to be modified for this UCS Director instance.

Open the workflow and click the Validate Workflow button.

It will provide a dialog that provides guidance on resolving the conflicts.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

33

Orchestration Workflow Localization


Validation Admin Input

Admin Inputs are defined in the Edit Workflow Properties Edit User
Inputs

In this example the vCenter name does not match anything in the local UCS
Director, nor does the VM selection.

Edit these variables, selecting local values from this instance of UCS
Director.
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

34

Orchestration Workflow Localization


Validation Admin Input

Edit these variables, selecting local


values from this instance of UCS
Director.

Select the appropriate local values.

When done, save the workflow


properties.

Click the Validate Workflow button


again.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

35

Orchestration Workflow Localization


Validation Tasks

If the identities were embedded in the task (e.g.- manually selected), the
tasks will have to be edited to set the correct values for this instance of UCS
Director.

The Task Details column indicates which fields in which tasks need to be
fixed.

UCS Director also highlights each task needing updates in the editor.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

36

Orchestration Workflow Localization


Validation Tasks

Edit each task that has been flagged


with errors.

Navigate to the Task Inputs page and


fill in any blanks.

Save the task using Submit.

Note The editor will still show an error


until the Validate Workflow has been
run again.

Repeat for each flagged task.

Click the Validate Workflow

If there are more errors, correct them and


repeat. This is normal.

UCS Director provides guided options for localizing


workflows

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

37

Orchestration Workflow Localization


Validation Verification

Press the Execute button to test


the workflow.

Provide any required inputs


Select Show Detail Status to
monitor the workflow

Use the Refresh button to monitor


the status of the workflow.

If there are any errors click on the


Log tab to see what failed.

Note the Refresh button for the Log


tab is at the bottom of the window.
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

38

Orchestration Workflow Localization


Inserting Tasks Add Task

After running a workflow, it may be advantageous to modify the workflow


slightly to meet local needs or preferences.

(Recommended) Before making any logic changes to the workflow, Create


New Version using the provided button.

To locate the task use the filter option under Available Tasks and drag it into
the workflow pane.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

39

Orchestration Workflow Localization


Inserting Tasks Describe Task

Task Name is what the task is


called within the workflow

Comment is what the task


name shows to the end user

Set the input(s)/output(s) and


save the task.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

40

Orchestration Workflow Localization


Inserting Tasks Link into Workflow

Select Parent Task and Link


New Task Unlinked

New Task Inserted

Select what to do if it fails


BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

41

Wrapping Up
References

UCS Director

http://www.cisco.com/go/ucsdirector

Workflow Index

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

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

42

Generic Tasks

SSH Tasks
Overview
Description
CLI commands executed on remote system by UCS-D on you behalf

Suitable for
UCS Director admin have CLI access (password, credentials etc)
Prior investment in shell scripts
Skillset

BASH, Vendor dependent CLI


Usage & Example
Kick-off processes, legacy applications, un-supported hardware

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

44

SSH Tasks
Implementation
Create a workflow
Add workflow task
[Type = SSH Command]
Define Inputs

Hostname & Creds

Command list

Execute workflow

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

45

PowerShell Scripts
Invoke through Executed PowerShell Command Task
Description
Launch PowerShell scripts from UCS Director

Environment
Microsoft environments
Prior investment in PowerShell scripting
Skillset

PowerShell, Windows, UCS Director


Usage & Example
Add a host to additional domains or DNS systems

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

46

Introducing PowerShell Agents (PSA)


Script Servers to Relay and Execute PowerShell Scripts

MS-Domain-1

Default TCP Port: 43891


PSA runs as a Windows Service
Enable Remote Shell
Enable Remote Management

PSA

UCS Director

MS-Domain-2

PSA need not be on every node, not like a host/SNMP agent


BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

47

PowerShell Agent Deployment Process


Install, Configure and Add to UCS-Director
Install Cisco PSA

winrm quickconfig
winrm g winrm/config
winrm set winrm/config/client
@{TrustedHosts="*"}

Configure Windows
Enable WinRS &
WinRM
Configure Firewall

Add to Workflow

Test PowerShell

Add Agent to UCS-D

Test Connection

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

48

PowerShell Script Execution


Example

VDC
Windows
VM
Process state
Firewall policy

Policy
Audit

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

49

Generic Tasks Summary


SSH Task
Executed CLI commands on remote system in SSH session

PowerShell Task
Execute PowerShell commands on remote system through PSA

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

50

Custom Tasks

Custom Tasks
Overview
Description
Combination of JavaScript + UCS Director Libraries
Have pre-defined Inputs/Outputs
Have look and feel of normal UCS-D Workflow tasks
Environment
Wherever custom tasks are needed
Skillset
Java, JavaScript, UCS Director
Usage & Example
Used to extend OOTB task library as needed

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

52

Custom Task Examples

Get Static IP Pool Policy Attributes

Get Mail Settings

Invoke Service Request from Task

LOV of Current Users

Custom SSH with Rollback

Move ESXi host to another cluster

VM deployment using Infoblox as the IPAM

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

53

Custom Task Overview

importPackage(java.util);
importPackage(com.cloupia.model.cIM);

UCS Director Runtime


DB

Libraries

Inventory

Sample Script to Resize VM Disk

function resizeVmDisk(vmIdStr, diskName, sizeInGB)


{
var vmId = Integer.parseInt(vmIdStr);
var vmContext = util.createContext("vm",
null, vmIdStr);

Java API

// obtain VM details
var vminfo = ctxt.getAPI().getVMwareVMInfo(vmId);
logger.addInfo("About to resize VM "+ vmIdStr
+" name="+vmname);
var status = ctxt.getAPI().performAction(
vmContext,
"diskResize",
"Resize VM Test,
ctxt.getUserId(),
paramarr);
logger.addInfo("status = "+status);

Custom Task Code

Inputs

Javascript

Cloupia Libraries

API to access to UCS-D


Outputs

}
var vmidstr1 = ctxt.getInput("VMID");
resizeVmDisk(vmidstr1, "Hard Disk 1", "10");
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

Custom Tasks
UCS Director Scripting Model
Top Level Objects

addDebug()
addInfo()

addWarning()

ctxt
Workflow Execution
Context
Provides access to
task, input, output

logger
Logging service
Provides access to
several logging
methods

addError()

util
Utility Object
Provides access to
several utility methods

BRKDCT-1456

input: Access to input


variables
output: Access to output
variables

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

55

Custom Tasks
Implementation

Click Policies Orchestration Custom Workflow Tasks Click Add

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

56

Custom Tasks
Implementation
logger.addWarning("[CUSTOM] --EXECUTING CUSTOM TASK ");
var userId = ctxt.getUserId();
var userProfile = ctxt.getAPI().userAPIGetMyLoginProfile();
var firstname = userProfile.getFirstName();
var lastname = userProfile.getLastName();
var email = userProfile.getEmail();
var first = input.First_Number;
var second = input.Second_Number;
var sum = first + second;
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]
logger.addWarning("[CUSTOM]

USER-ID: " + userId);


FIRST NAME: " + firstname);
LAST NAME: " + lastname);
EMAIL: " + email);
FIRST: " + first);
SECOND: "+ second);
THE SUM IS: " + sum);
--- FINISHED ----");

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

57

Demo

Using Cloupia Script Interpreter for Dry-Runs and


Troubleshooting

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

59

Using Cloupia Script Interpreter with Context for


Custom Task Troubleshooting

Launch Interpreter with Context

Loads the environment

Access API methods and Objects

Dry-runs/Troubleshoot

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

60

Custom Tasks Summary


Custom Tasks
Extend the task library with a new task written in JavaScript

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

61

Northbound API

Northbound APIs
About

Northbound Integrations Enable:


Invoke pre-built operations
Application integration [Use it!]
Launch Workflows and tasks
Access reports for:
Physical infrastructure
Virtual devices
Network and Storage devices
Users, Groups, Policies, Admin functions

BRKDCT-1456

REST

PowerShell

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

63

Northbound APIs
Overview

UCS
Director

Start

Workflow

New SR

Approvals

Task 1

SR Complete

REST APIs

End

Task N

Orchestration Engine
Cisco
Physical Infrastructure
Cisco UCS

Virtual Infrastructure

Nexus
VMware

Hyper-V

KVM

Service Now

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

64

REST APIs
Supported Protocols/Formats

Java

Supported Protocols and Formats


JSON, XML & Java

JSON (JavaScript Object Notation)


Consistent Data Format
Unordered set of name/value pairs

XML
JSON

{"vdcName":"vDC with API", "vdcDescription":vDC Demo,vdcId:123}

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

65

REST API
Operations

Login

LOVProvider

UserAccount

PaymentStatus

Report

ResourceAccountingandLimits

Approval

ServiceContainer

Catalog

ServiceRequest

Chargeback

Task

Funds

VDC

Group

VMO

Inventory

Workflow

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

66

Getting Started Access Key and API Browser

User account for API


access

REST API Browser

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

67

REST APIs
3000+ API Operations

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

68

REST APIs
Using the REST API Browser

https://developer.cisco.com/site/ucs-director/rest-api-guide/

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

69

REST APIs
Example: Getting the list of all VMs

Using REST Easy with Firefox


Add API Access key customer HTTP
headers
Standard HTTP Response codes

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

70

REST APIs
Dissecting the JSON Request
http://172.31.240.203/app/api/rest?formatType=json&opName=userAPIGetAllVMs&opData={}

UCS Director IP address

Format type = JSON

API Operation

Params
{None}

RESPONSE (RAW)
{ "serviceResult":{"rows":[{"Cloud":"MGMT-2VMWare","Request_ID":0,"VM_ID":1,"VM_Label":"","Instance_ID":"tme-mgmt-2vCenter","Host_Name":"mgmt-2-vcenter","IP_Address":"172.31.240.202","Image_Id":"tme-mgmt2-vCenter","Power_State":"ON","vDC":"Default vDC","Category":"Discovered
VM","Provisioned_Time":"","Scheduled_Termination_Time":"","Guest_OS_Type":"SUSE Linux
Enterprise 11 (64-bit)","Assigned_To_User":""}

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

71

REST APIs
So What about Java?
import
import
import
import

java.util.Collection;
java.util.List;
java.util.HashMap;
java.util.Map;

import com.cisco.cuic.api.client.CuicServer;
import com.cisco.cuic.api.client.UserAPIGlobal;
import com.cisco.cuic.api.client.APITabularReport;
public static void main(String[] args) {
/*
* Fill-in the Cuic Server info.
*/
CuicServer server =
CuicServer.getAPI("<IP address>",
"<REST Key>", "https", 443);
UserAPIGlobal instance = new UserAPIGlobal(server);
APITabularReport obj = instance.userAPIGetAllVMs();

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

72

Real Examples: Invoking a Workflow from APIs


Approach-1: REST API
Sample Workflow
Inputs:

Volume Name

Volume Size (GB)

iGroup Name

https://communities.cisco.com/docs/DOC-55973
https://communities.cisco.com/docs/DOC-57426
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

73

REST API Request


POST to URL

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

74

REST API Response

REST API responds with the Service Request ID


{
"serviceResult": 531,
"serviceError": null,
"serviceName": "InfraMgr",
"opName:"userAPISubmitWorkflowServiceRequest"
}

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

75

REST API Execution

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

76

PowerShell API
Introduction

Northbound integration with UCS


Director

REST APIs are wrapped inside PS


CmdLets

Secure access based on access key

Benefits
Easy adaptation
Integrate with existing
automation framework
Quicker ROI
All the benefits of REST in
Windows environment

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

77

PowerShell APIs
Getting Started
UCS Director PowerShell
Installation Wizard

Launch shell
(Windows 2012)

Verify CiscoUcsdPS
module is installed

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

78

PowerShell API Available Command Set


Get-Command Module CiscoUCSDPS
Invoke-userAPICancelServiceRequest

Invoke-userAPIGetServiceRequestDetails

Invoke-userAPIExecuteVMAction

Invoke-userAPIGetServiceRequests

Invoke-userAPIGetAllCatalogs

Invoke-userAPIGetServiceRequestWorkFlow

Invoke-userAPIGetAllGroups

Invoke-userAPIGetTabularReport

Invoke-userAPIGetAllVDCs

Invoke-userAPIGetVMActionRequests

Invoke-userAPIGetAvailableReports

Invoke-userAPIGetWorkflowInputs

Invoke-userAPIGetHistoricalReport

Invoke-userAPIGetWorkflowInputValue

Invoke-userAPIGetInstantDataReport

Invoke-userAPIGetWorkflowInputValues

Invoke-userAPIGetPage

Invoke-userAPIGetWorkflows
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

79

PowerShell API
Getting Started
Register the API Access Key:
[Environment]::SetEnvironmentVariable("UCSD_SERVER","10.1.1.1","User")
[Environment]::SetEnvironmentVariable("UCSD_RESTKEY","562FDF763A384E78B9BAB7FE02CA13B6"
,"User")

Verify:

API Access Key

[Environment]::GetEnvironmentVariable("UCSD_RESTKEY","User")

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

80

PowerShell API
Example

Invoke-userAPIGetWorkflows

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

81

Northbound APIs Summary


REST APIs
Perform application integrations with JSON, XML and Java bindings

PowerShell APIs
PowerShell wrappers over REST API to integrate with Microsoft environments

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

82

Open Automation Framework

Introducing Open Automation Framework


Open API and SDK to build custom integrations to support 3rd Party Infrastructure
Cisco UCS Director

Out of the box Integrations

Open Automation
Framework

VMware

Hyper-V

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

84

Capabilities in Open Automation based Integrations

3rd Party infrastructure support

Task Library for usage in workflow automation

Life Cycle Management

Custom Account Type, Pod


Inventory, Configuration, Provisioning, Monitoring Triggers

GUI

New Menu Items

Reports

Tabular, Summary, Pie Charts


CloudSense On-demand Reports

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

85

Open Automation Getting Started


Following are the resources required to use Open Automaton
Open Automation SDK
Development Environment
JDK (Java Development Kit)

Third-party Libraries/APIs/Utilities as appropriate


Java Development Expertise

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

86

About Modules
A module is the top-most logical entry point into Cisco UCS Director.
To add or extend any functionality, a module needs to be developed

and deployed in Cisco UCS Director.


A module can include the following components:
o Task A task that can be used while defining the workflow.
o Reports Reports that appear in the UCS Director interface.
o Trigger A condition that once satisfied, can be associated with some action.

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

87

Deploying a Module on Cisco UCS Director


UCSD has the following screen to upload and manage modules. Use
this to upload the ZIP file to UCSD.
The path for managing the modules in UCSD is located at
Administration Open Automation

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

88

Custom Task vs Open Automation


Custom Tasks

Open Automation

No restart required. Easier to add


and use new tasks
Built using Cloupia Script
No need to do packaging or
deployment

Need to restart UCS Director services to


load new components
Built using Java
Modules need to be packaged and
deployed in UCSD

Limited Libraries are available for


custom tasks

Can add all additional libraries and files

Task internals are visible to workflow Task internals are hidden to administrators
developers.
and workflow developers

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

89

Resources

UCS Director programming guides

http://www.cisco.com/c/en/us/support/servers-unified-computing/ucs-director/productsprogramming-reference-guides-list.html

UCS Director SDK downloads (requires DevNet userid)

https://developer.cisco.com/site/ucs-director/sdk-downloads/

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

90

Partner Ecosystem Examples

UCS Director Connector for Pure Storage


ORCHESTRATE FLASHARRAY AND FLASHSTACK
Overview

Workflow automation tool for end to end provisioning of compute,


network and storage resources

Build service catalogue to enable end user self service portal for ease
of provisioning

Multi-domain and vendor provisioning task library

View and report on capacity utilization

CI PODs
VMware vCenter
Cisco UCSM

Cisco Nexus

Benefits

Cut provisioning time from hours to as little as 15 minutes with


FlashArray five canned end-to-end workflows

Understand available capacity to correctly place workloads

100% task parity with FlashArray with rollback built-in

De-risk deployments with cross stack rollback functionality

Multi-generation of FlashArray supported across Purity 4.x


ADDITIONAL INFORMATION AVAILABLE ON GITHUB
http://github.com/purestorage/ucs-director-plugin

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

92

hyper-converged SDS solution


Cisco UCS Director
Unified Infrastructure Management
Manage Cisco UCS and your storage infrastructure
and incrementally expand to holistically manage all of
your integrated IT infrastructure
Automate infrastructure management and
orchestration
Reduce time to value with comprehensive,
automated, policy based workflows
Eliminate drift from predefined configurations and help
ensure 100 percent compliance

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

93

NimbleStorage SmartStackTM Support


in UCS Director
Use Cases
1. Converged SmartStack
Management
Cisco UCS + Nimble
Storage CS Series
Platform

SmartStack

SmartStack

2. Automated Day-1
Storage Operations
New storage
Grow storage
Remove Storage
Data protection
Rapid production
environment cloning

SmartStackTM
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

94

Open Automation Framework Summary


Open Automation Framework
Open Southbound API & SDK to extend support to new or 3rd party devices

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

95

Resources

Cisco UCS Director Community Workflows Index

https://communities.cisco.com/docs/DOC-56419
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

97

Developer Network (DevNet) for Cisco UCS Director

https://developer.cisco.com/site/ucs-director/overview/
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

98

Steps to Get Your Device Supported and Certified in


Cisco UCS Director
1. Register
2.Download

Register as a Cisco Solution Partner


http://solutionpartner.cisco.com/

Download SDK and Documentation


https://developer.cisco.com/site/data-center/converged-infrastructure/ucs-director/sdk-downloads/

3.Order

Order NFR License Member benefit for registered Solution Partners

4.Develop

Design and Develop Custom Connector to your Device

5.Validate

Test and Validate the Connector

6.Submit

Submit the Connector module for Interoperability Verification Testing

7.Publish
8.Support

Publish the software, collateral, white papers and other assets to Market place
https://marketplace.cisco.com/catalog
Support and maintain the connector

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

99

Key Takeaways
Cisco UCS Director offers Extensive Functionality Out of The Box
2000+ Task Library to Orchestrate Workflows and build IT Services rapidly

Cisco UCS Director Can Be Extended to Meet your needs


Comprehensive extensibility framework allows you build new functionality rapidly

1. Orchestrator
IT service delivery with Workflows and Custom Tasks

2. Northbound APIs
REST and Powershell API allow integrate with IT systems

3. Open Automation Framework


Add new or 3rd party device support with open Southbound API
BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

100

Call to Action
Learn More About Cisco UCS
http://www.cisco.com/go/ucsdirector
Try

Director

out Cisco UCS Director

For Customers: Order Eval License - http://cisco.mediuscorp.com/ucsdeval


For Partners, Developers, ISV: Order NFR License - http://cisco.mediuscorp.com/ucsd
Visit Cisco UCS Director Community Website for Workflows/Custom Tasks
https://communities.cisco.com/community/technology/datacenter/ucs_management/cisco_ucs_develo
ped_integrations/content?filterID=contentstatus[published]~category[ucs-director-workflows]
Visit

Cisco UCS Director DevNet Site and Start Developing

https://developer.cisco.com/site/ucs-director/overview/

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

101

Complete Your Online Session Evaluation

Give us your feedback to be


entered into a Daily Survey
Drawing. A daily winner will
receive a $750 Amazon gift card.

Complete your session surveys


through the Cisco Live mobile
app or from the Session Catalog
on CiscoLive.com/us.
Dont forget: Cisco Live sessions will be available
for viewing on-demand after the event at
CiscoLive.com/Online

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

102

Continue Your Education

Demos in the Cisco campus

Walk-in Self-Paced Labs

Lunch & Learn

Meet the Engineer 1:1 meetings

Related sessions

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

103

Continue Your Education

Attend the Breakout Session

BRKPCA-2020 Automate your Data Center Today with UCS Director

Visit the World of Solutions

Demo Booth Cisco One Enterprise Cloud Suite and UCS Director

BRKDCT-1456

2016 Cisco and/or its affiliates. All rights reserved. Cisco Public

104

Please join us for the Service Provider Innovation Talk featuring:


Yvette Kanouff | Senior Vice President and General Manager, SP Business
Joe Cozzolino | Senior Vice President, Cisco Services
Thursday, July 14th, 2016
11:30 am - 12:30 pm, In the Oceanside A room

What to expect from this innovation talk


Insights on market trends and forecasts
Preview of key technologies and capabilities
Innovative demonstrations of the latest and greatest products

Better understanding of how Cisco can help you succeed


Register to attend the session live now or
watch the broadcast on cisco.com

Thank you

Anda mungkin juga menyukai