Cisco Intersight Handbook
Cisco Intersight Handbook
Cisco Intersight Handbook
A Handbook for
Intelligent Cloud
Operations
Intersight Foundations 13
Introduction 14
Intersight architecture 15
Licensing 44
Wrapping up 45
Security 47
Introduction 48
Connectivity 49
Claiming 51
Role-Based Access Control (RBAC) 54
Audit logs 58
Data security 60
Security advantages 62
Wrapping up 64
Infrastructure Operations 65
Introduction 66
Device health and monitoring 67
Intelligence feeds 74
Integrated support 88
Infrastructure configuration 94
ITSM integration 101
UCS Director integration 104
Wrapping up 111
Orchestration 279
Introduction 280
Automation and orchestration 281
Intersight orchestration 283
Wrapping up 304
Programmability 305
Introduction 306
Client SDKs 312
Acknowledgments 407
For the second path, rather than creating their own management tools,
organizations began to adopt commercial software packages that were
designed to consolidate the vendor-or domain-specific tools. Legacy tools
such as Microsoft SMS, Tivoli Management Framework, and HP OpenView
were expensive, cumbersome, and rarely fully implemented. These and
other similar tools created what was often referred to as the “wedding cake”
approach to systems management, with tool upon tool in a layered
manager-of-managers approach.
This complexity led many organizations to quickly begin adopting the public
cloud after Amazon launched the Elastic Compute Cloud (EC2) service in
2006. Over time, AWS, Google, Azure, and other public cloud providers
have built services that are vital for businesses. However, the public cloud
has not solved the operational issue; it has relocated the problem and in
many ways added complexity.
Over the past several years, the industry has seen the rise of the AI Ops
buzzword. The concept suggests that IT organizations should use assistive
technologies such as machine learning and artificial intelligence to offload
burdensome manual tasks, become more efficient, and improve uptime.
Tools using these technologies have emerged in the industry, promising
improved operations capabilities across private, public, and even hybrid
cloud environments.
Cisco identified a major gap between concept and reality concerning true
multicloud infrastructure operations, which include not just traditional
Introduction
Intersight architecture
Unlimited scalability
Every management tool requires some sort of database mechanism to
maintain a device inventory. For traditional management applications, this is
sometimes embedded with the application itself or is a link to an external
database. The external databases are sometimes small unique instances,
else the applications can sometimes utilize existing, large production
database instances. The small unique instance is fast and easy to set up but
can introduce security vulnerabilities and lead to a sprawl of databases
dispersed on many different systems for every different management
application. Alternatively, using a larger production database is more reliable
with increased security, but can be time-consuming to set up because of
organizational bureaucracy and require maintenance, upkeep, and backup
over time.
Fortunately, the public cloud has swooped in and come to the rescue.
Cloud-based applications such as Intersight are not only able to operate
without scalability limitations, but also allow applications to use different
databases catering to specific capabilities. Intersight uses several different
cloud-based databases for different purposes (time series, document
oriented, object relational, graph, and real-time analytics), each of which is
deployed as a separate, highly-scalable service. While the end user never
sees this, the effect is that it allows the organizations to scale their Intersight
instances infinitely. It does not matter if an organization has 10, 100, 10,000,
or more devices, all those devices can be operated from their single
Intersight instance.
Service architecture
The time, effort, and expertise of IT organizations are ultimately measured by
their impact on the business they support. Unfortunately, the extensive
number of tools and applications required to run most traditional
infrastructures require an inordinate amount of care-and-feeding. Highly
trained individuals spend too much time updating, patching, and maintaining
not only the vast number of management tools but also the virtual machines,
hypervisors, operating systems, and other infrastructure required to host
these platforms. Currently, it has become a best practice in many
enterprises to purchase multiple hyperconverged systems just to support
infrastructure operations themselves. It seems like madness, but entire
infrastructures within infrastructures have been created just to keep the
lights on in the data center. It is no wonder that organizations are running to
the public cloud.
It is probably apparent by now, but one of the main design goals when
building Intersight was to ease the burden and complexity of creating
infrastructure just to operate the other infrastructure. By shifting this
infrastructure to a cloud service, the necessity to maintain these systems
was also removed. It is a double-bonus for operations teams — there is no
hardware or software required, and someone else (Cisco) performs all the
care and feeding. There is nothing to install, nothing to patch, and there are
not even any version numbers. It simply just works!
Some organizations are limited in the cloud services they can consume due
to data sovereignty requirements or other regulations; Even some, mostly
governmental agencies, are mandated to maintain air-gapped infrastructure.
For these types of organizations, Intersight is still a viable option. Later in the
book, it will be discussed how to run an Intersight instance from either a
private cloud or a completely air-gapped infrastructure.
As with any cloud platform, organizations need to be able to view the status
of the services along with information related to any potential service
disruptions. For Intersight, this information is provided at:
http://status.intersight.com
http://status.intersight.com.
http://status.intersight.com
Operational intelligence
The volume of blogs, tweets, articles, and general pontification about the
transformation to a cloud-first world seems omnipresent, overwhelming, and
just flat out exhausting. Whether it is a discussion of DevOps (or the death of
DevOps), a comparison of Waterfall versus CI/CD models, or continual
predictions about Kubernetes taking over the world, these discussions have
dominated IT forums for years. To be fair, all these topics are extremely
important conversations, and several will be discussed later in this book.
However, other simultaneous transformations are happening that are not
getting near as much “podium time” but could be affecting the daily lives of
IT operators as much, or in some cases more, than these trends. One of the
most impactful, but under-discussed trends is the transformation of the
relationship between traditional vendors and their customers.
However, Intersight has turned this model on its head. From any browser or
smartphone, users can now communicate directly with the experts, and
usually have an interactive dialogue in a short amount of time. A ubiquitous
send us feedback button allows users to submit requests for things they
would like to see changed or added to the platform, or users can describe
issues they are seeing directly to the engineers working on the platform.
Each of these submissions is immediately sent to and reviewed by both
engineering and product management. In previous years, roadmaps and
feature additions were set many months or years in advance, but with the
continuous integration model used by the Intersight team, real-time
feedback from the users can be integrated into the tool within hours or days.
Consumption models
The Intersight cloud operations platform is a service that can be consumed
in multiple ways depending on a given organization’s preferences and
policies for security, data sovereignty, and convenience. While the primary
means of consumption is the traditional SaaS model in which most
configuration data and functionality are stored, maintained, and accessed
through the SaaS interface, Intersight also offers two appliance-based
options for organizations with specific needs not met with the full SaaS
model.
Software-as-a-Service (SaaS)
As noted in the Introduction, Intersight was conceived and designed as a
SaaS service from the ground up (see figure below). Locating its data lake
and core services such as role-based access control (RBAC), policy
management, license management, monitoring, analytics, etc. in the cloud
enables a broad degree of agility, flexibility, and security, making SaaS the
preferred model for the vast majority of Intersight customers. Intersight SaaS
customers are relieved of most of the management burdens that accompany
traditional software deployments on-premises, such as infrastructure
allocation and support, software monitoring and backup, upgrade and
change management, and security hardening. SaaS customers receive new
features, bug fixes, and security updates immediately as these emerge from
the agile CI/CD development pipeline. Essentially, unless an organization has
specific reasons why it cannot consume Intersight via SaaS, SaaS is the
recommended model.
• CPU usage
Note, intersight.com may collect additional data from the CVA under two
circumstances:
Regardless of the above, periodic communication between the CVA and the
Intersight cloud is required to receive new alerts, update the Hardware
Compatibility List (HCL), connect to Cisco TAC, and enable the CVA to auto-
update. When the connection to the Intersight cloud is interrupted and the
connectivity is not restored within 90 days, the device claim capability will be
lost. Intersight Appliance features including Connected TAC, Firmware
Upgrade, HyperFlex Cluster Deployment, and User Feedback that require
connectivity to Intersight cloud, may also be impacted until connectivity is
restored.
the management and upkeep burden are commensurately increased for the
administrator. That said, every effort is made to provide PVA Intersight users
with an experience that is as close to the SaaS model as possible.
Target connectivity
Intersight ingests data from and performs actions against hardware and
software components, referred to as targets, sometimes referred to as
devices. Hardware targets include infrastructures such as servers, Fabric
Interconnects (FIs), HyperFlex clusters, network switches, APIC clusters, or
other hardware endpoints. Software targets may be hypervisors, Kubernetes
clusters, cloud services, an Intersight Appliance, or other software
endpoints. This book will generally refer to these as targets.
Device Connector
For targets whose design Cisco has direct control over (such as UCS
servers, Fabric Interconnects, and HyperFlex clusters), the problem has
been solved with a lightweight, robust software module called the Device
Connector. The Device Connector code is embedded in supported Cisco
hardware at the factory and has one simple job: establish and secure a
durable websocket connection to intersight.com (see below).
Assist Service
While the hardware-embedded Device Connector is an excellent solution for
Cisco devices, the problem of connecting to non-Cisco hardware and
software on-premises remains. The solution is to take the same Device
Connector logic and, rather than try to coax third parties into embedding it in
their targets, make it available through an on-premises virtual appliance as
its own function: the Assist Service, sometimes referred to as Intersight
Assist. The Assist Service is available via the CVA, PVA, or an assist-only
appliance for SaaS users.
This Assist Service can both maintain the necessary durable, secure link to
Intersight and proxy the target-specific API calls necessary for Intersight
management. The Intersight Appliance will receive the necessary functions
from Intersight to add and manage any supported targets on-premises (see
below). These functions are delivered as microservices to the appliance and
are capable of making API calls to the desired targets.
At times, this registration process may fail and require some form of
intervention from the target administrator or network administrator. When
this happens, the Device Connector will retry periodically until the Device
Connector can connect to intersight.com.
The most common reason for a failed Device Connector registration is due
to a local network configuration issue. Many organizations maintain a
network infrastructure that prevents devices from directly connecting to
external sites. A firewall may be blocking the Device Connector, or an
HTTP/S proxy (explicit or transparent proxy) may be required to proxy the
connection to the Internet. All Device Connectors must properly resolve
svc.intersight.com and allow outbound initiated HTTPS connections on port
443. When a network proxy server is required, the target administrator will
be required to provide the necessary proxy information in the Device
Connector settings. Additional details and information are located at: https://
https://
www.intersight.com/help/getting_started#network_connectivity_requiremen
www.intersight.com/help/getting_started#network_connectivity_requiremen
ts
ts.
ts
4 Login to intersight.com
8 Select Start
9 Enter the Device ID/Claim Code (copied from the target Device
Connector in step 3)
10 Select Claim
Completion of the target claim process registers the target with the
Intersight service and assigns ownership of the target to the Intersight
account that was connected to in step 4 above.
3 Two options:
1 Choose IP/Name
6 Select Claim
- “From File”
3 Select Claim
Completion of the claim process registers the target with the Intersight
service (running on the appliance) and assigns ownership of the target to the
Intersight account registered to the appliance.
On-premises targets
As described above, access to on-premises targets that lack their Device
Connector occurs through the Assist Service within the Intersight Appliance.
The exact steps for claiming such targets will vary and are well documented
in the Intersight Help section, but the general process is to use the wizard
via the Admin → Targets → Claim a New Target button. After selecting the
desired target (for example, vCenter), the wizard will request some basic
information such as the target’s IP/hostname, and a username/password
combination for Intersight to use to communicate with the target, as well as
the desired Intersight Appliance through which the claiming process and
subsequent target management should occur.
Figure 14: Security advisory alert and affected systems via a mobile app
Finally, the same Intersight API is available for Cisco’s partners to leverage
within their solutions and integrations. As an example, the popular SaaS-
based ITSM platform ServiceNow integrates with the Intersight API via the
Intersight ITSM plugin for ServiceNow (available through the ServiceNow
store). The plugin provides Inventory Synchronization and Incident
Management:
Given Intersight’s API-first approach, the possibilities for tapping into the
power of the platform are vast. Additional examples can be found in the
Programmability chapter.
Licensing
Wrapping up
Introduction
Connectivity
Each of the nearly one million devices connected to the Intersight cloud uses
Transport Layer Security (TLS) with restricted ciphers on port 443 to
communicate with the Intersight service, using the Advanced Encryption
Standard (AES) with a 256-bit randomly generated key. This scale is a
testament to the architecture and security of the platform.
Except for public cloud SaaS targets (which Intersight speaks to directly),
communication between a claimed target and Intersight is always initiated by
the Device Connector (whether that Device Connector is embedded in the
target itself or is external to the target — i.e. the Intersight Appliance; see the
Foundations chapter for more information on the Device Connector). With
the use of these secure communication standards, firewalls need only allow
outbound HTTPS port 443 connections with no special provisions for
Intersight. This eases the configuration burden on the network team and
avoids exposing data centers to additional security risks.
The use of cryptographic tokens by the target ensures that only legitimate
devices can attempt to authenticate to Intersight, thereby protecting against
Trojan horse attacks. Additionally, Intersight’s use of a signed certificate
allows the Device Connector to validate the identity of Intersight, thereby
protecting against man-in-the-middle attacks. If the Device Connector
receives an unsigned or invalid certificate from Intersight, it will abort the
connection attempt.
User connectivity is handled with the same level of caution and security as
Intersight targets. Users can utilize a Cisco login ID with support for
multifactor authentication (MFA) when using the SaaS platform. Both SaaS
and on-premises implementations of Intersight allow SSO through SAML 2.0
and integration with the most popular identity providers (IdPs), allowing an
entity to use their preferred authentication services.
Claiming
To bring a new target into Intersight for visibility and management, it must
first be claimed. Target claiming options are described in detail in the
Foundations chapter, but for the specific case of Device Connector-
embedded hardware targets, the process begins with the Device Connector
establishing the secure connection to Intersight. However, there are some
restrictions that administrators can place on that connection:
The image below shows the creation of a role that will have multiple
privileges for the “Infra” organization, but only Read-Only privileges for the
“HX-Cloud-Native-Kit” organization.
Audit logs
Part of any good security practice is the collection and examination of audit
logs. Intersight does this yeoman’s work for IT departments. Intersight saves
information related to events (login, logout, created, modified, and deleted)
that occur on every managed object within Intersight, including user
accounts, pools, profiles, servers, clusters, and many more.
The Intersight interface can be used to browse the audit logs and search by
Event, User Email, Client Address, or Session ID as shown in the screenshot
below. A session ID is assigned to each user login session so that
administrators can locate every action performed by a user in a given
session. Audit logs can also be searched programmatically using the
Intersight API. Refer to the Programmability chapter in this book for more
information.
Audit logs are stored by Intersight using the same data protection standards
described later in this chapter. Audit log entries cannot be deleted, even by
an Intersight account administrator, which ensures a reliable record of
Intersight events.
Data security
Data collected
The Device Connector transmits the following data to Intersight:
Customers using the Connected Virtual Appliance can control whether any
of this data is transmitted to the Intersight cloud (otherwise the data is kept
locally).
The Device Connector does not collect or transmit sensitive data such as
passwords.
Data protection
Customer data is segregated by the Intersight account within the Intersight
cloud. Data segregation and per-customer encryption keys ensure that each
Intersight account can only access the data for that Intersight account. At
rest, data is encrypted with block storage or volume encryption. While in
transit, data is encrypted with TLS 1.2 and higher with restricted ciphers and
HTTPS on the standard HTTPS port 443.
Third parties are never given access to the data stored in the Intersight
cloud.
Certifications
The ISO/IEC 27001 standard specifies an Information Security Management
System (ISMS) that identifies stakeholders, controls, and methods for
continuous improvement for information security. Intersight has achieved ISO
27001:2013, which defines how Intersight perpetually manages the
implementation, monitoring, maintenance, and continuous improvement of
security within Intersight. Certification is performed by an independent third-
party accredited certification body with additional annual audits to ensure
continued compliance.
Security advantages
The Cisco Product Security Incident Response Team (PSIRT) is tasked with
detecting and publishing any potential security vulnerabilities that affect
Cisco products. Intersight curates those reports and pushes the relevant
ones as security advisories (this feature requires a license). Organizations
can read the publicly available reports, but Intersight provides alerts for only
the advisories that affect an organization (and details for remediation) based
on the devices in their account and the software and firmware versions
installed on those devices. Many organizations do not have the time or
personnel to correlate these reports manually. Intersight gives them only the
information they need, when they need it.
Wrapping up
Introduction
The following table maps Intersight alarm severity to UCS faults and
HyperFlex alarms.
Detail regarding all UCS and HyperFlex faults can be found at:
• UCS: http://cs.co/UCSFaultCatalog
http://cs.co/UCSFaultCatalog
• HyperFlex: http://cs.co/HyperFlexAlarmCatalog
http://cs.co/HyperFlexAlarmCatalog
Alarm types
Intersight offers multiple alarm types:
Warning alarms — indicate target issues that have the potential to affect
service. These may include sensor readings beyond an acceptable
threshold, notification of the power state of a spare device, etc. Warning
alarms may have no significant or immediate impact on the target, but action
should be taken to diagnose and correct the problem to ensure the issue
does not become more severe.
Informational alarms — provide details that are important, but not directly
impactful to the operations.
Cleared alarms — have been acted upon already (or resolved on their own)
and are listed for historical reference.
Alarm states
Intersight alarms exist in an Active state by default but can be changed to an
Acknowledged state by a user (see below under Viewing and reacting to
alarms). Acknowledging an alarm does not change the status of the issue at
the target or the severity status of the alarm; the condition will still be
present. Instead, acknowledgment of an alarm only mutes the alarm within
Intersight.
By clicking on the bell (All active alarms), the red (Critical active alarms), or
yellow (Warning active alarms) icons, a summary of the corresponding active
alarms will be generated in a slide-out “drawer” on the right-hand side of
the Intersight portal interface. This summary will display the alarm severity,
alarm code, and date/time the alarm was triggered. Users can acknowledge
an individual alarm directly from this drawer by hovering over the alarm and
selecting the “mute” icon (a bell with a line through it — see figure below).
Additional alarm detail, such as the alarm fault code, source name/type,
component from which the issue originated, and a description, are all
displayable by selecting the specific alarm, which brings the user to the
alarms inventory screen (pre-filtered in the Search field to the desired
alarm). The alarms inventory can also be reached by clicking on “View All” at
the bottom of the alarm drawer, which will pre-filter the inventory
corresponding to All, Critical, or Warning alarms based on the status
selected in the drawer (see below).
From this alarm inventory screen, users can select all Active or
Acknowledged alarms via the tabs at the top and can multi-select alarms to
change their states en masse.
Intelligence feeds
One of the key value-adds of Intersight is the ability to marry insight (or
intelligence) with guidance, and even action. As the industry has evolved,
awareness has as well. Server teams are inundated with information
describing issues that may or may not affect them. If they are affected, then
the next question is, where are they affected? This line of questioning
continues to, what can they do to remediate? Eventually ending with, are we
still affected?
• Firmware version
• Adapter model(s)
• Adapter driver version(s)
Intersight also offers a historical record of HCL validation data for long-term
status reporting. This capability is supported for target servers running
firmware release 4.0(1) and later.
To view the HCL status for a specific server, navigate to the server detail
view at Operate → Servers → servername. From the server detail view, select
the HCL tab at the top of the page to display the detailed HCL information
for the specific server. See the figure below for an example showing where
to find the HCL tab.
Figure 6: Launch HCL detail information from the server detail view
When selecting the HCL tab from a specific server’s detail page, the HCL
Status detail will be displayed as shown in the figure below. In the example
figure below, an Adapter Compliance issue is found in the 3rd phase of the
HCL Validation status check. Expanding the Adapter Compliance section
provides the adapter detail and the Software Status showing Incompatible
Firmware and Driver.
Figure 7: HCL Validation for device indicating “Not Listed” HCL Status
To resolve the incompatible adapter driver issue for the server shown in the
figure above, the administrator for this device has the option of following the
Intersight-recommended path to remediation. In this case, the HCL status of
Not Listed can be resolved by installing the correct adapter drivers and
upgrading the adapter firmware.
From the Get Recommended Drivers pop-up, the administrator can choose
Download Driver ISO by following the link under Recommended Drivers (see
above) redirecting the administrator to the exact location at cisco.com to
download the ISO containing the HCL-recommended drivers.
• Cisco UCS Tools — A host utility vSphere Installation Bundle (VIB) for
gathering OS version and driver information. UCS Tools is available
for download on https://software.cisco.com
https://software.cisco.com and it is also packaged
in the Cisco ESXi OEM images available from VMware. Cisco custom
images do not require an additional tool or script to obtain the
required OS and driver information.
• OS Discovery Tool — An OS-level tool for non-Cisco-customized
ESXi installations, supported Windows, or supported Linux platforms.
For the full list of supported operating systems visit:
https://intersight.com/help/resources/os_discovery_tool
https://intersight.com/help/resources/os_discovery_tool
Advisories
Intersight Advisories warn operators that a specific condition is affecting at
least one Intersight-managed device within that organization. Advisories are
intended to alert an operator to exactly which devices are affected by the
advisory, provide detailed information about the advisory, and then guide
operators towards remediation. This comprehensive list of affected devices
is sometimes referred to as the “blast radius” of impacted systems.
Advisory Types
At the time of publication, Intersight currently supports two types of
advisories: Field Notices and Security Advisories.
When selecting the advisory indicator (megaphone) in the top menu bar, a
summary list of the advisories is displayed in a slide-out drawer. See the
example below showing one Field Notice and three Security Advisories.
Selecting a given Field Notice will display the details of that Field Notice (see
the figure below).
• After a new target is claimed, it may take a few hours for any
advisories to be correlated to the new target
• Advisories that affect specific targets are created or deleted every 6
hours
Integrated support
Targets that are managed by Intersight have access to Cisco support, which
is known as the Technical Assistance Center (TAC). In the event of a system
issue, this allows for seamless troubleshooting and often a hands-free
resolution. These integrated support capabilities range from simple tasks
such as viewing the contract and warranty status of a system to advanced,
analytics-based operations such as proactively replacing parts based on
automated pre-failure notifications.
Intersight is directly linked to the Cisco Support Case Manager (SCM) tool
so when a case is opened from Intersight, SCM is automatically launched
and pre-populated with the device name and serial number. If the user has
not already verified support coverage for the device, SCM will automatically
perform a check for the current contract and/or warranty coverage of the
system(s). Specific customer entitlement information such as contract
number does not need to be manually entered or maintained in Intersight.
Requirements
The integration with Cisco TAC, along with Proactive Support capabilities, is
available to all Intersight users. No additional licensing or fees are required
to utilize these capabilities, and the features are available across any type of
target in Intersight.
For security reasons, the only person able to generate support files directly
from Intersight is the Cisco support engineer who is assigned to the case.
That individual is only able to generate log files for the duration of their
activity on the case. When the case is closed or a different engineer is
assigned, the original engineer will no longer be able to retrieve support
files.
The individual support files are generated locally at each target, are
encrypted when transferred through Intersight to the support organization,
and encrypted at rest. After the files have been collected, Cisco will retain
them for 90 days after the case has been closed.
Proactive Support
Cases are typically opened and the RMA is created within one hour after the
fault occurs. This includes all the time needed to generate the appropriate
diagnostic data.
• Any entitled user can take ownership of the RMA and fill out the
required details
Infrastructure configuration
Software repository
Intersight provides a software repository for equipping Intersight-driven
actions with the necessary software components required updating
firmware, installing operating systems, updating drivers, and other tasks.
Configuration of each source will require a fully qualified path to the file
location. Additionally, other details such as: mount options, username, and a
Intersight requests
The progress and completion status of every user-initiated action can be
viewed within Intersight in the Requests pane. This view can be accessed
from the top title bar in the Intersight UI. The screenshot below shows that
actions can be filtered by active (in progress) actions and completed
actions. Most actions that are in progress can be expanded to display a
detailed progress bar. This screenshot shows an action in progress that is
paused waiting for an acknowledgment from an administrator.
Tagging
As a cloud operations platform, Intersight manages, maintains, and
inventories a vast array of objects (e.g. devices, profiles, policies, pools,
etc.) in an organization. The raw number of objects being selected or
displayed can be significant and potentially unwieldy, particularly for large
organizations. For example, selecting Operate → Servers will display every
claimed server in an organization, which can run into the many thousands.
Fortunately, Intersight has a mechanism to mark the objects with tags,
allowing the user to filter selection criteria down to a more manageable
scope.
All tags will be validated as they are entered in the tag management
interface.
To apply search criteria using tags, simply add a given tag to the
Search field. The result will only return objects common to that tag (or tags if
more than one are specified). See below for an example search using the
Organizations: Infra tag.
The format of a tag is always key: value (note the necessary single space
after the colon) and the combination of keys and values must be unique
across all the tags in use.
For example, these are all valid tags for a single object:
• Domain: Infrastructure
• Location: StPaul
• Role: Infrastructure
• Dept: IT
Note that in the above list, all the keys are unique and one of the values,
Infrastructure, is used more than once.
Exporting of data
Intersight is a phenomenal resource to gather and view a complete inventory
of your infrastructure, however, at times it is necessary to have the detailed
inventory information in a different tool such as Microsoft Excel. Fortunately,
it is extremely easy to export this information in a CSV format.
Once the Export option is selected, a CSV file containing all the information
in the Intersight table will be downloaded through the browser.
ITSM integration
By utilizing the plugin, users can receive automatic inventory collection and
updates from Intersight to ServiceNow's Change Management Database
(CMDB). Once the inventory from Intersight is imported, users can then track
the hardware infrastructure along with existing components in ServiceNow.
This facilitates incident management including the ability to send emails or
raise other notifications from ServiceNow as alarms are automatically
imported from Intersight.
Currently, the plugin does not support the service graph connector, and it
does not pull in contract information. The ITSM plugin can be downloaded
directly from ServiceNow. The installation guide and additional
documentation are located at: http://cs.co/9001HbU6d
http://cs.co/9001HbU6d
While Cisco UCS Director remains a strategic platform for private cloud IaaS,
Cisco is creating a path forward to the transition to Intersight in the future.
This evolution will take time to implement, but Cisco has started the process
by introducing a UCS Director connector to Intersight.
• Instance summary
From the Admin → UCS Director menu on the left-hand side of the Intersight
user interface, two new tabs are available with specific information on the
UCS Director integration. The Instances tab displays a table view of the UCS
Director instances that have been claimed in Intersight. The Backups tab
displays the list of backup images that have been created for the UCS
Director instances and allows for report generation.
In the Instances table, specific actions can be initiated for a UCS Director
instance such as:
• Creating a backup
• Restoring from a backup
• Performing an update
• Cross-launching the UCS Director interface
Figure 24: View instance and launch UCS Director from Intersight
This view also makes it possible to see all the workflows that are or have
been executed on the UCS Director instance including any rollbacks that
The UCS Director integration with Intersight can also assist with
troubleshooting and issue resolution. With permission from the organization,
Cisco TAC can pull log files directly from the UCS Director system which
eliminates multiple back-and-forth emails and calls. Not only is the support
process simplified, but a faster resolution is seen in most cases.
Wrapping up
Introduction
Historically, when new tools and platforms are introduced, they force a shift
to a new operational model, which can bring complexity and lead to
disruptions in business continuity. Intersight has taken a different approach
to this dilemma. No matter if a UCS server is deployed in standalone mode,
Fabric Interconnect-attached mode (UCS Manager), or in the new Intersight
Managed Mode (IMM), all the day-to-day operations of the server can be
performed from Intersight. It is often referred to as the front door for UCS
server operations, providing a single entry point for control and configuration
for all UCS server types and generations.
Supported systems
Intersight is the operations platform for both the current generation Cisco
UCS and HyperFlex servers as well as for generations to come. As
discussed in the Foundations chapter, the target server requires a
connection mechanism and an API. The requirement for these components
drives the minimum baseline server model and embedded
software/firmware supportable by Intersight.
Actions
In the General tab of the server’s details page, basic inventory and
health information are displayed on the left-hand-side and bottom of the
page, and events affecting the server are shown on the right-hand side. The
events are further categorized as Alarms, Requests, and Advisories. See the
Infrastructure Operations chapter for more detail on each of these.
Figure 2: Single server actions for standalone (left) server and an FI-connected blade (right)
Not all actions shown above are possible against all servers. As noted
previously, this will depend on the type of server, but also on the user’s
permissions and the license tier of that server. For example, for a given
server, the Server Administrator role will be able to perform all operations
allowed by the server license level including power management, firmware
upgrade, and operating system installation. Server Administrators also can
cross launch element managers (such as UCS Manager or Cisco Integrated
Management Controller). The Read-Only role will not be able to perform
The actions shown in the drop-down menu above are all actions that will be
performed within the context of the current server.
After target servers have been selected, the bulk Action can be triggered by
clicking the bulk server action icon, as shown by the ellipsis (...) in the
screenshot below:
Figure 4: Bulk server actions for standalone servers and FI-connected blades
The actions in the single server actions and bulk server actions lists have
some overlap. Additionally, not every action is available for every target type.
For example, a firmware upgrade cannot be applied to a server that is a
node in a HyperFlex Cluster. Instead, HyperFlex clusters are upgraded as a
cluster unit from either the Operate → HyperFlex Clusters table view or the
Operate → HyperFlex Clusters→ cluster-name Action drop-down.
Hard Reset
The Hard Reset is complementary to the power-related Power Cycle action
but invokes a more graceful behavior. It mimics the behavior of physically
depressing a device’s power button momentarily. It provides a reset signal
to the server to attempt a graceful reset.
• Target server
• Operating system image
Most vKVM solutions require that the administrator has access to the
network on which the server management interface resides. This is typically
achieved by using VPN software managed by an organization and placed on
the operator’s client device (see diagram below, left).
Server deployment
Policies
Configurations for servers are created and maintained as policies in
Intersight and include items such as BIOS settings, disk group creation,
Simple Mail Transfer Protocol (SMTP), Intelligent Platform Management
Interface (IPMI) settings.
Intersight has unique policy types for servers, blade chassis, UCS Domains,
and HyperFlex clusters. In some cases, policies can be shared between
different target types. For example, an NTP policy can be used by both
servers and UCS Domains.
Pools
In Intersight, pools are used for consumable resources or identifiers such as
management addresses, WWNs, and MAC addresses that are unique for
each server. Pools are preconfigured ranges of these addresses which are
consumed when attached to a Server Profile. The image below shows a
small MAC address pool.
Profiles
Intersight Server Profiles are composed of a group of policies and are used
to define the desired configuration and map that configuration to a target
server. The Assign Server Profile action triggers the automated execution of
configuring the server to match the settings defined within the Server Profile.
Much like policies, there are unique profile types for servers, chassis, UCS
Domains, and HyperFlex Clusters. In this chapter, Server Profiles for both
rack and blade servers will be covered. The other profile types will be
covered in other chapters.
Profile states
Because profiles do not have to be assigned to servers, nor are servers
always guaranteed to match the config state of the assigned profile, profiles
can be in one of several different states at a given point in time.
Not Deployed The pro le has been assigned to a server but not deployed
The pro le has been deployed successfully to the server and the server
OK
con guration matches the policies de ned in the pro le
Not Deployed The current pro le and its referenced policies are di erent from the last
Changes deployed policy con guration
This indicates that the policy con guration at the server is not in sync
with the last deployed policy con guration in the pro le. If the server
Out of Sync settings are altered manually after a pro le is deployed, Intersight
automatically detects the con guration changes and they will be shown
on the Server Pro le as Out of Sync
The most interesting of these Server Profile states has to do with the
situation when a Server Profile is assigned to a server and the server’s
configuration differs from the profile, known as configuration drift.
Out of Sync — The actual configuration of the server has changed at the
server and it no longer matches the configuration that was assigned to the
server by the Intersight Server Profile. The administrator can select the
Server Profile in Intersight and select Deploy to overwrite configuration
changes made locally at the server.
Standalone servers
Server Profiles for UCS rack servers can either be created natively in
Intersight or imported from the IMC of existing UCS rack servers that have
been configured locally.
Any Server Profile can be cloned, regardless of how it was initially created.
Administrators can create Server Profiles and leave them unassigned. This
allows administrators to perform all the configurations for new servers
before even physically installing them. The profiles can be deployed to the
servers later.
FI-attached servers
Servers deployed within an Intersight-managed compute domain are
operating in Intersight Managed Mode or IMM (discussed at length in the
next section) and are not deployable as standalone systems, thus the profile
and policy import capabilities described previously are not applicable.
The creation of an FI-attached Server Profile has all the same prerequisites
as the creation of a previously discussed standalone Server Profile. Similarly,
these profiles can also be cloned and reference reusable policy for
configuration.
Domain management
• Device inventory
• HCL compliance
• Open TAC case
• Proactive RMA
• License operations
• Launch UCS Manager
IMM is enabled during the initial setup of a pair of FIs and includes not only
the switching devices but also all of the attached server infrastructure. The
configuration of all this infrastructure is defined by a policy that is managed
by Intersight directly. The following sections provide more details on this
modern operational mode as well as how organizations can benefit from
Intersight’s operational capabilities for both traditional UCSM and IMM
domains.
For organizations with multiple IMM compute domains, policies and pools
become easier to consume and can be shared globally. The risk of
identifiers, such as MAC addresses or fibre channel WWNs, overlapping
The first step to getting started with IMM-compatible systems is to place the
Fabric Interconnects into Intersight Managed Mode. A new FI will present the
administrator with three questions (when connected to the FI serial port). A
previously configured FI must have its configuration erased first. Beginning
with the primary FI, the questions and appropriate answers to enable
Intersight Managed Mode are shown in the image below:
The FI will then guide the administrator through a basic networking setup for
the primary FI. Configuring the secondary FI is even easier as it can retrieve
most of its settings from the primary. When connected to the secondary FI
serial port, the administrator will answer the questions shown in the figure
below and then provide an IP address for the secondary FI.
Once the initial configuration has been applied to the Fabric Interconnects,
they can be claimed into Intersight. This experience is nearly identical to the
process of claiming a standalone rackmount server in Intersight. For the
Fabric Interconnects, however, the administrator must connect via a web
browser to the IP address of either FI to access the Device Console. The
Device Console is a simple UI that presents a Device Connector screen for
claiming the FI pair into Intersight.
Fabric Interconnects are Intersight targets that use the Device Connector
discussed extensively in the Foundations and Security chapters of this book.
The image shown below will look familiar to anyone who has claimed other
Cisco targets into Intersight. In IMM, the Device Connector in the Fabric
Interconnects is responsible for maintaining connectivity to Intersight for all
devices attached to the Fabric Interconnects such as chassis, IO Modules,
and blade servers.
Using the Device ID and Claim Code from the Device Connector, the
administrator can initiate the claim process from Intersight by browsing to
Admin → Targets and selecting Claim a New Target. For IMM, the target type
is Cisco UCS Domain (Intersight Managed) as shown in the figure below:
Once the UCS Domain has been claimed, it may take several minutes or
longer (depending on the number of devices in the new domain) for
Intersight to discover all the chassis, blades, and other devices connected.
Pools, policies, and profiles for the devices in the newly claimed domain can
be created at any time, even before the domain is claimed.
Device Console
As previously mentioned, the Device Console is a UI that is accessed by
browsing to the IP address of the primary or secondary Fabric Interconnect
operating in Intersight Managed Mode. The Device Console provides some
basic system health information, but it has two primary purposes:
Ideally, administrators should not need to access the Device Console after
the initial device claiming is complete.
Chassis Profiles
Each chassis in an Intersight Managed Mode domain is configured by a
Chassis Profile.
• The IMC Access policy selects the IP Pool and VLAN to be used for
assigning IP addresses to the IMC of each installed blade. The IP Pool
can be previously defined or created inline.
• The SNMP policy defines the SNMP settings and trap destinations to
be used for alerts.
Note that while both policies are technically optional, a blade cannot be
managed without an IP address for its IMC (integrated management
controller). For this reason, the IMC Access policy with a valid IP Pool is
effectively required.
Firmware updates
When the need arises to update the firmware on servers, Intersight also
simplifies that process. Depending on the server type, blade server, or rack
server, Intersight has an optimized firmware update option. For the sake of
simplicity, this section will use “blade server” to refer to any servers that are
connected to the Fabric Interconnects. (In the UCS architecture, all blade
servers are connected to the Fabric Interconnects, but it is also possible to
connect rack servers to the Fabric Interconnects.)
To download the firmware directly from Cisco, the Utility Storage option in
the server needs to be utilized. As shown in the figure below, the
administrator must select Cisco Repository rather than Software Repository
to see a complete listing of firmware available from cisco.com. Once the
correct version is selected and the update process is initiated, the firmware
download to the Utility Storage begins immediately. The installation will start
on the first boot after the download has been completed.
Once the update process is initiated from Intersight, the selected firmware
image is downloaded to the Fabric Interconnect that the server is attached
to and a check is run locally to determine if the server will require a reboot.
When the update process for FIs is initiated from Intersight, the selected
firmware bundle will be automatically downloaded from intersight.com,
which eliminates the need for an operator to login to cisco.com, manually
select one or more firmware bundles, download the bundles to a local
machine, and then individually upload those bundles to the appropriate FIs.
This streamlined, intelligent process not only provides a quicker, more
efficient upgrade approach for a single UCS blade server domain but also
ensures that the process is consistently executed across multiple blade
server domains.
Wrapping up
Introduction
Policy-driven network
infrastructure
Domain Policies and Domain Profiles are the building blocks within Intersight
for defining the configuration needs of a compute domain’s network. These
enable administrators to take advantage of pre-built policies created and
vetted by network personnel ensuring compliance while streamlining the
entire deployment process.
Domain Policies
As discussed in the Intersight Managed Mode section of the previous
chapter, Intersight can configure both the servers and the Fabric
Interconnect switches that serve as the network infrastructure for the
servers.
UCS Domains are a logical representation of the compute fabric and contain
many different types of policies used to represent different reusable portions
of configuration. Examples of such policies include BIOS settings, boot
order, RAID configuration, firmware, QoS, VLAN trunking, MTU, etc.
Some examples of policies that are usable across both a Server as well as a
Domain Profile include:
• Network Connectivity
• NTP
• SNMP
• Syslog
Domain Profiles
Since Intersight Managed Mode (IMM) supports both server and domain
infrastructure (amongst others), multiple types of profiles are supported. A
profile specific to a UCS Domain infrastructure is referred to as a Domain
Profile and defines the network configuration policies for a given domain.
This profile consists of one or more Domain Policies that define the desired
domain network configuration settings.
• Port configurations:
• Unified port selection (FCoE, Ethernet)
• Port role (traditional, port-channel, vPC)
• VLAN/VSAN configuration
• NTP service
• Network connectivity (DNS, IPv6)
• QoS
The use of Domain Profiles offers an easy and consistent method to simplify
the network configuration for servers across domains. Since most
The UCS Domain Profile consists of policies that can either be defined in
advance or created inline while building a new profile. The policies that
make up a UCS Domain Profile are defined as follows:
• The VLAN policy defines the name and VLAN ID of each VLAN that
will exist within the domain. Each VLAN can be assigned a different
Multicast Policy.
• The VSAN policy defines the name, VSAN ID, and FCoE VLAN ID of
each VSAN that will exist within the domain
• The Port Configuration profile defines the role (Ethernet uplink, FC
uplink, server port or unconfigured) and type (Ethernet or FC) of each
FI port. Fabric Interconnect A and B can have a different port profile.
• The NTP policy defines the IP address of one or more NTP servers
A single Domain Profile may be used to configure all the uplink and downlink
ports, provision all required VLANs and VSANS, and configure other
networking settings such as NTP, DNS Domain, QoS, Multicast Policy using
reusable policies.
The figure below shows one of the three tabs of a Domain Profile applied to
a Fabric Interconnect pair. Three previously defined policies are shown,
which ensure consistent network connectivity. This figure also expands the
details of one of those policies (the NTP policy).
To apply the configuration for the domain, simply deploy the Domain Profile
to the desired Fabric Interconnects for the domain. Administrators looking to
standardize the network infrastructure for the servers will realize huge time
savings by employing thoughtfully designed profiles.
Nexus Dashboard
The Cisco Nexus Dashboard brings together real-time insights and
automation services to operate multicloud data center networks and
integrates with the Intersight cloud operating platform for a consistent and
holistic view of all infrastructure components including network, storage,
compute, virtualization, containers, and Kubernetes.
Nexus Dashboard works together with Intersight and provides a unified view
into proactive operations with continuous assurance and actionable insights
across data center fabrics for seamless management.
On the General tab, the Details table displays information about the platform
such as name, status, device type, device IP, firmware version, nodes, and
organization. On the Inventory tab, a summary view and detailed information
of the controllers, spine switches, leaf switches, licenses, and features
associated with the platform in the network is displayed.
Wrapping up
Introduction
Storage may not always be the first thought that comes to mind when
hearing the term Cloud Operations, but storage is a critical component of the
overall infrastructure. Application user experience can be drastically
influenced by the availability and performance of the storage systems
needed to persist and retrieve data. A common challenge that storage
administrators face is how to manage a very heterogeneous set of
infrastructures. Storage is often provisioned on a need or project basis and
can therefore take on many different forms, such as hyperconverged,
traditional block and file, or object-based.
Hyperconvergence
Hyperconverged infrastructure has been a mainstream technology since at
least 2017 and changes the traditional server/storage infrastructure stack
considerably. In HCI, the traditional storage array is eliminated and the
storage itself is collapsed into the server tier as direct-attached storage. An
intelligent storage software layer then clusters those server nodes into a
pool of shared storage and compute, hosting both the application workloads
(typically virtual machines) and the storage they require.
HyperFlex
Solution architecture
The data platform spans three or more Cisco HX nodes to create a highly
available cluster as shown in the figure below:
The data platform controller interfaces with the hypervisor in two ways:
• IOVisor — The data platform controller intercepts all I/O requests and
routes requests to the nodes responsible for storing or retrieving the
blocks. The IOVisor presents a file system or device interface to the
hypervisor and makes the existence of the hyperconvergence layer
transparent.
• Advanced Feature Integration (VAAI) — A module uses the
hypervisor APIs to support advanced storage system operations such
as snapshots and cloning. These are accessed through the
hypervisor so that the hyperconvergence layer appears just as an
enterprise shared storage does.
Data distribution
Effective data distribution is achieved by mapping incoming data to stripe
units that are stored evenly across all nodes, with the number of data
replicas determined by the user-defined policies. When an application writes
data, the data is sent to the appropriate node based on the stripe unit, which
includes the relevant block of information.
Data optimization
HyperFlex makes use of several different techniques to achieve inline data
optimization that improves the overall performance and efficiency of the
platform. Finely detailed inline deduplication and variable block inline
compression is always on for objects in the cache (SSD or NVMe and
memory) and capacity (SSD, NVMe, or HDD) layers. Unlike other solutions,
which require turning off these features to maintain performance, the
deduplication and compression capabilities in the HX Data Platform are
designed to sustain and enhance performance and significantly reduce
physical storage capacity requirements.
Independent scaling
The most common node type within a HyperFlex Cluster is referred to as a
converged node since it contributes storage, compute, and memory to the
cluster. This converged node architecture was described in the earlier
Solution architecture section. If an organization needs more compute power
or GPU acceleration independent of storage capacity, additional compute-
only or GPU-only nodes can be seamlessly added, providing the desired
additional resource capacity without the overhead of unneeded storage.
Replication
Through the local HX Connect interface or Intersight, replication policies can
be created that specify the repair point objective (RPO). Virtual machines are
added to protection groups that inherit the policies defined by the user.
Native replication can be used for planned data movement (for example,
migrating applications between locations) or unplanned events such as data
center failures.
The data platform coordinates the movement of data, and all nodes
participate in the data movement using a many-to-many connectivity model.
This model distributes the workload across all nodes, avoiding hot spots,
and minimizing performance impacts. (http://cs.co/9004Hjr7A
http://cs.co/9004Hjr7A)
http://cs.co/9004Hjr7A
Stretched cluster
HX offers the option of stretched clusters in which two identical
configurations in two locations can act as a single cluster. With synchronous
writes between sites, a complete data center failure can occur while still
maintaining full availability to applications with zero data loss. The recovery
time objective (RTO) is only the time that it takes to recognize the failure and
put a failover into effect.
HyperFlex Connect works well for a single, non-edge HX Cluster but was not
built to support multiple, distributed HX Clusters. Intersight however, was
built for exactly this purpose and offers some unique benefits related to HX
that will be covered in this section.
Fault tolerance and file system consistency become more challenging when
only two nodes are deployed at a remote office/branch office (ROBO)
location. In this scenario, if one of the two nodes fails, a quorum can no
longer be established using a node majority algorithm alone. In the unlikely
event that the communication pathway between the two nodes is disrupted,
a split-brain condition may occur if both nodes continue to process data
without obtaining a quorum. The opposite outcome, the loss of availability, is
also possible. Both scenarios must be avoided to help prevent the
introduction of data inconsistency while also maintaining high availability.
The Invisible Cloud Witness does not require any configuration input.
Instead, all components are configured transparently during the HX Edge
cluster installation. Before the installation process begins, the physical
servers must be securely claimed in Intersight. From that point forward, the
Invisible Cloud Witness is automatically deployed and configured.
HX policies
A policy is a reusable group of settings that can be applied to a server,
domain, chassis, or cluster. Policies ensure consistency within the data
center. For example, a single DNS, NTP, and Timezone policy can be
created and applied to every HyperFlex Cluster within a single data center.
This limits the number of times the same data needs to be entered to ensure
consistency.
The HyperFlex Cluster Profile contains all the best practices typically found
within a Cisco Validated Design (CVD) but is completely orchestrated by
Intersight. All that is required are a few unique identifiers (e.g., IP address,
MAC address) entered in a wizard-driven web form.
Post-deployment configuration
Most post-deployment tasks such as cluster expansion, full-stack cluster
upgrades (server firmware, hypervisor and drivers, and HX Data Platform),
replication configuration, and backup and recovery, can all be centrally
managed with Intersight. Since everything within Intersight is policy-driven, it
is simple to reuse policies or clone profiles to keep configuration consistent
across the unlimited scale of HX Clusters.
At the writing of this book, there are a few operations that still require going
into HyperFlex Connect directly, such as creating datastores and expanding
the cluster. Intersight simplifies this by allowing a search through all HX
Visibility
The ongoing performance and capacity monitoring are essential for any
viable storage solution. Intersight has built-in monitoring widgets so end
users can easily view current storage capacity, forecast capacity runways,
performance, and overall cluster health as shown in the screenshot below:
Pre-installation
A full pre-installation checklist is available at cisco.com. The checklist items
fall into the following categories:
Installation
To begin the installation, the administrator logs into Intersight and claims all
the targets (servers and Fabric Interconnects if applicable) to be used for
this HX installation. The installation involves stepping through a wizard to
create and deploy an HX Cluster Profile. This wizard is started by clicking the
Create HyperFlex Cluster Profile button at the top right of the profile
configuration screen (on the HyperFlex Cluster Profiles tab) as shown below:
Step 1 — General
The first step of the process is to specify the Name and select the
Organization for the new HX Cluster as well as the Data Platform Version and
Server Firmware Version. As the versions of the server firmware and the
HyperFlex Data Platform are interdependent, the installer will not allow the
selection of incompatible versions.
The first step also includes a link to the detailed installation instructions.
each section. For example, the same DNS, NTP, and Timezone policy could
be used for multiple HX Clusters in the same data center, saving the
administrator configuration time and reducing the potential for errors.
Step 5 — Summary
The fifth step is a summary and final validation step. The following figure
shows that configuration errors are flagged by Intersight and the installation
process cannot proceed until these errors are addressed. These are simple
but thorough validations that ensure that VLANs are not duplicated, DNS
names are in the right format, MAC addresses are in the right range, and
more.
Once these errors are cleared, the administrator can click either Validate or
Validate & Deploy to move to the next step.
Step 6 — Results
The sixth and final step performs a validation of the physical environment.
The previous steps perform basic yet thorough data validation, but this step
will perform physical validations. It verifies that the hypervisors are
reachable, all DNS names resolve properly, VLANs exist on the Fabric
Interconnect, and more.
Once all issues are addressed and there are no errors on the validation step,
the administrator can deploy the profile to the HyperFlex hardware. Intersight
will update server firmware if necessary, configure Fabric Interconnect
VLANs if applicable, configure hypervisor virtual switches, install storage
controller VMs, and more.
Post-installation
When the HyperFlex Cluster Profile has been successfully deployed, the
administrator should verify that the cluster appears within the chosen
hypervisor manager. Any additional recommended post-installation steps
are documented here:
https://intersight.com/help/resources#cisco_hyperflex_cluster_deployment
https://intersight.com/help/resources#cisco_hyperflex_cluster_deployment
The administrator can now use HyperFlex Connect to create datastores for
use within the hypervisor. HyperFlex can present different sized datastores
to the hypervisor. To create datastores, an administrator can cross-launch
into HyperFlex Connect from within Intersight. From the Intersight screen for
Operating HyperFlex Clusters (Operate → HyperFlex Clusters), administrators
can click the ellipsis in the row for the chosen cluster and select Launch
HyperFlex Connect as shown below:
Managing HX Clusters
Actions
From the Operate → HyperFlex Clusters main inventory screen, various
cluster-level actions are available by clicking on the cluster’s ellipsis on the
right (see below).
From the pop-up menu, administrators can launch the HyperFlex Connect
management utility or launch a cluster upgrade (both of which are described
earlier in this chapter) as well as run a Health Check or configure a backup of
the cluster as described below.
Administrators can select all health check types by default or customize the
process to focus on specific checks (see below).
Results of the health check are available from the Health Check tab of
the cluster details screen (Operate → HyperFlex Clusters then select the
desired cluster).
Monitoring
As shown previously in Figure 23, the main HX Cluster inventory screen
provides a graphical view of the health, capacity, and utilization status
summary of all clusters at the top, as well as a status breakdown by cluster
beneath it. By clicking on a specific cluster, administrators can expose
greater cluster-specific detail including version, individual node status, and
open alarms as shown below:
Within the cluster details page, additional tabs are available for: Profile,
Capacity Runway, Performance, and Health Check. The Profile tab
displays detailed information about current cluster policies, backups, etc.
(see below).
The Performance tab (see below) highlights the historical IOPs, throughput,
and latency metrics for the cluster at user-configurable intervals (last day,
week, month, etc.).
Under the Health Check tab (see below), after having run an HX Cluster
Health Check from the Actions menu as indicated above, the output of the
Health Check can be viewed to remediate any failures.
Of note, in the cluster details page is the Capacity Runway tab (see below).
This latest feature uses historical data from the previous 6 months to
calculate daily consumption trends in the cluster and provide a predicted
time to exceed the 75th capacity percentile. Intersight will also raise various
alarms in advance of a predicted strain on capacity.
In the first step, the administrator selects the desired Upgrade Bundle. The
administrator does not have to download that software bundle; it is provided
by Intersight. As shown below, the full stack upgrade can be configured to
upgrade the hypervisor as well. It is recommended to perform the hypervisor
upgrade during this process if possible.
The next screen simply shows the results of the validations. The image
below shows that all validations passed and the cluster meets upgrade
requirements. These validations help minimize the chances of encountering
an error during the upgrade process.
The last screen prompts for confirmation of the start of the upgrade. Virtual
machines will have to be evacuated from each host as each host is
upgraded. Depending on the hypervisor configuration, virtual machine
evacuation may occur automatically. See the image below for more details
related to virtual machine evacuation.
The HyperFlex Edge installation will run in the background. The status of the
upgrade can be monitored by selecting the Requests icon (the spinning blue
icon at the top of the Intersight title bar) and then selecting the upgrade
process. The following image shows the status of a HyperFlex Edge
installation in progress.
The ability to claim external storage targets and the capabilities available
to those targets are subject to Intersight account licensing.
Wrapping up
Introduction
The claiming process starts like any other target claim, by navigating to
Admin → Targets and selecting Claim a New Target as shown below:
The target type, in this case, would be VMware vCenter under the
Hypervisor category.
Contextual operations
Once the vCenter target is claimed, a new Virtualization option will appear in
the Operate side navigation menu. If Workload Optimizer has been
appropriately licensed, the vCenter target’s resources will also be
automatically stitched into the Supply Chain (see the Workload Optimizer
chapter for more details). Navigating to Operate → Virtualization will show
the inventory visibility that has now been pulled into Intersight as shown in
the screenshot below:
The image above lists all the available vCenter Datacenters and associated
resources. Searching through this inventory follows the same look and feel
as other portions of the Intersight user interface. Selecting a particular
Datacenter in the table above will shift the user to a more context-specific
view of that Datacenter as shown in the screenshot below:
Any navigation from this point forward into the child resources will be tied to
the context of the selected Datacenter. The Clusters, Hosts, Virtual
Machines and Datastores tabs will each show users a view of their
respective inventory including useful capacity and utilization metrics as
shown in the screenshots below:
Once tagged, a user can search through the resource inventory using the
newly assigned tags.
In the Details section of the view above, the physical server has now been
associated and linked with this ESXi host. Operators troubleshooting a
potential problem on this host can now quickly click on the hyperlinked
server and pivot into the details of that server as shown below:
Virtualization orchestration
This type of orchestration will have some overlap with other virtualization-
related tools, especially with the VMware suite of products. Many
organizations are familiar with and may have operationalized the vRealize
Wrapping up
The integrations discussed in this chapter allow for a complete view of both
the virtualization and underlying hardware infrastructure from within
Intersight, making setup, configuration, operations, and troubleshooting
more efficient. Administrators no longer need to bounce between various
tools to understand the capacities, interactions, and configurations of the
physical server, storage, and virtualization layers. Intersight consolidates all
this information into a single source of truth.
Introduction
It can be easy to read articles, join webinars and investigate each of these
technology trends in a vacuum, but with Kubernetes, there is a wealth of
complexity below-the-waterline. Beyond just the basic technology, the
items to be considered can range from issues such as organizational culture,
structure, and staff skill sets tied to existing operationalized tooling and
much more. Venturing into the Kubernetes “water” can be daunting not only
because it brings new abstractions such as pods, nodes, and deployments,
but because it is also inherently tied to containerization, microservices, and
modern application development practices such as continuous integration
To ease the adoption and lower the learning curve, Cisco has brought
Kubernetes services into Intersight. To address the fundamental challenges
with Kubernetes adoption and management, Intersight provides a turn-key
SaaS solution for deploying and operating consistent, production-grade
Kubernetes anywhere, all backed by the Cisco Technical Assistance Center
(TAC). This eliminates the effort to professionally install, configure, optimize,
and maintain multiple Kubernetes deployments which speeds up adoption,
ensures enterprise standards, and delivers value directly to the business.
With Intersight, the right platform for each application can be chosen without
having to worry about the operational model changing or teams needing to
be cross-trained on new tools. Additionally, monitoring, alerting, and even
intelligence-driven optimization are normalized across both traditional and
modern application platforms enabling the various IT silos in an organization
to communicate effectively with a shared set of metrics, data, and tooling.
It is a tall order for any IT Operations team, and one made more difficult as
demand continues to increase for Kubernetes clusters anywhere — at the
edge, on-prem, or public cloud.
The core of IKS is its curated Kubernetes distribution complete with the
integration of networking, storage provider interfaces, load balancers, and
DevOps tooling. The IKS distribution includes native integrations that help
expand its capabilities, such as:
Benefits
Intersight resources form the logical building blocks of an IKS Cluster and
associated Kubernetes Cluster Profile. The following resource types may be
used and re-used to define these clusters:
• IP Pools
• Networking policies
• Node Pools
• Cluster add-ons
• Cluster configuration
• IP Pools
• Kubernetes version
• Master Node Pool, for each pool:
- Count
- IP Pool
Wrapping up
Introduction
Prime directive
IT Operations teams have essentially one fundamental goal, a prime
directive against which their success is constantly measured: to deliver
performant applications at the lowest possible cost while maintaining
compliance with IT policies.
Traditional shortfalls
The traditional method of IT resource management has fallen short in the
modern data center. This process-based approach typically involves:
First, most such metrics are merely proxies for workload performance, they
don’t measure the health of the workload itself. High CPU utilization on a
server may be a positive sign that the infrastructure is well-utilized and does
not necessarily mean that an application is performing poorly. Even if the
thresholds aren’t static, but centered on an observed baseline, there’s no
telling whether deviating from the baseline is good or bad, or simply a
deviation from normal.
Secondly, most thresholds are set low enough to provide human beings time
to react to an alert (after having frequently ignored the first or second
notification), meaning expensive resources are not used efficiently.
Thirdly, and maybe most importantly, this approach relies on human beings
to decide what to do with any given alert. An IT admin must somehow divine
from all current alerts, not just which are actionable, but which specific
actions to take! These actions are invariably intertwined with and will affect
other application components and pieces of infrastructure in ways that are
difficult to predict.
• Does that other host have enough memory and network capacity for
the intended move?
• Will moving that VM create more problems than it solves?
• Multiply that analysis by every potential metric and every application
workload in the environment and the problem becomes exponentially
more difficult.
Lastly, usually the standard operating procedure is to clear the alert, but as
stated above, any given alert is not a true indicator of application
performance. As every IT admin has seen time and again, healthy apps can
generate red alerts and "all green" infrastructures can still have poorly
performing workloads. A different paradigm is needed.
Paradigm shift
Ultimately, Workload Optimizer (a separately licensed feature set within the
Intersight platform) provides the needed new paradigm.
Actions are the result of this market analysis — for example, a physical host
that is maxed out on memory (high demand) will be selling its memory at a
high price to discourage new tenants, whereas a storage array with excess
capacity will be selling its space at a low price to encourage new workloads.
While all this buying and selling takes place behind the scenes within the
algorithmic model and does not correspond directly to any real-world dollar-
values, the economic principles are derived from the behaviors of real-world
markets. These market cycles occur constantly, in real-time, to assure
actions are currently and always driving the environment toward the Desired
State. In this paradigm, workload performance and resource optimization are
not an either/or proposition; in fact, they must be considered together to
make the best decisions possible.
Workload Optimizer
Permissions
privileges
The number of possible data points available for analysis are effectively
infinite, so Workload Optimizer will only gather data that has the potential to
lead to or impact a decision. This distinction is important as it can help
explain why a given target is or is not available or supported — in theory
anything with an API could be integrated as a target, but the key question
would be “what decision would Workload Optimizer make differently if it had
this information?”
With that said, one of the great advantages of this approach, and the
economic abstraction that underpins the decision engine, is that it scales.
Human beings are easily overwhelmed by data, and more data usually just
means more noise that confuses the situation. In the case of Workload
Optimizer’s intelligent decision engine, the more data it has from a myriad of
heterogeneous sources, the smarter it gets. More data in this case means
more signal and better decisions.
Workload Optimizer accesses its targets in two basic ways (see above):
1 Making direct API calls from the Intersight cloud to other cloud
services and platforms such as Amazon Web Services, Azure, and
AppDynamics SaaS — i.e., cloud to cloud, directly; and
While all communication to targets occurs via API calls, without any
traditional agents required on the target side, Kubernetes clusters do require
a unique setup step: deploying the Kubernetes Collector on a node in the
target cluster. The Collector runs with a service account that has a cluster-
admin role and contains its Device Connector, essentially proxying
communications to and commands from Intersight and the native cluster
kubelet or node agent. In that respect, the Collector serves a somewhat
analogous role as the Intersight Appliance does for enabling secure
Intersight communications with third-party hardware on-premises.
The Supply Chain shows each known entity as a colored ring. The color of
the rings depicts the current state of the entity concerning pending actions —
red if there are critical pending performance or compliance actions, orange
for prevention actions, yellow for efficiency-related actions, and green if no
actions are pending. The center of each ring displays the known quantity of
the given entity, and the connecting arrows depict consumers’
dependencies on other providers.
Actions
Bear in mind that the list of supported actions and their ability to be
executed via Workload Optimizer varies widely by target type and updates
frequently. A current, detailed list of actions and their execution support
status via Workload Optimizer can be found in the Target Configuration
Guide.
Groups
Workload Optimizer provides the capability of creating logical groups of
resources (VMs, hosts, datastores, disk arrays, etc.) for ease of
management, visibility, and automation. Groups can be either static (a fixed
list of a named set of resources) or dynamic. Dynamic Groups self-update
their membership based on specific filter criteria — a query, effectively — to
significantly simplify management. For example, one can create a dynamic
group of VMs that belong to a specific application’s test environment, and
further could restrict that group membership to just those running Microsoft
Windows (see below — note the use of “.*” as a catchall wildcard in the filter
criteria).
Groups can be used in numerous ways. From the Search screen, a given
group can be selected and automatically scoped to just that group in the
supply chain. This is a handy way to zoom in on a specific subset of the
infrastructure in a visibility or troubleshooting scenario or to customize a
given widget in a dashboard. Groups can also be used to easily narrow the
scope of a given plan or placement scenario (see next section).
Policies
One of the most critical benefits to the use of groups arises when combined
with policies. In Workload Optimizer, all actions are governed by one or
more policies, including default global policies, user-defined custom
policies, and imported placement policies. Policies provide extremely fine-
grained control over the actions and automation behavior of Workload
Optimizer.
Policies fall under two main categories: Placement and Automation. In both
cases, Groups (Static or Dynamic) are used to narrow the scope of the
policy.
Placement policies
Placement policies govern which consumers (VMs, containers, storage
volumes, datastore) can reside on which providers (VMs, physical hosts,
volumes, disk arrays).
Affinity/Anti-affinity
The most common use for placement policies is to create affinity or anti-
affinity rules to meet a business need. For example, consider two Dynamic
Groups: one of VMs and another of physical hosts, both owned by the Test
and Dev team. To ensure that Test and Dev VMs always run on Test and Dev
hosts, an administrator can create a placement policy that enables such a
constraint in Workload Optimizer (see below).
That constraint — that policy — will restrict the underlying economic decision
engine that generates actions. The buying decisions that the VMs within the
Test and Dev group make when shopping for resources will be restricted to
just the Test and Dev hosts, even if there might be other hosts that could
otherwise serve those VMs. One might similarly constrain certain workloads
with a specific license requirement to only run on (or never run on) a given
host group that is (or isn’t) licensed for that purpose.
Merge
Another placement policy type that can be especially useful is the Merge
policy. Merge policies logically combine two or more groups of resources
such that the economic engine treats them as a single, fungible asset when
making decisions.
Automation policies
The second category of policy in Workload Optimizer is the Automation
policy. Automation policies govern how and when Workload Optimizer
generates and executes actions. Like Placement policies, Automation
policies are restricted to a specific scope of resources based on Groups,
however, unlike Placement policies, Automation policies can be restricted to
run at specific times with schedules. Global Default policies govern any
resources that aren’t otherwise governed by another policy. As such, use
extra caution when modifying a Global Default policy as any changes can be
far-reaching.
Best practices
When implementing placement and automation policies, a crawl-walk-run
approach is advisable.
Crawl
Crawling involves creating the necessary groups for a given policy, creating
the policy scoped to those groups, and setting the policy’s action to
manual so that actions are generated but not automatically executed.
Walk
Walking involves changing an Automation Policy’s execution mechanism to
automatic for relatively low-risk actions. The most common of these are VM
and datastore placements, non-disruptive up-sizing of datastores and
volumes, and non-disruptive VM resizes up-actions for CPU and memory.
Modern hypervisors and storage arrays can handle these actions with little to
no impact on the running workloads, and these generally provide the
greatest bang for the buck for most environments. More conservative
organizations may want to begin automating with a lower priority subset of
their resources (such as test and development systems), as defined by
Groups. Combining the above with a Merge Policy to join multiple clusters
provides that much more opportunity for optimization in a reasonably safe
manner.
Run
Lastly, running typically involves more complex policy interactions, such as
schedule implementations, before- and after-action orchestration steps, and
rolling out automation across the organization, including production
environments.
Plan
Since the entire foundation of Workload Optimizer’s decision engine is its
market abstraction governed by the economic laws of supply and demand, it
is a straightforward exercise to ask what-if questions of the engine in the
Plan module.
The Plan function enables users to virtually change either the supply side
(add/remove providers such as hosts or storage arrays) or the demand side
(add/remove consumers such as VMs or containers) or both, and then
simulate the effect of the proposed change(s) on the live environment. Under
the hood, this is a simple task for Workload Optimizer since it merely needs
to run an extra market cycle with the new (simulated) input parameters. Just
as in the live environment, the results of a Plan (see below) are actions.
This capability takes the concept of traditional capacity planning, which can
be a relatively crude exercise in projecting historical trend lines into the
future, to a new level: Workload Optimizer plans to tell the administrator
exactly what actions will need to be taken in response to a given set of
changes to maintain the Desired State. One of the most frequently used Plan
types is the Migrate to Cloud simulation, which will be addressed in greater
detail in the next section covering the public cloud.
Placement
The Placement module in Workload Optimizer is a variation on the Plan
theme but with real-world consequences. Placement reservations (see
below) allow an administrator, who knows that new workloads are coming
into the environment soon, to alter the demand side of all future market
cycles, taking the yet-to-be-deployed workloads into account.
Placement reservations are a great way to both plan for new workloads and
to ensure that resources are available when those workloads deploy. A
handy feature of any Placement reservation is the ability to delay making the
reservation active until a point in the future, including the option of an end
date for the reservation. This delays the effect of the reservation until a time
closer to the actual deployment of the new workloads.
Public cloud
The public cloud’s vast array of instance sizes and types offer endless
choices for cloud administrators, all with slightly different resource profiles
and costs. There are hundreds of different instance options in AWS and
Azure, with new options and pricing emerging almost daily. To further
complicate matters, administrators have the option of consuming instances
in an on-demand fashion — i.e., pay as you use — or via Reserved Instances
(RIs) which are paid for in advance for a specified term, usually a year or
more. RIs can be incredibly attractive as they are typically heavily discounted
compared to their on-demand counterparts, but they are not without their
pitfalls.
When faced with myriad instance options, cloud administrators are generally
forced down one of two paths: 1) only purchase RIs for workloads that are
deemed static and consume on-demand instances for everything else
(hoping, of course, that static workloads really do remain that way); or 2)
picking a handful of RI instance types — e.g., small, medium, and large — and
shoehorning all workloads into the closest fit. Both methods leave a lot to be
desired. In the first case, it’s not at all uncommon for static workloads to
have their demand change over a year as new end users are added or new
functionality comes online. In these cases, the workload will need to be
relocated to a new instance type, and the administrator will have an empty
hole to fill in the form of the old, already paid-for RI (see examples below).
What should be done with that hole? What’s the best workload to move into
it? And if that workload is coming from its own RI, the problem simply
cascades downstream. Furthermore, even if the static workloads really
remain static over long stretches, the conservative administrator wary of
overspending may be leaving money on the table by consuming on-demand
instances where RIs would be more cost-effective.
Workload Optimizer can even suggest a car lease (RI purchase) that can be
used as a vehicle for ride-sharing (i.e., fluidly moving on-demand workload
in and out of a given RI to achieve the lowest possible cost while still
assuring performance).
The plan results offer two options: Lift & Shift and Optimized, depicted in the
blue and green columns, respectively. Lift & Shift shows the recommended
instances to buy, and their costs, assuming no changes to the size of the
existing VMs. Optimized allows for VM right-sizing in the process of moving
to the cloud, which often results in a lower overall cost if current VMs are
oversized relative to their workload needs. Software licensing (e.g., bring-
your-own vs. buy from the cloud) and RI profile customizations are also
available to further fine-tune the plan results.
Wrapping up
The flexibility and extensibility of the Intersight platform enable the rapid
development of new features and capabilities. Additional hypervisor, APM,
storage, and orchestrator targets are well on their way, as well as additional
reporting and application-specific support. Customers will find that the
return on investment for Workload Optimizer is rapid as the cost savings it
uncovers in the process of assuring performance and optimizing resources
quickly exceed the license costs.
Introduction
Intersight orchestration
Intersight allows for the creation and execution of complex workflows for
infrastructure orchestration. These workflows consist of multiple automated
tasks where each task can pass parameters to the next so the flow can
proceed without human intervention. To build workflows, a drag-and-drop
Workflow Designer is included natively in Intersight. This allows the entire
orchestration process to be created and viewed graphically.
Orchestration tasks
A task is the basic building block of the workflow and can perform a simple
operation such as creating a new storage volume. The operation can be
executed within the Intersight cloud or, with the help of the Device
Connector at the endpoints, can carry out operations with Intersight targets.
Each task is configured by providing the necessary inputs, and the output of
the task may be passed onto another task as a required input after
successful execution of the task. The figure below shows an example list of
tasks available in Intersight Cloud Orchestrator.
Generic tasks
Intersight provides a few generic tasks that can support complex workflows.
One such example is the Conditional Task, available under Configure →
Orchestration → Create New Workflow, which provides the capability to
perform programmatic decisional expressions. The conditional expression
can be a simple expression or combined into a compound expression for
evaluation. Conditional expressions support the following operators:
The expression is evaluated during runtime and depending on the result, the
respective path is chosen. If none of the conditions match, the default path
is chosen.
Another commonly used generic task is the Invoke Web API Request task.
This task extends the automation capabilities of the workflow engine beyond
what is natively available in the task library by performing generic API calls in
a workflow. This task supports both HTTP and HTTPS protocols and the
commonly used methods (GET, POST, PUT, PATCH, DELETE, etc.). This task
can be used against Intersight itself or custom targets which can be
configured under Admin → Targets → Claim a New Target → Custom
Data types
Intersight orchestration supports the use of data types for workflows and
tasks. Data types provide a powerful framework for administrators to define
what data points should be passed in for a given workflow execution.
Variable type, name, label, validation rules, and conditional dependencies
can all be defined within a custom data type.
Workflows
Depending on the use case, a workflow can be composed of a single
automated task, multiple tasks, or even other embedded workflows. The
orchestrator includes both simple and complex sample workflows to help
flatten the learning curve.
The Workflow Designer main interface has a list of Tasks and Workflows on
the left-hand side that can be dragged and dropped into the central pane,
which is sometimes referred to as the canvas. Existing tasks or workflows
(as a sub-workflow) can be used in the workflow design. Tasks are easily
chained together by dragging the success criteria (green lines) and failure
criteria (red lines).
The Properties option allows the designer to see and edit detailed
information about the overall workflow and for each of its tasks. In the
Workflow Designer, a JSON View is also available, providing a read-only
view of the workflow and is useful for understanding the API calls for each
step of the workflow. The JSON code can also be copied to be used for
internal documentation or in other tools that may have been previously
operationalized in an organization.
Read-Only users can view versions of a workflow, but they cannot create,
edit, execute, or delete versions. Users with Storage Administrator and
Entitled users can select Manage Versions from the ellipsis menu for a single
workflow in the list of workflows as shown in the screenshot below:
This action will display that workflow’s versions and allow an administrator to
select the default version as shown in Figure 11. When selected, the
versions, execution status, description, and validity will be displayed. To add
additional changes to the workflow without affecting existing versions,
Intersight provides the ability to create a new version as shown in the figure
below:
Workflow execution
Workflow execution requires that the executing user has the necessary
privileges for all of the tasks within the workflow. For example, to
successfully execute a workflow that includes storage and virtualization
tasks only, both Storage and Virtualization Administrator privileges are
required. In the absence of either one of these privileges, the workflows
cannot be executed.
traditional workflow execution, cloning will pre-populate the input fields with
previously used input values. The pre-population of input values is
particularly useful for workflow developers as they iteratively work through
the development lifecycle, frequently troubleshooting and re-executing their
code. For example, see below for a view of previous workflow input prompts
from a cloned workflow:
Rollback execution
Certain orchestration tasks support the ability to rollback within a previously
executed workflow. During a rollback, resources are reverted to the pre-
workflow execution state. The ability to rollback is task-dependent so it will
only be available for those tasks that support it. When a rollback action is
selected, operators can choose to select specific tasks or all eligible tasks
within the workflow.
Use cases
As organizations mature their capacity for orchestration of their workloads
and infrastructure in a multicloud world, they will gain agility and speed.
Numerous use cases can benefit from orchestration, but to maximize the
opportunity for success, IT administrators should start with identifying use
cases that are straightforward and quantifiable. These simple use cases can
then be expanded to handle more complex scenarios.
Storage orchestration
One of the more common VM administration tasks involves growing a VM
datastore that has reached capacity. This task is made more complex when
the underlying storage volume in which the datastore resides is itself at
capacity, creating a cross-domain problem involving both VM and storage
array expertise. Furthermore, in a heterogeneous storage vendor
environment, the storage domain expertise must be specific to the given
storage vendor’s software management system. This seemingly simple task
can involve numerous parties to execute, and this problem is exacerbated by
the frequency of the task and the breadth of the storage vendor
heterogeneity in the environment.
From there, click on Update VMFS Datastore from the list to launch the
Workflow Designer. From the main Workflow Designer screen, a graphical
representation of this predefined workflow is available, and details of its
properties can be displayed via the Properties button. In this example, the
Inputs tab under Properties shows the various input parameters required for
the workflow, such as the specific hypervisor manager, cluster, datastore,
and storage device (see below).
To see a mapping of how each task’s output relates to the next task’s input,
select the Mapping button. To manually execute this workflow, select the
Execute button which will prompt for the required input parameters for the
workflow (see below).
After making the necessary selections in the wizard and executing the
workflow, the execution history can be viewed in the main Workflow
Designer screen via the History button.
Wrapping up
Introduction
Throughout this book, readers are exposed to the various capabilities that
Intersight offers as a true cloud operations platform. All these capabilities are
driven by the Intersight API as detailed in this chapter, providing the
foundation for discussions in other chapters (e.g., Infrastructure as Code,
Orchestration, etc.) involving the consumption of Intersight resources
through the API.
Intersight being a SaaS-based platform means new features are added very
rapidly (almost weekly). Thankfully, the API has been architected in such a
way that it can keep pace with these frequent feature releases by auto-
generating documentation and client SDKs (software development kits)
alongside the newly published API version.
In this chapter, readers will learn the benefits of this open API architecture,
how to leverage the API to programmatically interact with Intersight, and
review examples of common and advanced use cases using various client
SDKs.
OpenAPI
Many readers may know of OpenAPI by its previous name, Swagger. The
Swagger API project dates to 2011 when it was first introduced to use JSON
markup to describe an API (also referred to as a schema). Utilizing a
consistent schema-based approach to documenting APIs “allows both
humans and computers to discover and understand the capabilities of a
service without requiring access to source code, additional documentation,
or inspection of network traffic” (http://spec.openapis.org/oas/v3.0.3
http://spec.openapis.org/oas/v3.0.3).
http://spec.openapis.org/oas/v3.0.3
A great example of the benefits of these tools in action is the API Reference
section of the Intersight API docs (https://intersight.com/apidocs/apirefs
https://intersight.com/apidocs/apirefs):
https://intersight.com/apidocs/apirefs
The API reference section provides a fully interactive version of the Intersight
API. This reference site allows browsing and searching for any of the
available API endpoints (left portion of the above figure), reading the
documentation for a given endpoint (middle), and finally, running a live
instance of the selected request including query parameters and post body
data (right).
A more detailed explanation of the API reference tool within Intersight will be
provided later in this chapter, but it is introduced here as an example of what
can be achieved by using a well-documented API.
Versioning
All open OpenAPI documents (schemas) are versioned as per the standard
so when Intersight services are updated to support a new capability, the
version of the Intersight OpenAPI document is changed and the
corresponding document is published. Newer versions of the Intersight
OpenAPI document will likely include new API endpoints, schema
adjustments, and possible security schemes. The API major version (1.x, 2.x,
etc.) is not changed when backward-compatible changes are deployed.
Backward compatibility
To assist with backward compatibility, the major schema version is always
sent along with any API requests, as will be shown in the examples at the
end of this chapter. To further ensure backward compatibility, API clients
should be written in such a way that additional properties passed by newer
versions of the API can be parsed without error.
Information model
Because everything within Intersight is API driven, it is important to
understand some of the nomenclature/building blocks of the underlying
schema.
• UCS servers
• Server components such as DIMMs, CPUs, GPUs, storage controllers,
and Cisco CIMC
• UCS Fabric Interconnects
• Firmware inventory
• HyperFlex nodes and HyperFlex clusters
• VLANs and VSANs
{
"Moid": "59601f8b3d1f1c0001c11d78",
"ObjectType": "hyperflex.Cluster",
"CreateTime": "2017-07-07T23:55:55.559Z",
"ModTime": "2017-07-08T01:18:38.535Z",
"Tags": [
{ "Key": "Site", "Value": "Austin"},
{ "Key": "Owner", "Value": "Bob"}
],
}
Examples of how to use tags within API calls to achieve a given set of tasks
are provided in the examples section of this chapter.
Rate limiting
To prevent abuse of the APIs, the Intersight APIs are rate limited. When too
many requests are received in a given period, the client may receive an
HTTP status code 429 Too Many Requests. The threshold of these rate limits
is dependent upon the end user’s account licensing tier.
Client SDKs
• Powershell
• Python
• Golang
• Ansible
• Terraform
The current list of available client SDKs along with the full JSON schema can
be found at https://intersight.com/apidocs/downloads/
https://intersight.com/apidocs/downloads/.
https://intersight.com/apidocs/downloads/ It is always
recommended to check the Downloads tab in case the source of an SDK has
changed. As an example, the Powershell SDK (as of the writing of this book)
is hosted on a Git repository but is planned to move to Powershell gallery
sometime in the future.
Although new versions of the Intersight API and related client SDKs are
released frequently as part of the Intersight CI/CD development model, the
SDKs are written in such a way that they should not break when talking to a
newer version of the API within the same major version.
While the clients can handle extra properties returned by the newer API
version, they would not be able to configure those newer
properties/capabilities without an update.
API keys
API keys provide a very secure and simple way for client applications to
authenticate and authorize requests. An API key consists of a key ID and key
secret and is generated under a given Intersight user’s account. Developers
are responsible for storing the key secret (or private key) in a secure location
as it is never stored within Intersight, however, the key ID and associated
public key are stored within Intersight under the associated user account.
This approach eliminates the need to send a shared secret to Intersight
thereby reducing the risk of compromising user credentials.
Multiple keys can be created per user account to represent different client
applications. This is a recommended best practice to monitor and audit API
usage for each client.
Provide a name relevant to the client application and select the OpenAPI
schema (version 3 is typically preferred).
Lastly, the secret key should be stored in a secure location as it is not stored
within Intersight, as emphasized in the informational box shown in the figure
below. A maximum of three keys can be generated for each user account.
The API key ID and secret are used to generate a unique signature string for
each request using one of the supported signing algorithms listed in the
API documentation (https://intersight.com/apidocs/introduction/security/
https://intersight.com/apidocs/introduction/security/
#generating-api-keys
#generating-api-keys).
#generating-api-keys Detailing how each hashing and signature algorithm
works is not within the scope of this chapter, however, it is important to
know that each request requires a unique signature string which is typically
handled within a given client SDK.
As with learning anything new, it is always best to start small and simple
before trying to tackle a more complex task. The Intersight API comes with
great power, which of course means great responsibility, so learning the
proper approach to programmatically achieve a task is of vital importance.
A great place to start is with a simple use case. Some suggestions would
be:
Once a use case is selected, the steps below can be used as a guide to
becoming familiar with various programmability tools available to accomplish
that task.
The remainder of this section will focus on the “Get a specific rack
server” and “Turn on the Locator LED” use case.
Crawl
Now that a use case has been selected, the next step is to go into the API
Reference tab of the Intersight API docs and review the endpoints and
methods associated with the selected use case
(https://intersight.com/apidocs/apirefs
https://intersight.com/apidocs/apirefs).
https://intersight.com/apidocs/apirefs
The API Reference tool allows for a quick search of resources within the
Intersight API universe. Users are required to log into Intersight to utilize the
API Reference tool, and it performs API calls using that user’s credentials. It
is important to note that while the API Reference encompasses every API
endpoint, the user will receive an error if trying to perform an action outside
the scope of their current user role or license tier.
Since the selected use case starts with finding a specific rack server, it
makes sense to search for a term such as “rack” as shown in the screenshot
below:
The model schema shows the power of a well-documented API. Users can
now fully understand what properties are associated with a rack server
(compute.RackUnit) resource or any other managed object, including the
property Type and a Description.
Since the first objective of the selected use case is to “Get a specific rack
server,” a GET operation would be the most fitting. In the list of methods
under compute.RackUnits on the left side of the API Reference screen, two
available GET operations are shown. This is a common scenario when
interacting with the Intersight API as resources can be searched for via query
parameters (meaning by specific resource properties) or by Moid which
uniquely identifies a given resource (in this case a rack server).
1 Resource search/navigation
The right side of this screen allows for the query parameters to be specified.
Clicking Send with no query parameters specified is allowed and will return a
list of all RackServers that the given logged in account is allowed to see.
Scrolling through the Response Text shows all the parameters returned for
each object. As shown above, Serial (the server’s serial number) is one of
the parameters returned. To filter this list to just a single server, use the
$filter query option (see below). This option will be covered in more detail,
but for now, click the + Query Parameter blue text and add a Key of $filter
and Value of Serial eq FCH2109V1EB (replacing this serial number with a valid
serial number from the target environment) as shown in the figure below. It
is important to note that both the Key and the Value information are case
sensitive.
Figure 11: API response when filtering the server list by a specific serial number
This will return all the parameters for a single server whose serial number
matches the specified serial number. One of those parameters is Moid.
Saving that Moid allows a developer to interact directly with that server
without having to search for it again. Also noteworthy is the fact that there
are other parameters listed that are pointers to other objects, like
Fanmodules, the LocatorLed, and Psus (power supplies). The details for any of
these components can be located with a subsequent API call, or Intersight
can expand the API response to include them by using the $expand query
option covered later in this chapter.
The next step in the journey to using the API is to turn on the Locator LED for
the given server. The current state of the LED is visible in the previous API
"RunningWorkflow": null,
"Server": {
"ClassId": "mo.MoRef",
"Moid": "5fd904a86176752d30ec392c",
"ObjectType": "compute.RackUnit"
},
"ServerConfig": {...
The Moid for the server is nested, so searching for that Moid requires the
use of dot notation. The figure below shows filtering the ServerSetting list by
the Moid of the server:
$filter = Server.Moid eq '5fd904a86176752d30ec392c'
The server setting object is discovered in the API Reference by searching for
“serversetting”.
Figure 12: The response from searching for a server setting by server Moid
"Moid": "5fd904a86573732d30e7872d"
The state of the Locator LED can be confirmed in the Intersight GUI.
Walk
The API Reference tool is a great way to discover the available Intersight
resources, read through the associated resource schemas, and experiment
with basic REST calls. Most programmatic use cases however will require
more than one API call to achieve the desired result. For example, the
selected use case is to “Get a specific rack server” and “Turn on the Locator
LED.”
This use case typically involves a multi-step process. First, finding the server
by specific properties as it is unlikely that the Moid is already known
(Terraform would be a possible exception), and second, pushing a change
to the properties of that server (by Moid) to turn on the Locator LED.
Before jumping straight into a client SDK, it is good practice to model a few
of these linked requests in a tool such as Postman. Postman is a
collaboration platform for API development and testing and is a very popular
tool for modeling API requests.
Installing Postman
OS-specific installation instructions can be found at: https://www.postman.c
https://www.postman.c
om/
om/downloads/
om/downloads/.
downloads/ Legacy versions of Postman were offered as a browser
plugin for Chrome; however, the current version is offered as a standalone
application supported on multiple operating systems. A detailed how-to
guide for Postman is not within the scope of this book but it is worth
mentioning some basic definitions:
Getting started
To help newcomers get started with Postman, a pre-built collection is
available at (https://github.com/CiscoDevNet/intersight-postman
https://github.com/CiscoDevNet/intersight-postman)
https://github.com/CiscoDevNet/intersight-postman which
includes the pre-request script to handle authentication along with some
sample API requests for reference.
Postman collections can be exported and imported via a single JSON file
containing everything within that collection including requests, collection
variables, collection pre-request script, collection test script, and collection
documentation. There is no need to clone the Git repo since everything
needed is in the single JSON file for the collection.
Users can download the collection export JSON file from the repository and
import it into Postman. The first step is to click the Import button and browse
to the location where the JSON file is saved as shown in the following two
screenshots.
Postman maintains a group of settings and variables that are shared for all
entries in a collection. Those settings and variables can be viewed and
edited by clicking the ellipsis to the right of Intersight-Examples and
selecting Edit as shown below:
The collection also contains pre-request scripts which are executed before
any API call within the collection. This is used to perform the authentication
for each Intersight API endpoint and is critical to successfully executing any
API calls against Intersight. The JSON file at the GitHub repository
mentioned above already contains a working pre-request script for the
collection as shown below:
The Variables tab in the collection settings shows the API server, which is
intersight.com for users consuming Intersight via SaaS. If the Intersight
Connected or Private Virtual Appliance has been employed instead of using
SaaS, this setting should change to the URL of that appliance. All Postman
API calls will be directed to this URL.
If Postman does not already have a local environment created, the user will
be prompted to add a new one.
For working with this Postman Intersight collection, the API key and secret
key must be added as the variables api-key and secret-key. The pre-
request script mentioned above expects those variables to be set properly
and will be unable to properly encrypt the transaction without them.
Once the environment is configured with a valid key and secret, all the
requests should work within the imported collection. Any request sent via
Postman will be bound to the user associated with the API key and secret
within the selected environment. As mentioned previously, the privileges and
capabilities of the API are limited to that of the user and account associated
with this API key credential.
There are several example API requests within the imported collection to
show how to interact with common Intersight resources. The folder named
“Turn on Server Locator LED” within the collection contains all the requests
needed to replicate what was previously done in the Walk stage. This folder
is highlighted below:
The first request in the folder is “Get Rack Server By Serial” which shows
how to format a GET request for a rack server containing the target serial
number used in the Walk section. Additionally, the $expand operator is used
to expand the LocatorLed Object returned as part of the rack server schema.
Without the expand operator, only the object (resource) pointer would be
returned. $expand and $filter are covered in much greater detail in the
Advanced Usage section of this chapter.
Figure 25: Querying for a rack server by Serial with a property expansion
if (responseBody.length > 0) {
var jsonData = JSON.parse(responseBody);
var moids = [];
jsonData.Results.forEach(result => {
moids.push(result.Moid);
})
pm.collectionVariables.set('server-moid', `${moids[0]}`);
}
Since the GET request was done via query parameters instead of a direct
Moid, the return value is always a list of results. The post-execution script
above loops through all the resulting servers (there should only be one in this
case since the filter was by serial number) and collects all the Moids in a
new list variable. The script then takes the first entry out of the list and
stores it in a collection variable named server-moid for later use.
The screenshot below shows the returned resource from the API request. As
expected, one compute rack unit (rack server) is returned and because
the $expand property was set for the LocatorLed object, it is easy to observe
the current state of the Locator LED.
Now that the server Moid has been stored in a collection variable, the
ServerSettings can also be queried. The LocatorLed configuration state is
stored within a ServerSettings resource which is referenced by the target
rack server. As illustrated in the Walk section, the ServerSettings can be
queried by applying a filter matching the Server.Moid property with the
Moid collected in the previous step.
The last step to accomplish the end goal of turning on the server Locator
LED is to PATCH the server settings with an AdminLocatorLedState set to On.
The screenshot below shows the JSON body syntax for this request. The
{{settings-moid}} collected in the previous request is also used to point
directly to a specific ServerSettings resource.
The rack server can now be queried again, using the same syntax as in the
first API request with the LocatorLed property set to $expand. The
OperState of the LocatorLed resource should now be set to “on” as shown in
the screenshot below:
Run
Once the required API endpoints and resource relationships have been
discovered in the Crawl phase, and the request chaining and variable
substitutions have been modeled in the Walk phase, the natural next step is
to choose a client SDK to make this a reusable function. Python is an
immensely popular programming language for both novice and expert
programmers. With this in mind, the Python Intersight client SDK will be used
in this section to write a function that automates the desired use case to
“Get a specific rack server” and “Turn on the Locator LED.”
Because the installation source files and instructions may vary over time, it is
recommended to go to the API docs downloads page for the most up-to-
date instructions for a given SDK:
https://intersight.com/apidocs/downloads/
https://intersight.com/apidocs/downloads/.
https://intersight.com/apidocs/downloads/
Virtual environment
A good Python programming practice is to always use a Python virtual
environment when working on a particular project. This helps keep package
dependencies isolated to that specific project. Python 2 was sunsetted on
January 1, 2020, meaning that even security flaws will not be fixed. Thus,
any new projects should be written in Python 3. Virtual environment
capability comes natively built into Python 3 starting with version 3.3. Below
is an example of how to create a Python virtual environment.
After the above command is executed, a new folder will be created in the
current working directory named “Intersight” containing the virtual
environment. The virtual environment should then be sourced to ensure any
reference to the python command is pointing to the virtual environment and
associated libraries. Sourcing the virtual environment varies based on the
end-user operating system, so reference the official Python documentation
for the latest OS-specific instructions
https://docs.python.org/3/tutorial/venv.html).
https://docs.python.org/3/tutorial/venv.html
(https://docs.python.org/3/tutorial/venv.html
New versions of Python are continually being released and moving from one
version to another can easily break projects that were written on the
previous version. Pyenv is a very popular and easy-to-use version
management framework for Python allowing for the install of various versions
of Python and creates virtual environments tied to a particular installed
version. Installing pyenv is not within the scope of this book but instructions
can be found on its GitHub repo (https://github.com/pyenv/pyenv
https://github.com/pyenv/pyenv)
https://github.com/pyenv/pyenv
With this in mind, a common practice when working with any type of client
SDK is to create a helper function to reuse in other projects to handle
authentication. In the example below, it is assumed that the API key in clear
text and a path to the secret file will be passed via the command line using
the argparse library.
import argparse
import os
import datetime
import intersight
Arguments:
description {string}: Optional description used within argparse help
Returns:
apiClient [intersight.api_client.ApiClient]: base intersight api client class
"""
if description != None:
Parser.description = description
Parser.add_argument('--url', default='https://intersight.com')
Parser.add_argument('--ignore-tls', action='store_true')
Parser.add_argument('--api-key-legacy', action='store_true')
Parser.add_argument(
'--api-key-id',
default=os.getenv('INTERSIGHT_API_KEY_ID'))
Parser.add_argument(
'--api-key-file',
default=os.getenv('INTERSIGHT_API_PRIVATE_KEY', '~/Downloads/SecretKey.txt'))
args = Parser.parse_args()
if args.api_key_id:
# HTTP signature scheme.
if args.api_key_legacy:
signing_scheme = intersight.signing.SCHEME_RSA_SHA256
signing_algorithm = intersight.signing.ALGORITHM_RSASSA_PKCS1v15
else:
signing_scheme = intersight.signing.SCHEME_HS2019
signing_algorithm = intersight.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3
configuration = intersight.Configuration(
host=args.url,
signing_info=intersight.HttpSigningConfiguration(
key_id=args.api_key_id,
private_key_path=args.api_key_file,
signing_scheme=signing_scheme,
signing_algorithm=signing_algorithm,
hash_algorithm=intersight.signing.HASH_SHA256,
signed_headers=[intersight.signing.HEADER_REQUEST_TARGET,
intersight.signing.HEADER_CREATED,
intersight.signing.HEADER_EXPIRES,
intersight.signing.HEADER_HOST,
intersight.signing.HEADER_DATE,
intersight.signing.HEADER_DIGEST,
'Content-Type',
'User-Agent'
],
signature_max_validity=datetime.timedelta(minutes=5)
)
)
else:
raise Exception('Must provide API key information to configure ' +
'at least one authentication scheme')
if args.ignore_tls:
configuration.verify_ssl = False
apiClient = intersight.ApiClient(configuration)
apiClient.set_default_header('referer', args.url)
apiClient.set_default_header('x-requested-with', 'XMLHttpRequest')
apiClient.set_default_header('Content-Type', 'application/json')
return apiClient
if __name__ == "__main__":
config_credentials()
Passing credentials
The imports at the top tell the Python interpreter which packages need to be
included when executing the script. Some important imports to note in this
example are argparse and intersight. The argparse library is a helper class
for defining required and optional arguments to be passed into the script at
execution. argparse also includes advanced capabilities like argument
groups, data validation, and mutual exclusion not shown in this example.
In the argument definition there is a required argument for both the API key
ID (--api-key-id) and the API secret file path (--api-key-file). Below is how
a user would execute this script named example.py (the key has been
truncated for readability):
Here the API key ID is passed in clear text while the API secret is stored in a
file in the same working directory as the example.py script. Securing the
contents of the secret file is not within the scope of this book, but the file
should ideally be removed after its use. There are additional arguments in
the credentials.py code for passing an Intersight URL if using a Connected
Virtual Appliance or Private Virtual Appliance, as well as a flag for using a v2
API key.
The argument parser gets the needed authentication data and can be
referenced in other scripts to add additional script-specific arguments. An
example of this will be shown later as part of the selected use case.
Client configuration
When all the necessary arguments needed for authentication have been
defined and parsed, the API client configuration can be created. The details
of the code below should not be analyzed too closely as they may change
over time with the addition of different signing algorithms. What is important
to note, however, is that the algorithms will change based on the version of
the API key being used, as noted in bold in the code below:
if args.api_key_id:
# HTTP signature scheme.
if args.api_key_legacy:
signing_scheme = intersight.signing.SCHEME_RSA_SHA256
signing_algorithm = intersight.signing.ALGORITHM_RSASSA_PKCS1v15
else:
signing_scheme = intersight.signing.SCHEME_HS2019
signing_algorithm = intersight.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3
configuration = intersight.Configuration(
host=args.url,
signing_info=intersight.HttpSigningConfiguration(
key_id=args.api_key_id,
private_key_path=args.api_key_file,
signing_scheme=signing_scheme,
signing_algorithm=signing_algorithm,
hash_algorithm=intersight.signing.HASH_SHA256,
signed_headers=[intersight.signing.HEADER_REQUEST_TARGET,
intersight.signing.HEADER_CREATED,
intersight.signing.HEADER_EXPIRES,
intersight.signing.HEADER_HOST,
intersight.signing.HEADER_DATE,
intersight.signing.HEADER_DIGEST,
'Content-Type',
'User-Agent'
],
signature_max_validity=datetime.timedelta(minutes=5)
)
)
else:
raise Exception('Must provide API key information to configure ' +
'at least one authentication scheme')
if args.ignore_tls:
configuration.verify_ssl = False
apiClient = intersight.ApiClient(configuration)
apiClient.set_default_header('referer', args.url)
apiClient.set_default_header('x-requested-with', 'XMLHttpRequest')
apiClient.set_default_header('Content-Type', 'application/json')
return apiClient
Performance note
Performance of the Intersight Python SDK is vastly improved by using a
v3 API key, due to the performance benefits of the elliptical curve algorithm
over RSA. Note, the legacy key is only used below as an example, and to be
consistent with what was shown in the earlier phases.
import argparse
from datetime import timedelta
import logging
from pprint import pformat
import traceback
from typing import Text, Type
from time import sleep
import intersight
import credentials
from helpers import format_time, print_results_to_table
#* Place script specific intersight api imports here
import intersight.api.compute_api
def main():
client = credentials.config_credentials()
if __name__== "__main__":
main()
Instead of hard coding the serial number into the query, as was done in the
Walk phase, this value should be passed in as another argument. Supporting
a user-passed serial number requires an additional argparse argument as
shown below:
def main():
client = credentials.config_credentials()
args = parser.parse_args()
try:
# Start main code here
# Toggle locator led for compute rack unit with supplied serial
toggle_locator_led(client, args.serial)
except intersight.OpenApiException as e:
logger.error("Exception when calling API: %s\n" % e)
traceback.print_exc()
if __name__== "__main__":
main()
As noted in the new argument description, the new function used to handle
changing the Locator LED state will also not be setting a static value, rather
it will read the current locator LED state and toggle the value. This means if
the current Locator LED state is Off, then the new state will be On, and vice
versa. The serial number can be passed in when executing the script, similar
to what was shown previously (the key has been truncated for readability):
Below is the code for the toggle_locator_led function used for toggling the
Locator LED state:
current_state = new_settings_query.results[0].locator_led.oper_state
if current_state.lower() != new_state.lower():
logger.error("Timeout occurred. Led operstate never changed")
else:
logger.info(f"New led state = {current_state}")
The steps within the function should look very similar to what was executed
within Postman during the Walk phase. The only major difference is the
addition of an API helper class for the rack server (which is in the
computeUnit class):
api_instance = intersight.api.compute_api.ComputeApi(client)
server_query = api_instance.get_compute_rack_unit_list(
filter=f"Serial eq {serial}",
expand="LocatorLed"
)
2 Store the current state of the locator LED into a variable and calculate
the new desired value
led_state = server_query.results[0].locator_led.oper_state
logger.info(f"Previous led state = {led_state}")
new_state = "On" if led_state == "off" else "Off"
3 Retrieve the target server settings by querying via the target server
Moid
server_settings_query = api_instance.get_compute_server_setting_list(
filter=f"Server.Moid eq '{server_query.results[0].moid}'"
)
4 Update the server settings with the new desired locator LED state
update_query = api_instance.update_compute_server_setting(
moid=server_settings_query.results[0].moid,
compute_server_setting=dict(admin_locator_led_state=new_state)
)
new_settings_query = api_instance.get_compute_server_setting_list(
filter=f"Server.Moid eq '{server_query.results[0].moid}'",
expand="LocatorLed"
)
retries = 0
while(retries <= 10 and
new_settings_query.results[0].config_state.lower() == 'applying'):
logger.info("Waiting for eventual consistency to occur")
sleep(2)
# Retrieve new led operational state
new_settings_query = api_instance.get_compute_server_setting_list(
filter=f"Server.Moid eq '{server_query.results[0].moid}'",
expand="LocatorLed")
retries += 1
current_state = new_settings_query.results[0].locator_led.oper_state
if current_state.lower() != new_state.lower():
logger.error("Timeout occurred. Led operstate never changed")
else:
logger.info(f"New led state = {current_state}")
In step 5, a while loop is used to follow the configuration state of the applied
changes. Intersight provides eventual consistency and therefore the changes
are not immediately applied. The “while” loop continues to query the server
settings and looks for the config_state to change from “applying” to
something else. Once a timeout occurs or the configuration state is no
longer “applying” the final server settings query is used to check the new
value of the locator LED. If the value doesn’t match what is expected, then
an error is printed to the user.
The output of the above script for the example should look similar to the
following (timestamps were truncated for readability):
Advanced usage
Traditionally, a developer uses an API to read large amounts of data that are
then processed by the client application. It would be trivial in an environment
with a dozen servers to retrieve all servers and simply loop through them to
find the one server with the desired serial number. This is mildly inefficient at
a small scale but wildly wasteful at a larger scale, negatively affecting
performance.
The Intersight API provides additional query options that can be leveraged to
perform server-side filtering, expansion, and aggregation. In other words,
additional processing, such as counting the number of entries, can be done
by the Intersight servers in the cloud before the payload is transmitted to the
client. This can reduce payload size, reduce client-side processing, and
even reduce the number of required API calls, streamlining the entire effort.
Note that most GET operations return the ClassId, Moid, and ObjectType
regardless of what is specified by $select. In the above example, the
resulting payload will contain six properties per alarm even though only three
were requested.
$filter
The $filter query option specifies one or more expressions to use to
restrict which objects will be returned. An Intersight account could have
hundreds or thousands of alarms (hopefully most have a status of
“Cleared”), so it is useful to ask Intersight only to return alarms of specified
severity. This will greatly reduce the amount of data returned to the client.
The example below shows $filter being used to request only alarms of
“Critical” severity.
The different comparison and logical operators available and their exact
syntax is detailed in the online user guide at: https://intersight.com/apidocs/
https://intersight.com/apidocs/
introduction/query/#filter-query-option-filtering-the-resources
introduction/query/#filter-query-option-filtering-the-resources
$inlinecount
The $inlinecount query option adds a Count property showing the total
number of objects in the returned payload. The payload is unaltered beyond
the addition of this property. The benefit of this query option is that the client
does not have to count the number of items returned from the API call:
$count
The $count query option operates much like the $inlinecount query option
except that it replaces the payload with the Count property. An example of
the return payload when $count is set to true is shown below:
{
"ObjectType": "mo.DocumentCount",
"Count": 242
}
The example below shows a single API call that returns the total number of
alarms for each severity level.
{
"ObjectType": "mo.AggregateTransform",
"Results": [
{
"Severity": "Warning",
"Total": 52
},
{
"Severity": "Info",
"Total": 15
},
{
"Severity": "Cleared",
"Total": 142
},
{
"Severity": "Critical",
"Total": 33
}
]
}
The following example shows two levels of sorting alarms: first in ascending
order by Severity, then in descending order by CreationTime (newest alarms
first).
"Parent": {
"ClassId": "mo.MoRef",
"Moid": "5c8014c07774666a78a029ff",
"ObjectType": "compute.RackUnit",
"link": "https://www.intersight.com/api/v1/compute/RackUnits/5c..."
}
In this case, the parent is a server, and the client application might need the
serial number of that server. Normally this would require an additional call to
Intersight to obtain the server serial number. For a list of 100 servers, that
would require a unique API call to Intersight for each of those 100 servers.
The $expand query option can be used here to instruct Intersight to fetch the
details of each parent and return those results inline. For a list of 100
servers, $expand eliminates those additional 100 API calls.
Figure 37: A simple example showing the usage of the $expand query option
Expanding the parent (which is a server) will add more than 80 parameters
to the new payload. Fortunately, the $select option mentioned in a previous
section can be combined with $expand to limit the information returned by
$expand to only a subset of parameters. The following example limits the
scope of $expand to returning only the serial number of the server (Parent)
for each Locator LED.
Figure 38: An example using the $select and $expand option queries together
The SearchItems API can also reduce the number of required API calls.
Every object type (rack server, blade server, fabric interconnect, chassis,
pool, policy, profile, etc.) is accessed by a different API endpoint. To locate
a server by serial number, an administrator would have to query both the
Compute/RackUnits and the Compute/Blades endpoints. To locate hardware
by a tag, an administrator would have to query both of those endpoints and
also the Equipment/Chassis and Equipment/SwitchCard endpoints and
more. Instead, a single API endpoint can be used to search across all
ClassIds within Intersight.
The following example shows how to find a specific serial number without
knowing what kind of device it is.
Tags/any(t:t/Key eq 'owner')
The Intersight GUI cannot possibly cover every use case an IT administrator
might encounter. Programmability provides teams with agility and flexibility
beyond the GUI. This section will cover a few use cases that Intersight
customers have encountered that were easily solved with just a few lines of
code. Each use case will be presented with both the Python and PowerShell
SDKs for Intersight.
Lines in PowerShell snippets that are too long to fit on one line will be split
using the PowerShell standard backtick (`) for multiline statements.
PowerShell
This short script first creates a string that represents seven days ago. Get-
Date will retrieve the current instant in time and AddDays(-7) will subtract
seven days from the current instant in time. The string is in the format that
the Intersight API uses for dates (including fractions of a second).
The second step is to create a string that will be used as a filter in the API
call. The variable $myfilter specifies that alarm severity must be critical and
the creation time of the alarm must be greater than the date string built in
the previous step.
The last step is to simply execute the get with the $filter set to $myfilter.
There is also a $select option specified to minimize the size of the returned
payload. This is optional.
$mydate = (Get-Date).AddDays(-7).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
$myfilter = "Severity eq Critical and CreationTime gt $mydate"
(Get-IntersightCondAlarmList `
-VarFilter $myfilter `
-Select "CreationTime,Description” `
).ActualInstance.Results
Python
The example snippet below does not show the required client configuration
discussed previously for the sake of formatting. Import statements are
specific to just the snippet.
import intersight
import intersight.api.cond_api
from datetime import datetime, timedelta
Every entry in the audit log has an Event such as Login, Created, Modified, or
Deleted and a MoType (Managed Object Type) such as
hyperflex.ClusterProfile, compute.Blade, or os.Install (not a complete list).
PowerShell
This example retrieves the entire audit log and groups by both email and
MoType. It aggregates the maximum (latest) date. The output of this
command will show the last date each user interacted with each managed
object type, sorting the results by email. One line of code is all that is
required to summarize the entire audit log:
(Get-IntersightAaaAuditRecordList `
-Apply 'groupby((Email,MoType), aggregate(CreateTime with max as Latest))' `
-Orderby Email `
).ActualInstance.Results
It also takes only one line of code to show the last time each user logged
into Intersight. This command will filter for only login events, group by email
while saving the latest date, and then sort the results in descending order
(most recent event first):
(Get-IntersightAaaAuditRecordList `
-VarFilter 'Event eq Login' `
-Apply 'groupby((Email), aggregate(CreateTime with max as Latest))' `
-Orderby '-Latest' `
).ActualInstance.Results
Email Latest
----- ------
user1@cisco.com 1/23/2021 2:32:46 AM
user2@cisco.com 1/23/2021 2:19:47 AM
user3@cisco.com 1/22/2021 11:12:20 PM
Python
Import statements are specific to just the snippet.
import intersight
import intersight.api.aaa_api
Here is a sample of what that spreadsheet looks like. The script must find
each server by serial number and apply three tags (row, rack, location) to
each server.
FCH2109V2DJ 1 3 austin
FCH2109V2RX 1 4 austin
FCH2109V0JH 2 9 austin
FCH2109V1H3 2 9 austin
FCH2109V0BB 2 10 austin
FCH2109V1FC 2 10 austin
PowerShell
This sample code steps through each line of the CSV file, locating each
server’s Moid by searching for its serial number. It then creates the tag
structure using the values specified in the CSV for that server. Lastly, it sets
the tags. This script does not use hard-coded keys for the tags, instead
using the CSV column headings themselves as keys.
$settings = @{Tags=$tags}
Python
Import statements are specific to just the snippet.
import intersight
import credentials
import intersight.api.compute_api
from csv import DictReader
try:
# Get compute class instance
api_instance = intersight.api.compute_api.ComputeApi(client)
$server = (Get-IntersightComputeRackUnitList `
-Select LocatorLed `
-VarFilter "Serial eq FCH2109VXYZ" `
-Expand LocatorLed `
).ActualInstance.Results
$setting_moid = ((Get-IntersightComputeServerSettingList `
-VarFilter "Server.Moid eq '$($server.Moid)'" `
).ActualInstance).Results.Moid
# determine the current state of the LED and set it to the opposite state
if($server.LocatorLed.OperState -like 'on') {
$setting = ConvertFrom-Json '{"AdminLocatorLedState":"Off"}'
} else {
$setting = ConvertFrom-Json '{"AdminLocatorLedState":"On"}'
}
# initiate the changing of the locator LED
Set-IntersightComputeServerSetting `
-Moid $setting_moid `
-ComputeServerSetting $setting | Out-Null
Write-Host "Previous LED state = $($server.LocatorLed.OperState)"
This can be verified using a GET method in the API Reference tool
(https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/get/
https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/get/):
https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/get/
If an email address has not been specified the Tags field in the response will
be blank as shown below:
{"Key":"AutoRMAEmail","Value":"UserName@AcemCo.com"}
This can be performed using the API Reference tool with a POST operation
(https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/%7BMoid%7D/
https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/%7BMoid%7D/
post/
post/)
post/ as shown in the figure below:
As shown in the figure above, tags are created by setting the Tags property.
{
"Tags": [
{
"Key": "AutoRMAEmail",
"Value": "UserName@AcmeCo.com"
}
]
}
{"Key":"AutoRMA","Value":"False"}
This can be performed using the API Reference tool with the POST method
(https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/%7BMoid%7D/
https://intersight.com/apidocs/apirefs/api/v1/iam/Accounts/%7BMoid%7D/
post/
post/)
post/ as shown in the figure below:
As shown in the figure above, tags are created by setting the Tags property.
{
"Tags": [
{
"Key": "AutoRMA",
"Value": "False"
}
]
}
To opt back into Proactive RMAs (if opted out), the tag value can be
changed to True or removing the tag will result in the same outcome.
Introduction
This manual process may work for a small set of resources but quickly
becomes unmanageable at scale. Application velocity drives business value,
and all applications need infrastructure. To keep pace, IT organizations look
to employ automation into their processes to help reduce time to market
while also attempting to reduce risks and optimize operations.
Automation is the goal but how does an organization ensure their processes
are repeatable, standardized, versioned, and above all, thoroughly tested?
The term Infrastructure as Code (IaC) refers to an automation approach for
managing IT resources that applies the same iterative, repeatable,
documented process of modern software development to infrastructure
components. Adopting an IaC practice enables IT infrastructure to quickly
support and enable change. The foundational principle of IaC is this:
The flow of IaC involves the following (as noted in the image above):
3 When executed, the code takes the necessary actions to create and
configure the resources
One way to think about this is to look at how things operate at an airport.
The air traffic control system is a good example of a declarative control
system. Air traffic controllers tell pilots to take off or land in particular places
but they do not describe how to reach them. Flying the plane, adjusting the
airspeed, flaps, landing gear, etc. falls on the intelligent, capable, and
independent pilot. In a system managed through declarative control,
underlying objects handle their own configuration state changes and are
responsible only for passing exceptions or faults back to the control system.
This approach reduces the burden and complexity of the control system and
allows greater scale.
On the other hand, the imperative way to deliver this resource would be to
run the AWS CLI to launch a VM.
Minimize risk
With version control, the entire configuration of the infrastructure is self-
documented and all changes are tracked over time. Version control tooling
allows operators to easily review the deltas for proposed configuration
changes which typically involve applying a set of tests to evaluate the
expected outcome. This process drastically reduces the risk of unexpected
changes and, because all changes are tracked, offers the ability to quickly
revert to the desired state should problems arise. Likewise, should a
developer who wrote the code choose to leave, this configuration has been
saved in a controlled way, minimizing the risk of losing this intellectual
property.
Audit compliance
Traditional Infrastructure requires a frenzy of activity by administrators to
provide an auditor with what is requested, usually involving custom scripts to
pull together the latest version information across their servers, only to
discover this contains just a fraction of what they are looking for. When the
entire configuration of the infrastructure is self-documented, IT can provide
the network diagram in the form of configuration files that are as up to date
as the last time they were applied.
Lower costs
With the adoption of IaC, an IT operator's time can be better spent working
on forward-looking tasks, such as planning for the next upgrade or features,
resulting in less cost on wasted engineering time. Once systems are no
longer needed, IaC can assist in ensuring these parts are pulled out of
operation. In an on-demand environment, such as a public cloud, costs can
stop accruing immediately, rather than waiting on human intervention. For
environments where the cost has already been incurred in acquiring the
hardware, such as a private data center, the cost savings lie in the ability to
reuse the resources more quickly.
AWS CloudFormation
AWS CloudFormation is Amazon’s response to Infrastructure as Code. It is
an easy way to define a collection of resources and their dependencies in a
template to launch and configure them across multiple AWS Cloud regions
or accounts. These templates are either available in a JSON or YAML format.
Terraform
The above solutions are tied to the respective cloud provider and will not
work for organizations that operate in a hybrid cloud model. Terraform is one
such tool that operates well for both on-premises data centers and public
cloud providers. We will dive deeper into Terraform in the next section.
HashiCorp Terraform
HashiCorp employs the same approach with Terraform as it does with its
many other developer-centric tools by using a single Go-based
binary/executable. This makes development, installation, and portability
incredibly simple.
Terraform offerings
While the core of Terraform is distributed as a single binary/executable, its
consumption may take many different forms.
• Terraform Cloud
• Multi-Tenant SaaS platform
• Team focused
• A consistent and reliable environment
• Terraform Enterprise
• A self-hosted version of Terraform Cloud
• Targeted for organizations with requirements such as security,
compliance, etc.
• No resource limits
• Additional enterprise-grade features such as audit logging
and SAML SSO
Concepts in Terraform
The figure above outlines the Core Terraform workflow, which consists of
three basic steps:
Plan
One of the steps in deploying IaC in Terraform is a planning phase where an
execution plan is created. Terraform will look at the desired state of the
configuration file, then determine which actions are necessary to complete
this successfully.
Apply
The action that commits the configuration file to the infrastructure based on
the steps determined in the Plan step, building out everything that has been
defined.
Providers
A Terraform provider is an abstraction of a target infrastructure provider's
API/service allowing all the capabilities within that API to be configured in a
consistent, schema-defined IaC model. Terraform hosts a public registry,
known as the Terraform Registry, to allow for browsing available providers
and modules (mentioned next) at https://registry.terraform.io/
https://registry.terraform.io/
Modules
A module is a logical container for defining groups of related resources in an
easy-to-consume package. Modules are a great way to share configuration
best practices and mask the complexity of delivering an architectural use
case. The full list of community and vendor contributed modules can be
found on the Terraform Registry, inclusive of documentation and example
usage.
State
One of the most unique capabilities within Terraform is its ability to model
and store the state of managed infrastructure and configuration. Modeling
state in a consistent, ongoing manner allows Terraform to automatically
correlate resource dependencies so that configuration changes are
executed in the appropriate order, helps to keep track of useful metadata,
and helps to improve performance in larger environments.
Cisco and HashiCorp are working together to deliver IaC capabilities across
public and private cloud infrastructure by leveraging their similar and
complementary, declarative models. Together they have delivered unique
providers that can be leveraged to completely deploy private cloud
infrastructures along with private cloud resources. The joint solution
combines the power of Terraform, the provisioning tool for building,
changing, and versioning infrastructure safely and efficiently, with the power
of Intersight and ACI. This combination simplifies, automates, optimizes, and
accelerates the entire application deployment lifecycle across the data
center, edge, colo, and cloud.
With this model, operators can always have access to the latest features and
capabilities that Intersight provides by using the latest version of the
Intersight Terraform provider. Before getting into the details of using the
provider, it is good to review when it does and does not make sense to
manage Intersight resources with Terraform.
chapter. One of the unique and noteworthy features of Terraform is its ability
to track the state of a resource. Tracking the state of cloud infrastructure
helps Terraform automatically determine the dependencies within a set of
resources for lifecycle operations, as well as store infrastructure metadata in
a consistent manner, making it easier to reference existing resources along
with their properties when creating new infrastructure.
A prime example of a task that is not a great fit for the Intersight provider is
an OS install on a server. OS installs are a one-time action, and although a
resource is created, no modifications can be made to that resource directly.
The state is essentially unused in this scenario. It would make more sense to
have a workflow within Intersight Cloud Orchestrator that took in the
required parameters and kicked off the OS install.
Where it does make sense to use the Intersight Terraform provider is for
pools, policies, profiles, and any other Intersight resource that requires
frequent changes or is frequently referenced by other resources. Managing
such resources as code allows operators to deploy new infrastructure
consistently and quickly, continuously track configuration changes over time
using a source control manager such as Github, as well as leveraging CI/CD
pipelines for ensuring the quality of the code being submitted. The next
section will cover specific examples of how to use the Intersight provider to
manage Intersight resources.
With Terraform release 0.13+, a new syntax was introduced for providers to
support different namespaces within the registry. This capability allows
organizations to publish their own modules and providers to the Terraform
registry without having to worry about maintaining their own private instance.
Below is an example of the required provider syntax.
terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "0.1.4"
}
}
}
Please note that the version listed above is the latest at the writing of this
book and will continuously change as newer versions are published. Always
check the Terraform Registry for the latest version. If the markup used above
looks foreign, it is referred to as HashiCorp Configuration Language and is
commonly used throughout HashiCorp’s product offerings. HCL is meant to
be both easy-to-read and machine friendly.
The provider then needs to be configured with the Intersight endpoint, user
API key, and secret, which can be made available as a variable or
referenced to a file, as shown in the below example for defining the
provider:
variable "api_key" {
type = string
description = "Intersight API key id"
}
variable "api_secret_path" {
type = string
description = "Path to Intersight API secret file"
}
provider "intersight" {
apikey = var.api_key
secretkeyfile = var.api_secret_path
endpoint = "intersight.com"}
In the HCL markup above, variables are first defined representing the API
key and secret. Terraform, like most HashiCorp products, is built as a Go
binary and is thus strictly typed (which is a positive attribute). Using variables
in this manner avoids storing confidential credentials in code that is meant to
be tracked in a source control system. Variables can be passed manually via
the Terraform CLI or stored in a file and referenced. Below is an example
.tfvars file for the examples provided in this section.
api_key = "596cc79e5d91b400010d15ad/5f7b3f297564612d33dddbf9/6001a79b7564612d331fb23b"
api_secret_path = "intersight_api_secret"
organization = "default"
Creating resources
One of Intersight’s core features is the ability to define infrastructure by
using policies, profiles, and templates. One basic example of a policy would
be an NTP policy. NTP configuration is a common best practice for most
types of infrastructure and, unfortunately, config drift is common, presenting
a painful challenge for IT operators. Corporate NTP servers typically vary,
based on geographic location, and are often bypassed by externally hosted
servers that are often configured into infrastructure by default.
Intersight allows the configuration of NTP settings as a policy that can then
be referenced by other resources. Below is an example of how to create an
NTP policy resource using the provider.
variable "organization" {
type = string
description = "Name of organization for target resources"
}
// Get organization
data "intersight_organization_organization" "org" {
name = var.organization
}
organization {
object_type = "organization.Organization"
moid = data.intersight_organization_organization.org.moid
}
tags {
key = "location"
value = "austin"
}
}
Almost all resources are tied to one of the organizations which were covered
in the Security chapter of this book. To ensure flexibility, the organization is
passed in from the example variables file shown earlier in this section. The
data designation in the code above represents a data source. Data sources
are used to retrieve information about a resource not locally configured.
Since the default organization was not created by this Terraform code, it can
be retrieved via the data source syntax.
organization {
object_type = "organization.Organization"
moid = data.intersight_organization_organization.org.moid
}
The resource definition above creates a new NTP policy resource within
Intersight and adds a custom tag representing the location for which this
policy applies.
The profile definition is again tagged and references the same organization
as the NTP policy. All that currently exists within this profile is a name and a
tag. The NTP policy resource contains an optional property called
profiles which have not been configured yet. A set, in the case of Terraform
code, is an unordered list or array and can contain a simple variable type like
a string or a complex variable type such as an object. The tags property
shown above is an example of a set variable that contains objects of a set
structure.
The code below shows how the created Server Profile can be linked to the
NTP policy.
organization {
object_type = "organization.Organization"
moid = data.intersight_organization_organization.org.moid
}
tags {
key = "location"
value = "austin"
}
profiles {
moid = intersight_server_profile.server1.id
object_type = "server.Profile"
}
}
Wrapping up
Cisco has taken a giant leap forward with Terraform to bring consistent IaC
automation to the edge, public clouds, and private data centers. The Cisco
providers for Terraform along with Intersight allow different IT teams to
adopt IaC practices without having to become programming experts or
completely re-tool their operations. For example, once the infrastructure
steps have been provisioned, a call to do a system health check can be
made, then a ticketing system can be updated with details of the operation
in a single achievement.
The authors would like to express their thanks to Cynthia Johnson, Sean
McGee, Vance Baran, and David Cedrone for their unwavering support and
encouragement from the initial idea through the final production of this book.
Throughout the creation of the book, the entire Product Management and
Technical Marketing teams for Intersight served as subject matter experts
and encouragers. The authors would like to especially thank David Soper,
Jeff Foster, Jeff New, Gregory Wilkinson, Matt Ferguson, Michael
Zimmerman, Andrew Horrigan, Vishwanath Jakka, Meenakshi Kaushik, Joost
Van Der Made, Jacob Van Ewyk, Gautham Ravi, Matthew Faiello, Chris
Atkinson, Ravi Mishra, Chris O'Brien, John McDonough, and Eric Williams.
Finally, and most importantly, the authors would like to express their
gratitude for the support and patience of their families during this time-
intensive process. Thank you!
Jason www.linkedin.com/in/jason-mcgee-
Principal Architect
McGee b6348894/