BRKDCT-1456
Agenda
Orchestrator
Programmability
Custom Tasks
APIs
Open Automation
Conclusion
22333
cisco25
Web voting
Text voting
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
Business
Application
Requirements
Challenges:
Manual processes
IT
Planning
Add Users
and Groups
Define
Cost Models
Approvals
Rigid silos
Network Adm
Server Admins
Storage
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
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
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
VM
L4-L7
Compute
vASA,
CSR1000v
Network
Storage
Nexus
MDS
*
*
*
*
*
*
*
* Partner provided
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
Rapid deployment of
Integrated Infrastructure
Application Ready
Infrastructure
Infrastructure as a
Service (IaaS)
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
Admins
Self Service
Web Portal
Operators
Admin
Web Console
REST API
System
Integration
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
22333
cisco25
Web voting
Text voting
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
11
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
End
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
13
What is a Task
UCS Tasks
Managed Node
Building block to perform a
complex operation
Task Library
Compute, Network, Storage, L4-
Library
functionality
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
14
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
Tasks
Success
Fail
Help
Save
Workflow
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
16
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
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
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
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
Triggers
Corrective actions in response to monitoring conditions
Compound Workflow
Leverage existing workflows to build complex workflows
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
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 Orchestration
Accessing Programmatically
Adding Devices
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
27
Admins
Self Service
Web Portal
Operators
Admin
Web Console
REST API
System
Integration
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
22333
cisco25
Web voting
Text voting
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
29
Save
Upload
Import
Orchestration
Import Workflow
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
31
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.
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
32
After Importing a workflow, the Validation State will show Failed indicating
the workflow needs to be modified for this UCS Director instance.
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
33
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
35
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
37
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
38
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
40
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
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
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
46
MS-Domain-1
PSA
UCS Director
MS-Domain-2
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
47
winrm quickconfig
winrm g winrm/config
winrm set winrm/config/client
@{TrustedHosts="*"}
Configure Windows
Enable WinRS &
WinRM
Configure Firewall
Add to Workflow
Test PowerShell
Test Connection
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
48
VDC
Windows
VM
Process state
Firewall policy
Policy
Audit
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
49
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
53
importPackage(java.util);
importPackage(com.cloupia.model.cIM);
Libraries
Inventory
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);
Inputs
Javascript
Cloupia Libraries
}
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
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
55
Custom Tasks
Implementation
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]
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
57
Demo
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
59
Dry-runs/Troubleshoot
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
60
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
61
Northbound API
Northbound APIs
About
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
XML
JSON
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
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
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={}
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
Volume Name
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
74
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
75
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
76
PowerShell API
Introduction
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
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:
[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
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
VMware
Hyper-V
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
84
GUI
Reports
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
85
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
87
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
88
Open Automation
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
http://www.cisco.com/c/en/us/support/servers-unified-computing/ucs-director/productsprogramming-reference-guides-list.html
https://developer.cisco.com/site/ucs-director/sdk-downloads/
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
90
Build service catalogue to enable end user self service portal for ease
of provisioning
CI PODs
VMware vCenter
Cisco UCSM
Cisco Nexus
Benefits
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
92
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
93
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
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
95
Resources
https://communities.cisco.com/docs/DOC-56419
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
97
https://developer.cisco.com/site/ucs-director/overview/
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
98
3.Order
4.Develop
5.Validate
6.Submit
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
1. Orchestrator
IT service delivery with Workflows and Custom Tasks
2. Northbound APIs
REST and Powershell API allow integrate with IT systems
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
https://developer.cisco.com/site/ucs-director/overview/
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
101
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
102
Related sessions
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
103
Demo Booth Cisco One Enterprise Cloud Suite and UCS Director
BRKDCT-1456
2016 Cisco and/or its affiliates. All rights reserved. Cisco Public
104
Thank you