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.

Moving a Windows environment to the cloud - DevOps Galway Meetup

45 views

Published on

DevOps Galway Meetup, 27 September 2018

Published in: Software
  • Be the first to comment

Moving a Windows environment to the cloud - DevOps Galway Meetup

  1. 1. Moving a Windows environment to the cloud Giulio Vian giuliovdev@hotmail.com @giulio_vian http://blog.casavian.eu/
  2. 2. Tips & traps
  3. 3. Initial State
  4. 4. IaaS
  5. 5. Automation Pillars Provisioning Configuration Deployment
  6. 6. Azure Pipelines Technologies
  7. 7. Automation Pillars Network Virtual Machines OS Config, Libraries, Runtimes Apps Cloud Services DatabasesAzure Pipelines
  8. 8. Boundaries Subscriptions =>Isolation Resource Groups =>Security Boundaries
  9. 9. Uniqueness Storage Accounts Key Vaults Function Apps Data Lake Store Container Registries SQL Server Names
  10. 10. Regions idiosyncrasies Paired regions VM families and size
  11. 11. Tips Blob & File Storage bootstrapping Key Vault Terraform DSC Azure DevOps Pipelines
  12. 12. Better luck next time Error: Error applying plan: azurerm_lb_probe.lb_probe_http: Error Creating/Updating LoadBalancer network.LoadBalancersClient#CreateOrUp date: Failure sending request: StatusCode=0 -- Original Error: Put https://management.azure.com/subscript ions/12345678-9abc-def0-1234- 56789abcdef0/resourceGroups/qa/provide rs/Microsoft.Network/loadBalancers/qa- loadbalancer?api-version=2017-09-01: http: ContentLength=1655 with Body length 0
  13. 13. Provisioning
  14. 14. Terraform DSL resource "azurerm_virtual_machine" "vm_demo" { name = "demovm" location = “northeurope" 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-1803-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 } }
  15. 15. Language Limits Loop are hard Nested loop almost impossible Ifs are hard HCL parser idiosyncrasies Regex might be troublesome is not unusual
  16. 16. Caveat Refactoring is hard Careful with naming State mismatch
  17. 17. Active Directory is a gift and a curse Monk © USA networks
  18. 18. Configuration = Application stack Pillar
  19. 19. Desired State Configuration (DSC) Configuration FourthCoffee { # 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
  20. 20. Ansible --- - hosts: webservers vars: http_port: 80 max_clients: 200 remote_user: root tasks: - name: get latest version yum: name: httpd state: latest - name: write the config file template: src: /srv/httpd.j2 dest: /etc/httpd.conf notify: - restart apache - name: ensure running service: name: httpd state: started handlers: - name: restart apache service: name: httpd state: restarted
  21. 21. Deployment = CI/CD Pipeline Pillar Azure Pipelines Formerly known as
  22. 22. Deployment groups Local agent Service account Azure Pipelines
  23. 23. Configuration data Variable groups Recursive, not Nested Secure/secret/hidden variables Azure Key Vault Azure Pipelines
  24. 24. Wrap-up 26
  25. 25. Myth #7 DevOps is Only for Open Source Software
  26. 26. People Teamwork Endorsement
  27. 27. Investment Training Resources Tools Quality
  28. 28. Technical debt
  29. 29. Bio in pictures 31 giulio.dev@casavian.eu @giulio_vian http://blog.casavian.eu/ https://tfsaggregator.github.io Hardware spec: 1KB RAM (upg. 16KB) 4KB ROM First computer Companies Communities
  30. 30. 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/ 32
  31. 31. 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/ 33
  32. 32. 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 34
  33. 33. 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://www.powershellgallery.com/ https://docs.microsoft.com/en-us/powershell/dsc/overview https://itrevolution.com/devops-handbook-debunking-devops-myths/ https://docs.ansible.com/ 35
  34. 34. Brick by brick

×