the chef prince of azure - chefconf 2015

31
The Chef Prince of Azure HOW 10 TH MAGNITUDE USED CHEF TO FLIP-TURN ZS ASSOCIATES INTO MICROSOFT AZURE ROYALTY John Smyth, Trevor Hess, Mahesh Velaga

Upload: chef

Post on 07-Aug-2015

53 views

Category:

Technology


0 download

TRANSCRIPT

  1. 1. The Chef Prince of Azure HOW 10TH MAGNITUDE USED CHEF TO FLIP-TURN ZS ASSOCIATES INTO MICROSOFT AZURE ROYALTY John Smyth, Trevor Hess, Mahesh Velaga
  2. 2. INTRODUCTIONS 2 Mahesh Velaga, ZS Associates Trevor Hess 10th Magnitude John Smyth 10th Magnitude
  3. 3. 3
  4. 4. CONTACT US John Smyth Is too old for Twitter Trevor Hess @trevorghess Mahesh Velaga @mahesh_velaga 4
  5. 5. OVERVIEW From Business as Usual to Infrastructure as Code Technical Cultural Business 5
  6. 6. ABOUT ZS ASSOCIATES 6 ZS is the worlds largest firm focused exclusively on delivering impact through high-performance sales and marketing solutions SALES + MARKETING SOFTWARE AS A SERVICE Automate key business processes 3,200 PROFESSIONALS 21 OFFICES WORLDWIDE ZS is the worlds largest firm focused exclusively on delivering impact through high-performance sales and marketing solutions 30 + YEARS OF INDUSTRY & DOMAIN EXPERTISE Quota Management Compensation Management & Reporting MBO Planning Territory Management Activity & Call Planning
  7. 7. ABOUT 10TH MAGNITUDE 7 Microsoft Azure Migration Web, Media and Mobile Application Development DevOps and Azure- Enabled Automation Managed Applications and Infrastructure 10th Magnitude was born in the cloud, and offers corporate customers multiple, interconnected paths to Azure success:
  8. 8. ONE CONFIG ERROR AND THE BOSS GOT SCARED The Problem 8
  9. 9. THE SERVER CONFIGURATION PROCESS Lengthy Provision process time of 3 days Manual Half a day of manual server provisioning and validation Prone to Human Error Process involved different systems and people working independently from one another Lacked an Overall Framework Lacked consistency and organization and ability for version control 9
  10. 10. PUT CHEF IN THERE! The Journey to Infrastructure as Code 10
  11. 11. OUR APPROACH 11 Define the Pattern Teach the PatternUse the Pattern Observe the Pattern
  12. 12. OUR APPROACH 12 Define the Pattern Use the Pattern Teach the Pattern Observe the Pattern Define the appropriate toolset Define the development workflow Define the object structure Define the cookbook structure
  13. 13. OUR APPROACH 13 Define the Pattern Use the Pattern Teach the Pattern Observe the Pattern Set up Chef Server, source control, base images, boxes, etc. Create CI Workflows Develop base cookbooks using the development workflow and CI process end-to-end
  14. 14. OUR APPROACH 14 Define the Pattern Use the Pattern Teach the Pattern Observe the Pattern Pair with customer resources on cookbook creation Provide guidance on TDD cookbook development, Continuous Integration, etc. Lead code reviews
  15. 15. OUR APPROACH 15 Define the Pattern Use the Pattern Teach the Pattern Observe the Pattern Be available as SME to customer Observe and assist in creation of tests, cookbooks, and documentation upon request Participate in code reviews
  16. 16. METHODOLOGY Test-Driven Development Red: Write failing test Green: Make the test pass Refactor: Optimize the code Continuous Delivery Using Continuous Integration and tests to validate commits and ensure stable product at all times 16
  17. 17. TOOLS Enterprise Chef 11 Vagrant Git Berkshelf Minitest Foodcritic TeamCity PowerShell Editor of Choice (choose vim) Chef-vault VirtualBox 17
  18. 18. WORKFLOW 1. Local Development with Vagrant Write tests (mini tests) Write Chef recipes Test locally with Vagrant Iterate 2. CI/CD on Code Check In Lint the code with Food Critic Converge and test Cookbook on Vsphere Converge and test Cookbook on Azure Upload to Chef server 18
  19. 19. 19 Developer tests with local suite PushChange Start_here Upon git check in Bump version number and upload to git. foodcritic lint berks install get dependencies berks upload upload to chefci Cookbook CI Pipeline Azure Tests Converge_node.rb: Reserve test VM by moving to Azure Chef environment Converge with knife: Cookbook recipes Run minitest Remove the test VM from Chef and destroy the VM Converge_node.rb: Reserve test VM by moving Vsphere to Chef Environment Converge with knife: Cookbook recipes Run minitest Remove the test VM from Chef and destroy the VM Vsphere Tests Tag and Upload Create a tagged branch in git for this version berks uploadinstall cookbook to zssd Chef Org zschefci Chef: zssd Test nodes only Test VM Test VM Staging QA Dev Productio n
  20. 20. STEP ONE: CREATE THE VM WITH POWERSHELL Azure Create the Virtual Machine Create the cloud service, if required Map appropriate endpoints Join the domain Bootstrap Chef and converge Install Chef Client Create the node and client Update chef vault for client key Set the runlist Force chef run(s) VSphere Create the Virtual Machine Select the appropriate datastore Customize the (sysprepped) OS Set memory and CPU, depending on VM type Set port group and adapter type Join the domain Move to appropriate OU Add drives, depending on VM type Setup WinRM Bootstrap Chef and converge Install Chef Client Create the node and client Update chef vault for the client key Set the runlist Force chef run(s) 20
  21. 21. STEP TWO: CONVERGE THE WEB SERVER WITH CHEF Base OS Configuration Install and configure ZS standard third party software (monitoring, antivirus, etc) Install and configure IIS dependencies Install and configure IIS for ZS web sites and services 21 Enterprise Chef 11 Windows Cookbook IIS Cookbook Webpi cookbook ms_dotnet4 cookbook Minitest-handler cookbook
  22. 22. FLIP-TURNED UPSIDE DOWN The Transformation 22
  23. 23. TECHNICAL Fully automated server provisioning From days to less than an hour Consistent versioned deployment Consistent Azure and VSphere configuration Infrastructure as Code Chef Framework Versioning 23
  24. 24. CULTURAL Infrastructure as Code (Dont touch the servers) Evolving towards a blue-green deployment model 24
  25. 25. BUSINESS Accelerated their Azure migration Frees up IT talent for other projects related to business generation More reliable and dependable infrastructure More rapid deployment of resources 25
  26. 26. VIEW FROM THE THRONE What we learned 26
  27. 27. CODE REVIEWS, ALL TOGETHER NOW! Establish standards Learning Experience Sharing Ideas Just do it! 27
  28. 28. BIG PICTURE Chef isnt just something you buy, its something you do Chef doesnt transform your organization YOU do* *with Chef 28
  29. 29. BIG PICTURE Not everything needs to be a revolution Evolve your infrastructure 29
  30. 30. GO FORTH AND GET WORK DONE! 30
  31. 31. CONTACT US www.10thmangitude.com www.zsassociates.com John Smyth [email protected] Trevor Hess [email protected] @trevorghess Mahesh Velaga [email protected] 31