Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Infrastructure as Code for Beginners

1,070 views

Published on

The slides from my XP Days Germany 2015 Session "Infrastructure as Code" for Beginners.

Published in: Software
  • Be the first to comment

Infrastructure as Code for Beginners

  1. 1. "Infrastructure as Code" für Anfänger XP Days Germany David Völkel 27.11.2015
  2. 2. @davidvoelkel @softwerkskammer @codecentric TDD & Design CD & DevOp
  3. 3. Continuous Integration Automatic Build VCS Application
  4. 4. Automation Quality Reproducible Faster Docs ApplicationVCS
  5. 5. Tip of the Iceberg? AppVCS
  6. 6. Tip of the Iceberg? VM App OS & Packages Config OS & Packages Network VCS
  7. 7. Continuous Delivery Infrastructure? VM App OS & Packages Config OS & Packages Network VCS
  8. 8. Continuous Delivery Infrastructure as Code VM Software OS & Packages Config OS & Packages Network VCS
  9. 9. Agenda 1. Deployment 2. Provisioning 3. Environments 4. VM Management 5. SDN DEMO VM App OS & Packages Config OS & Packages Network
  10. 10. 1.DEPLOYMENT Image: Rigo Peter VM App OS & Packages Config OS & Packages
  11. 11. Deployment SSH/SCP mvn Plugins Server App
  12. 12. Auto Deployment CI Build Pipeline Server Build & Unit Tests App VCS Deployment Integration Tests
  13. 13. App Server Options Distro Package Manager Fat-JARs Image: RRZEicons
  14. 14. 2. PROVISION VM App OS & Packages Config OS & Packages Box by Даниил Пронин from the Noun Project
  15. 15. Snowflake Servers
  16. 16. Snowflake Servers Work of Art
  17. 17. Image: KUKA Systems GmbH Configuration Management Server Provisioning Installation Config VCS
  18. 18. Configuration Management CFEngine Chef Puppet Salt Ansible 90er 00er 10er
  19. 19. Desired State Configuration Declarative Tests itself Idempotent
  20. 20. > mvn package (per jdeb) > scp software_and_provi.deb server # dpkg –i *.deb # puppet apply > smoketest server Server Software OS & Packages Config OS & Packages Our Provision 1.0 Build & Unit TestsVCS Provision Deployment
  21. 21. Refactoring to 2.0 no shell no jdeb faster easier Windows OK
  22. 22. 3.ENVIRONMENTS Computer by Danny Sturgess from the Noun Project VM App OS & Packages Config OS & Packages DEV TEST PROD
  23. 23. Configuration Global vs. Environment mail.send.retry=3 reminder.intervall=7 mysql.url = jdbc:mysql://test-mysql-db/users mySql.driver = com.mysql.jdbc.Driver mySql.user = username mySql.password = secretPassword oracle.url = jdbc:oracle://oracle-test/bills oracle.driver = oracle.jdbc.driver.OracleDriver oracle.user = username2 oracle.password = secretPassword2
  24. 24. Configuration Global vs. Environment mail.send.retry=3 reminder.intervall=7 mysql.url = jdbc:mysql://test-mysql-db/users mySql.driver = com.mysql.jdbc.Driver mySql.user = username mySql.password = secretPassword oracle.url = jdbc:oracle://oracle-test/bills oracle.driver = oracle.jdbc.driver.OracleDriver oracle.user = username2 oracle.password = secretPassword2
  25. 25. Configuration Global vs. Environment mail.send.retry=3 reminder.intervall=7 mySql.driver = com.mysql.jdbc.Driver oracle.driver = oracle.jdbc.driver.OracleDriver mysql.url = jdbc:mysql://test-mysql-db/users mySql.user = username mySql.password = secretPassword oracle.url = jdbc:oracle://oracle-test/bills oracle.user = username2 oracle.password = secretPassword2
  26. 26. Configuration Global vs. Environment deploy(ENV) mail.send.retry=3 reminder.intervall=7 mySql.driver = com.mysql.jdbc.Driver oracle.driver = oracle.jdbc.driver.OracleDriver mysql.url = jdbc:mysql://test-mysql-db/users mySql.user = username mySql.password = secretPassword oracle.url = jdbc:oracle://oracle-test/bills oracle.user = username2 oracle.password = secretPassword2
  27. 27. Latest Config No branching!
  28. 28. 4. VM MANAGEMENT Data Center Server Virtualization by Rahul KULKARNI from the Noun Project VM App OS & Packages Config OS & Packages
  29. 29. Desired State Configuration Drift! Drift
  30. 30. Phoenix Server “clean slate“ Clone Golden Master vs. DSC? Phoenix Image: RoFra
  31. 31. Technology Packer & AWS AMI VMWare VSphere Phoenix Image: RoFra
  32. 32. Security Patches? Rotate by Thomas Helbig from the Noun Project
  33. 33. „Immutable Servers Freeze State Logs Config DB/Storage Image: Deutsche Fotothek
  34. 34. Golden Master VM Image Pipeline VCS Provision DEV VM OS & Packages Clone VM & Provision
  35. 35. Golden Master VM Image Pipeline VCS Provision DEV VM OS & Packages VCS App Code Build & UT Clone VM & Provision
  36. 36. Golden Master VM Image Pipeline VCS Provision DEV VM App & DEV Config OS & Packages Deploy VCS App Code Build & UT Config Clone VM & Provision
  37. 37. Golden Master VM Image Pipeline VCS Provision DEV VM App & DEV Config OS & Packages Deploy VCS App Code Build & UT Config Clone VM & Provision Int Test
  38. 38. Pipeline VCS Provision Deploy VCS App Code Build & UT Config Int Test Deploy Test Test VM App & TEST Config OS & Packages DEV VM App & DEV Config OS & Packages Clone VM & Provision
  39. 39. Pipeline VCS Provision Deploy VCS App Code Build & UT Config Int Test Deploy Test Test VM App & TEST Config OS & Packages Clone VM & Provision
  40. 40. Pipeline VCS Provision Deploy VCS App Code Build & UT Config Int Test Deploy Test Test VM App & TEST Config OS & Packages Clone VM & Provision Deploy Prod …
  41. 41. Golden Master AMI Packer Pipeline VCS Provision Temp Instance Packer
  42. 42. Golden Master AMI Packer Pipeline VCS Provision Temp Instance OS & Packages Packer
  43. 43. Golden Master AMI Packer Pipeline VCS Provision Temp Instance OS & Packages Packer Provisioned AMI
  44. 44. Demo VM App OS & Packages Config OS & Packages Network Ansible Jar Deploy Ansible Provision Vagrant, Packer, Ansible EC2 Module Terraform https://github.com/davidvoelkel/infrastructure-as-code-demo https://youtu.be/AiAOLpshguM
  45. 45. Resumee Version & automate infrastructure Living Documentation Quality, “works on my machine“ Layers top to bottom
  46. 46. @davidvoelkel
  47. 47. Licence Creative Commons Attribution-ShareAlike 3.0

×