Infrastructure as Code


Published on

Published in: Technology, Education
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • - 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
  • - Software zurRechenzentrumsvirtualiserungfür x86-64-basierte Computersysteme-
  • - Software zurRechenzentrumsvirtualiserungfür x86-64-basierte Computersysteme-
  • 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
  • Infrastructure as Code

    1. 1. Sascha Möllering | AGInfrastructure as Code
    2. 2. About meSascha Mölleringsascha.moellering@zanox.comSoftware Engineering Team AG
    3. 3. Agenda• Problem?• VMware and SDKs• Chef• Chef and JBoss• What’s next?• Q&A
    4. 4. Problem?
    5. 5. Problem?
    6. 6. Problem?
    7. 7. VMware and SDKs
    8. 8. VMware and SDKs• SDKs? More than one?– VMware vSphere Web Services SDK– VMware VI (vSphere) Java API
    9. 9. 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
    10. 10. vSphere serverVMware and SDKsVirtualMachineManagedobjectGuestInfodata objectvSphere client applicationManaged objectreference to aVirtualMachineGuestInfodata objectdata objectsnetworkconnection
    11. 11. VMware and SDKs• Example: VMWare Event History• Reads the event history from VMWare• > 100 (!!!) lines using vSphere WebServices SDK
    12. 12. VMware and SDKs
    13. 13. VMware and SDKs
    14. 14. VMware and SDKs• Same example using VMware VI JavaSDK: 28 lines
    15. 15. VMware and SDKs
    16. 16. VMware and SDKs• VMware VI Java SDK– Open source project created by Steve Jinfrom VMware R&D–– Simplify the use of VI SDK and improve theperformance– Less lines of code, much faster, and muchmore readable code
    17. 17. VMware and SDKs
    18. 18. VMware and SDKs
    19. 19. VMware and SDKs
    20. 20. VMware and SDKs• Small service implemented in Java• SOAP-interface• Requires JBoss 5• Add, delete, start, stop, changenetwork, … etc.• (will be upgraded to use JBoss 7,REST, Java EE 6 soon)
    21. 21. Chef"Chef is like a little system admin robot tell it how you want your systemconfigured, and it will do all the dirtywork.”
    22. 22. Chef
    23. 23. Chef• Node:– Any (virtual) server configured to bemaintained by a chef-client– Chef-client runs on each node
    24. 24. 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 repoto Chef server
    25. 25. Chef• Knife– Command-line tool– Provides interface between local Chef repoand Chef server
    26. 26. Chef
    27. 27. Chef• Linux-installation1. FAI ( for basic setup2. Chef for additional APT-packages3. Chef for middleware installation
    28. 28. Chef and JBossJava Magazin 11.12:Automatisierung nach Chef-RezeptAutomatisiertes Deployment vonJBoss Middleware
    29. 29. Chef and JBoss• Automatic deployment of JBoss applicationserver 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-filesaccessing the JON-API
    30. 30. Chef and JBoss
    31. 31. Chef and JBossAutodiscoveryQueue
    32. 32. Chef and JBoss• JON/RHQ has a remote API– JON/RHQ-CLI with JavaScript-files– JON/RHQ-JARs with Java• Executing JavaScript-files using theCLI:– –f import-servers.js-s ${RHQ_SERVER} –u user –p pwd
    33. 33. Chef and JBoss1. Import JON-Agent2. Import JBoss EAP 5/63. Change settings
    34. 34. Chef and JBoss
    35. 35. Chef and JBoss
    36. 36. Chef and JBoss
    37. 37. Chef and JBoss
    38. 38. VMware and SDKs
    39. 39. Chef and JBossAnd Clustering?
    40. 40. Chef and JBoss• UPD: Just works!• TCP– Move cluster-config from XML toProperties-file– Use Chef to modify Properties-file