The document discusses automating the deployment of a VMware vCloud Hybrid Service (vCHS) using Puppet. It describes using Puppet to deploy and configure the various vCHS components through their respective APIs, including vCenter, vShield, and vCloud Director. It addresses challenges in automating these components and proposes treating everything as a native Puppet resource, with a "transport" resource to handle connecting to the different component APIs over SSH or REST.
3. 3 Confidential
vCloud Hybrid Service
VMware vCloud
Hybrid Service
Your Data Center Software-Defined
Data Center
VMware vSphere &
vCloud Suite
Existing & New Apps
Seamless Networking
Common management
One Support call
7. 7 Confidential
Click Fail
Add VPC Hosts to VCSA
§ Continuing from the vCenter view of the vSphere Web Client
§ In the main content pane, click Related Objects > Clusters
§ Click on VPC on the list
§ Click the second plus icon to add a host
• Host name: Enter first host FQDN
• Location: Confirm the location is set.
• Click NEXT
§ …
§ Repeat Manually?
11. 11 Confidential
Automation Challenges
§ Service APIs:
• vCenter: vSphere API (soap)
• vCNS: vShield API (REST)
• vCD: vCD API (REST)
§ vCenter/vCNS servers are appliances
12. 12 Confidential
Why not ‘puppet device’?
§ Limited to one device at a time:
Puppet Management
Server
VMware vCenter
VMware vShield
Datacenter
ESX
ESX
ESX
Datacenter
ESX
ESX
vSphere API
vShield API
Edge
13. 13 Confidential
Solution: Take the road less traveled
§ Everything is a Native Resource
§ Transport to the rescue
• vCenter/vCNS Appliance: SSH
• vCenter API: RbVmomi
• vShield API: rest-client + subset of savon project
• vCD API: rest-client
20. 20 Confidential
Transport
§ Persistent shared connection
§ Connection cleanup after catalog apply
§ Open to supporting additional transport
• VMware-RabbitMQ (REST)
26. 26 Confidential
Metaprogramming
Good
§ Reduces boiler plate code
§ No more API ‘transfer’ bugs
§ API reference = Resource reference
Bad
§ Difficult to debug
§ Fixing API issues results in surprises
§ Not all APIs are designed to be idempotent
• action => { :create, :modify }
28. 28 Confidential
What the scope?
§ Fully qualify ::class::var
§ Fix your template @var, scope.lookup(‘::class::var’)
29. 29 Confidential
Where’s my HOME?
§ Exec specify HOME.
§ Providers Fix:
if respond_to? :has_command
has_command(:brew, "/usr/local/bin/brew") do
environment({ 'HOME' => ENV['HOME'] })
end
else
commands :brew => "/usr/local/bin/brew”
end
30. 30 Confidential
Puppet Wat
Boolean:
§ adrientthebo/boolean
§ vmware_lib property
§ Symbool in Hash
What the undef?
§ Careful about behavior
ENC Data
§ ENC integer .to_s
31. 31 Confidential
Where we are Today
§ Deploy VPC: #
§ 95% reduction in deployment time
§ Configuration Management = Version
§ Metrics:
• 47 Modules
• 70 Custom Resources
• 1400 Resources
32. 32 Confidential
Work at VMware
Challenges:
§ Software Defined Datacenter
• Data driven configuration management
§ Software Defined Networking
• vCNS, Nicira VSX
§ Scale + Speed
• 10X, 100X, 1000X ?
• Faster !!! Now !!!
33. 33 Confidential
Thanks!
§ Nicholas Weaver
§ Randy Brown
§ Shawn Holland
§ Floyd Arguello
§ David Scherer
§ Ryan Zenker
§ Justin Guidroz
§ Dan Pittman
§ Branan Purvine-Riley
§ Zach Leslie
§ vCHS R&D Team