ser1906bu vmware and chef - leveraging the vsphere … · · 2017-10-13vmware and chef -...
TRANSCRIPT
SER1906BU
#VMworld #SER1906BU
VMware and Chef -Leveraging the vSphere API Together
VMworld 2017 Content: Not fo
r publication or distri
bution
• This presentation may contain product features that are currently under development.
• This overview of new technology represents no commitment from VMware to deliver these features in any generally available product.
• Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.
• Technical feasibility and market demand will affect final delivery.
• Pricing and packaging for any new technologies or features discussed or presented have not been determined.
Disclaimer
#SER1906BU CONFIDENTIAL 2
VMworld 2017 Content: Not fo
r publication or distri
bution
Agenda
• Introduction
• Current API Overview
• API Discovery 101
• API and Interfaces demo
• Basic what is Chef?
• Traditional knife-vsphere usage
• Why knife-vcenter is so much easier now with this API
• Demo using knife-vcenter with the vSphere REST API
• Demo using kitchen-vcenter and InSpec with the vSphere REST API for full integration test
• Conclusion - Including Takeaways
CONFIDENTIAL 3
VMworld 2017 Content: Not fo
r publication or distri
bution
Introduction
Alan Renouf
– Sr Product Line Manager, VMware
– Book Author
– vExpert
– Personal Blog: http://virtu-al.net/
– Twitter: @alanrenouf
JJ Asghar
– Partner Architect, Chef
– US Patent holder at age 8
– Likes a good beer when he can
– [email protected] || @jjasghar || http://jjasghar.github.io
4
VMworld 2017 Content: Not fo
r publication or distri
bution
vSphere 6.5 API Overview
VMworld 2017 Content: Not fo
r publication or distri
bution
ESXiESXi
vSphere API Interfaces (the big picture)
ESXi
vCenter
vCenter ManagementReporting and Features
SOAP API REST API
SOAP API
vSphere Management SDKs
Perl
.Net
Java
Web Services
Storage Management
ESX Agent Manager
SSO Client
vSphere Storage Policy
vSphere Automation SDK
VMC on AWS
VM Management
VCSA API
Content Library
Tags
REST
Perl
.Net
Java
Python
Ruby
Open Source SDK
pyvmomi (Python)
rbvmomi (Ruby)
govmomi (Go)
Web
Services
Automation / Operator Interfaces
PowerCLI
vCLI
vRealize Orchestrator
VM Management
VCSA API
Content Library
Tags
ESXi Management Reportingand
Features
VMworld 2017 Content: Not fo
r publication or distri
bution
Transforming vCenter APIsDeveloper and Automation friendly API and interfaces that simplify automation and development.
REST API
vCenter
Server
SDKsAutomation
Tooling
REST
based tools
• REST APIs for VM Management
• Simplified and Modern API Design
• Enables easy access to automation from standard tooling
• Designed with Automation and DevOps in mind
• Full featured SDKs, CLI and Workflow access
Overview
Key Use Case: VM Automation and Development
Benefits
• Reduces API development complexity and time
• Access via modern automation and development processes for
consistency and repeatability
• Simplified API model
• Single point of access for all API samples
Benefits
7
Docs
VMworld 2017 Content: Not fo
r publication or distri
bution
VM Management - REST API’s
8
Manage the following areas from our consistent set of tooling:
• Work with VM operations • Power actions• Hardware
• Boot • Device• Disk• CDROM• CPU• Disk
• Ethernet• Floppy• Memory• Parallel• Serial• Adapter
• Sata• SCSI
• Cluster• Datacenter• Datastore• Folder• Host• Network• Resource pool• Tag Category• Tagging
VMworld 2017 Content: Not fo
r publication or distri
bution
VCSA - REST API’s
9
Manage the following areas from our consistent set of tooling:
• Appliance Access (DCUI/Shell/SSH)• Appliance User accounts• Check the Health of the appliance (Load/Mem/Database/Storage/Etc..)• Monitoring of services and statistics• Configure and test Networking aspects including:
• Hostname• DNS Domains/Servers• Network Interfaces• Firewall Rules• Proxy Settings• Routes
• Perform Backup/Recovery of the appliance• Configure System settings:
• List and resize storage• NTP/Timesync Settings • View System Versions and Uptime• SNMP Settings• Shutdown and reboot• Update
VMworld 2017 Content: Not fo
r publication or distri
bution
Content Library - REST API’s
10
Manage the following areas from our consistent set of tooling:
• Configure Global Settings
• Work with Local Libraries
• Enable Publish and Subscribe features
• Sync options and actions
• Work with library items
• Upload and download of library items
• Deploy from content library
• Work with media library itemsVMworld 2017 Content: Not fo
r publication or distri
bution
API Discovery 101
VMworld 2017 Content: Not fo
r publication or distri
bution
API Explorer
12
• Available at
https://vchostname/apiexplorer
• Navigate REST based APIs for
• vCenter
• Appliance Management
• Tags
• Content Library
• API Query
• Easily understand the API model
• Determine required fields
• Easily understand the request body
• Detailed filter information
• List of response messages and examples
• Live “Try it out” feature
• Sample Curl statement after try it out
VMworld 2017 Content: Not fo
r publication or distri
bution
Choice of SDKs and Automation tools
13
• vSphere Automation SDKs for multiple languages
• Choice of CLIs• PowerCLI Cmdlets• Datacenter CLI - DCLI
• Consistently named with the APIs
• vRealize Orchestrator Integration
• Docs are automatically generated• REST & SDKS
• More to come in the future
REST
Java
.NET
Python
Ruby
Perl
DCLI
PowerCLI
Docs
vRO Plugins
API & SDK &
Language
Specific Docs
Documentation
Automation CLIs
& Workflows
VMworld 2017 Content: Not fo
r publication or distri
bution
Open Sourced vSphere Automation SDKs
14
• Available at
https://vmware.github.io/vsphere-automation-sdk/
• VMware maintained
• Get up and running in less than 5 minutes!
• SDKs for managing vSphere and VMC in
• REST
• Java
• Python
• Perl
• .Net
• Ruby
• Full of samples
• Community contributions welcome
VMworld 2017 Content: Not fo
r publication or distri
bution
vSphere API Demo
VMworld 2017 Content: Not fo
r publication or distri
bution
Configuration Management and why you want it.
• Day 1 and Day 2 configuration
• Configuration drift doesn't happen
• Scalability
16
VMworld 2017 Content: Not fo
r publication or distri
bution
Chef
• Manages deployment and on-going automation
• Define reusable resources and infrastructure state as code
• Scale elegantly from one to tens of thousands of managed nodes across multiple complex environments
• Community, Certified Partner, and Chef supported content available for all common automation tasks
• Infrastructure automation and delivery at scale
windows_feature ‘IIS-WebServerRole’ doaction :install
end
windows_feature ‘IIS-ASPNET’ doaction :install
end
iis_pool FooBarPool doruntime_version “4.0”
action :addend
package "apache" doaction :install
end
template “/etc/httpd/https.conf” dosource “httpd.conf.erb”mode 0075owner “root”group “root”
end
service “apache2” doaction :start
done
VMworld 2017 Content: Not fo
r publication or distri
bution
2-
Managing Additional Systems
©2016 Chef Software Inc.
• Now
Your Laptop
Web Server
Web ServersYour Laptop
Future
More complex
to manage
VMworld 2017 Content: Not fo
r publication or distri
bution
2-
Example: Package
©2016 Chef Software Inc.
• package 'httpd' do
• action :install
• end
The package named 'httpd' is installed.
https://docs.chef.io/resource_package.html
VMworld 2017 Content: Not fo
r publication or distri
bution
Overview
Companies can turbo-charge their value creation by using VMware Cloud on AWS
for development. Using VMware Cloud on AWS, a company can use Chef to
create as many developer environments as needed. What’s more, developers
can seamlessly move their workloads into production in the Software Defined
Data Center, since VMware Cloud uses the same APIs as on-premise VMware
based Data Center.
The ability to have a development environment in the cloud that mirrors your
production environment in the Data Center will increase your team’s velocity
while InSpec to verify compliance automatically across both cloud and data
center environments keep it secure.
VMworld 2017 Content: Not fo
r publication or distri
bution
The Chef Automate PlatformContinuous Automation for High Velocity IT
Workflow • Local development • Integration • Tooling (APIs & SDKs)
COLLABORATE
▪ Package
▪ Test
▪ Approve
BUILD
▪ Provision
▪ Configure
▪ Execute
▪ Update
DEPLOY
▪ Secure
▪ Comply
▪ Audit
▪ Measure
▪ Log
MANAGE
Infrastructure Automation Compliance AutomationApplication Automation
OSS AUTOMATION ENGINES
Increase Speed
▪ Package infrastructure and app
configuration as code
▪ Continuously automate infrastructure
and app updates
Improve Efficiency
▪ Define and execute standard
workflows and automation
▪ Audit and measure effectiveness of
automation
Decrease Risk
▪ Define compliance rules as code
▪ Deliver continuous compliance as
part of standard workflow
VMworld 2017 Content: Not fo
r publication or distri
bution
from idea to ship with Chef and VMwareIdea Ship
Local Dev IntegrationShared Dev
Development Speed
Pre-Production
Compatibility
Production
TEST KITCHEN
Environment + Node Compliance
KNIFE CHEF CLIENT
INSPEC
VMworld 2017 Content: Not fo
r publication or distri
bution
Demo using knife-vsphere with the vSphere SOAP API
VMworld 2017 Content: Not fo
r publication or distri
bution
Why knife-vcenter is so much easier now with this API
• https://github.com/chef-partners/knife-vsphere/blob/master/lib/chef/knife/vsphere_vm_list.rb#L63-L69
• https://github.com/chef/knife-vcenter/blob/master/lib/chef/knife/vcenter_vm_list.rb#L36-L64
CONFIDENTIAL 24
VMworld 2017 Content: Not fo
r publication or distri
bution
Demo using kitchen-vcenter and InSpec with the vSphere REST API for full integration test
VMworld 2017 Content: Not fo
r publication or distri
bution
Lets make it live! (Github and rubygem push)
VMworld 2017 Content: Not fo
r publication or distri
bution
What about VMware Cloud on AWS?
VMworld 2017 Content: Not fo
r publication or distri
bution
VMware Cloud on AWS
28
AWS Global Infrastructure
VMware Cloud™ on AWSPowered by VMware Cloud Foundation
AWS Global Infrastructure
vSphere vSAN NSX
vCenter
• ESXi on Dedicated Hardware
• Support for VMs and Containers
• vSAN on Flash and EBS Storage
• Replication and DR Orchestration
• NSX Spanning on-premises and Cloud
• Advanced Networking & Security Services
AWS Global Infrastructure
• Same vCenter Endpoint
• Focus on REST APIs
• Same tools, different VC!
• Chef integrates natively with the vSphere REST Endpoint
• Repoint to VMware Cloud on AWS
• Private cloud and Public cloud automation has never been
easier with VMware and Chef together!VMworld 2017 Content: N
ot for publicatio
n or distribution
Conclusion - Including Takeaways
• #1: It is easy to navigate the vSphere API and there are multiple tools to do so
• #2: It is easy to leverage Chef to declare your infrastructure as code in the vSphere REST API
• #3: You can use the same Automation Interfaces in your own datacenter or using VMware on AWS
• Example code is at: https://github.com/jjasghar/vmworld2017-demo || https://git.io/v53YZ
CONFIDENTIAL 29
Come to the Chef booth or come find JJ!
VMworld 2017 Content: Not fo
r publication or distri
bution
VMworld 2017 Content: Not fo
r publication or distri
bution
VMworld 2017 Content: Not fo
r publication or distri
bution