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.

There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018

167 views

Published on

devopsdays Copenhagen
April 24-25, 2018
https://www.devopsdays.org/events/2018-copenhagen/

In this talk, you will hear about the DevOps journey in our company, from the initial brown-field all-manual state, to our current partially automated situation and the strategic destination of a fully automated and monitored process.
In equilibrium between an high-level view and useful practical tips, we will touch on what informed our decisions, in terms of priorities and technologies, some lessons learned in setting up Infrastructure-as-Code using Terraform for Azure, and how the legacy constraints helped or hindered.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

There and Back Again (My DevOps journey) - DevOps Days Copenhagen 2018

  1. 1. There and Back Again a DevOps journey Giulio Vian 25th April 2018 giulio.dev@casavian.eu @giulio_vian
  2. 2. Few words about me 2 giulio.dev@casavian.eu @giulio_vian http://blog.casavian.eu/ https://tfsaggregator.github.io Hardware spec: 1KB RAM (upg. 16KB) 4KB ROM
  3. 3. What we will talk about? Introduction Company state & Whys What’s the plan? Infrastructure-as-Code Layer 1 – Terraform Layer 2 – DSC Layer 3 – Pipelines Wrap-up 3 100-level Deck on SlideShare Bibliography at the end
  4. 4. Introduction Company state & Whys
  5. 5. No green-field 3 Active Directory domains + workgroup 3 test environments 2 production environments All manually built Mainly manual deployments TeraByte-size SQL instances VPN connections Centralized version control 4 source code branches
  6. 6. Technology soup Hosting OS & DB Language
  7. 7. Most important applications use
  8. 8. Issues Downtime New releases Windows Update Lack of Scalability Don’t touch it mindset
  9. 9. Growth crisis
  10. 10. What’s the plan?
  11. 11. Myth #7 DevOps is Only for Open Source Software
  12. 12. People New hires VP of Technology Scrum Master DevOps Lead Agile training
  13. 13. Investment Training Resources Tools Quality
  14. 14. R e b i u l d
  15. 15. Automation Pillars Infrastructure Application stack Pipelines
  16. 16. Execution environment Operating System O.S. Modules Local Services, Libraries Application Network & External Services Data 16
  17. 17. To the cloud
  18. 18. Summary Everything automated Nothing comes for free Arrange technologies Spread knowledge
  19. 19. Infrastructure Pillar
  20. 20. Terraform DSL resource "azurerm_virtual_machine" "vm_demo" { name = "demovm" location = "westeurope" resource_group_name = "tf-demo" network_interface_ids = ["${azurerm_network_interface.vm_demo.id}"] vm_size = "Standard_B2s" storage_image_reference { publisher = "MicrosoftWindowsServer" offer = "WindowsServerSemiAnnual" sku = "Datacenter-Core-1709-smalldisk" version = "latest" } storage_os_disk { name = "demovm-osdisk" caching = "ReadWrite" create_option = "FromImage" } storage_data_disk { name = "demovm-datadisk" create_option = "Empty" lun = 0 disk_size_gb = "10" } os_profile { computer_name = "DEMOVM" admin_username = "${var.vm_admin_username}" admin_password = "${var.vm_admin_password}" } os_profile_windows_config { provision_vm_agent = true enable_automatic_upgrades = false } }
  21. 21. How it works Command line tool terraform init terraform plan -out temp.json terraform apply temp.json Resource providers State (metadata)
  22. 22. Things to get right State in reliable share location Azure Storage, S3 Folder structure Naming Source control
  23. 23. Before you do anything rash, like pressing another button, may I make an alternative suggestion? Doctor Who © BBC Story 79 Season 12, Episode 20
  24. 24. Summary Learn Terraform way Learn its role Think, don’t hack Easy to drop in pipelines …but will you do it?
  25. 25. Application stack Pillar
  26. 26. Desired State Configuration (DSC) Configuration MyBox { # Install the IIS role WindowsFeature IIS { Ensure = "Present" Name = "Web-Server" } # Install the ASP .NET 4.5 role WindowsFeature AspNet45 { Ensure = "Present" Name = "Web-Asp-Net45" } #... } Reboots Modes Local / Push Pull ConfigurationMode ApplyOnly ApplyAndMonitor  ApplyAndAutocorrect PowerShell Gallery
  27. 27. DSC best friend Configuration MyOtherBox { #... cChocoInstaller InstallChoco { DependsOn = '[Script]SetRemoteSignedExecutionPolicy' InstallDir = $chocoDir } cChocoPackageInstaller Chrome { Name = 'googlechrome' DependsOn = '[cChocoInstaller]InstallChoco' Ensure = 'Present' } #... } Chocolatey Package Manager Endorsement? No trust? Own Internal Package Repository Server Study chocolateyInstall.ps1
  28. 28. Working together (upload local scripts) Custom Pull Server Pushing from Terraform via Deploy pipeline step Azure Automation
  29. 29. Summary Best friend for Windows Robust Easy to centralize Plan for security Plan for modularity
  30. 30. CI/CD Pipeline Pillar
  31. 31. Working together (2) Version Control Infrastructure as Code Defining releases Access control Authorization Auditing
  32. 32. Pipelines unfolding one pipeline is not enough for all of us… Integral deploy Über-arching test and deploy Partial paths Just DB or App Hotfix path Other operations Disaster Recovery
  33. 33. Wrap-up 33
  34. 34. Working software over comprehensive documentation IaC embodies this Agile Principle!
  35. 35. Other interesting topics In progress Documentation Agile training Task force Future Backlog Trunk-based development Feature toggles Database migrations Architectural redesign Doctor Who © BBC Story 214a Series 6, Episode 1
  36. 36. To know more Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation — J.Humble, D.Farley (Addison-Wesley) https://www.amazon.com/Continuous- Delivery/dp/0321601912/ The DevOps Handbook — G.Kim, P.Debois, J.Willis, J.Humble (IT Revolution Press) https://www.amazon.com/DevOps-Handbook- World-Class-Reliability- Organizations/dp/1942788002/ 36
  37. 37. To know more (cont’d) Terraform - Up and Running: Writing Infrastructure as Code — Y.Brikman (O′Reilly) https://www.amazon.co.uk/gp/product/1491 977086/ The DSC Book — Don Jones and Melissa Januszko (O′Reilly) https://leanpub.com/the-dsc-book 1491977086/ 37
  38. 38. To know more (cont’d again) Refactoring Databases — Scott J Ambler and Pramod J. Sadalage (Addison-Wesley) https://www.amazon.com/Refactoring-Databases- Evolutionary-paperback-Addison-Wesley/dp/0321774515/ DevOps on the Microsoft Stack — Wouter de Kort (Apress) https://www.amazon.com/DevOps-Microsoft-Stack-Wouter- Kort/dp/1484214471/ Beginning Build and Release Management with TFS 2017 and VSTS — Chandrasekara, Chaminda (Apress) http://www.apress.com/gp/book/9781484228104 38
  39. 39. Links https://continuousdelivery.com/ https://www.terraform.io/ https://github.com/giuliov/terraform-fun https://azure.microsoft.com/en-us/services/key-vault/ https://docs.microsoft.com/en-us/azure/best-practices-availability-paired-regions https://martinfowler.com/articles/evodb.html http://databaserefactoring.com/ http://agiledata.org/essays/databaseRefactoring.html http://martinfowler.com/articles/feature-toggles.html https://launchdarkly.com/ https://blogs.msdn.microsoft.com/buckh/2016/09/30/controlling-exposure-through-feature-flags-in-vs-team-services/ http://www.powershellgallery.com/ https://docs.microsoft.com/en-us/powershell/dsc/overview https://itrevolution.com/devops-handbook-debunking-devops-myths/ 39
  40. 40. Brick by brick

×