9. VMware and SDKs
• SDKs? More than one?
– VMware vSphere Web Services SDK
– VMware VI (vSphere) Java API
10. VMware and SDKs
• VMware vSphere Web Services SDK
– Official SDK
– Supported by VMware
– Complicated
– Architecture based on
• managed objects (server)
• managed object reference (client)
• data objects
11. vSphere server
VMware and SDKs
VirtualMachine
Managed
object
GuestInfo
data object
vSphere client application
Managed object
reference to a
VirtualMachine
GuestInfo
data object
data objects
network
connection
12. VMware and SDKs
• Example: VMWare Event History
• Reads the event history from VMWare
• > 100 (!!!) lines using vSphere Web
Services SDK
17. VMware and SDKs
• VMware VI Java SDK
– Open source project created by Steve Jin
from VMware R&D
– http://vijava.sourceforge.net/
– Simplify the use of VI SDK and improve the
performance
– Less lines of code, much faster, and much
more readable code
21. VMware and SDKs
• Small service implemented in Java
• SOAP-interface
• Requires JBoss 5
• Add, delete, start, stop, change
network, … etc.
• (will be upgraded to use JBoss 7,
REST, Java EE 6 soon)
22.
23. Chef
"Chef is like a little system admin robot ...
you tell it how you want your system
configured, and it will do all the dirty
work.”
25. Chef
• Node:
– Any (virtual) server configured to be
maintained by a chef-client
– Chef-client runs on each node
26. Chef
• Workstation:
– Computer to run Knife
– To synchronize with Chef repo
– Interact with single Chef server
– Develop Cookbooks and Recipes
– Use Knife to upload items from Chef repo
to Chef server
29. Chef
• Linux-installation
1. FAI (http://fai-project.org/) for basic setup
2. Chef for additional APT-packages
3. Chef for middleware installation
30. Chef and JBoss
Java Magazin 11.12:
Automatisierung nach Chef-Rezept
Automatisiertes Deployment von
JBoss Middleware
31. Chef and JBoss
• Automatic deployment of JBoss application
server using Chef
• Components:
• JBoss EAP 5/6 preconfigured in SVN
• JBoss Operations Network (JON): Monitoring-
solution for e.g. JBoss
• JON Agent: Agent scanning JBoss-processes
• Remote-CLI: CLI running JavaScript-files
accessing the JON-API
34. Chef and JBoss
• JON/RHQ has a remote API
– JON/RHQ-CLI with JavaScript-files
– JON/RHQ-JARs with Java
• Executing JavaScript-files using the
CLI:
– rhq-cli.sh –f import-servers.js
-s ${RHQ_SERVER} –u user –p pwd
35. Chef and JBoss
1. Import JON-Agent
2. Import JBoss EAP 5/6
3. Change settings
42. Chef and JBoss
• UPD: Just works!
• TCP
– Move cluster-config from XML to
Properties-file
– Use Chef to modify Properties-file
Notas do Editor
- Sysadmins never have time- Clicking in vSphere client is boring- Setting up JBoss manually is a PITA- Manual processes are error-prone- Donkey work should be automated- Don’t touch the production-system!!!
Solution based on VMware, Debian Linux,JBoss, JON/RHQ and Chef
Managed Objects:Exist on a vSphereserverRepresent vSphere services and componentsManaged object referencesClient references to server-side objectsClient application uses ManagedObjectReference (MOR)MOR is unique and persistent during an object’s lifetimeData objectsContain information about managed objectsClient application sends/receives data objects
Chef is an open-source automation platform built to address the hardest infrastructure challenges on the planet.
FAI - Fully Automatic InstallationFAI is a non-interactive system to install, customize and manage Linux systems and software configurations on computers as well as virtual machines
-IPAdressenVerwaltungPool mit VM-NamenF5 automatisieren