Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AzureBootcamp2022: Challenges with IaC and AppS...

AzureBootcamp2022: Challenges with IaC and AppService by Matthias Junker & Christof Leuenberger

This session is one of the sessions of Azure Bootcamp Switzerland 2022.
www.azurebootcamp.ch

⭐️ CHALLENGES WITH INFRASTRUCTURE AS CODE AND AZURE APP SERVICE#
Our team is building a platform for Mobiliar’s hundreds of frontend apps on Azure. The large scale, enterprise setting and zero-downtime requirement led us to some unique challenges that we would like to share with you!
🙂 Christof Leuenberger ⚡️ IT Architect and Product Owner @ Die Mobiliar
🙂 Matthias Junker ⚡️ Freelance Full Stack Software Architect / Engineer @ Software Catering

More Decks by Azure Zurich User Group

Other Decks in Programming

Transcript

  1. Challenges with Infrastructure as Code and Azure App Service Azure

    Bootcamp – Bern Switzerland 10. May 2022 Matthias Junker & Christof Leuenberger
  2. 8/8/2022 3 Our team is building a platform for Mobiliar's

    hundreds of frontend apps on Azure. The large scale, enterprise setting and zero-downtime requirement led us to some unique challenges that we would like to share with you!
  3. Standard Disclaimer • These slides are intended for educational purposes

    only and for the personal use of the audience. They are not intended for wider distribution outside the intended purpose without presenter approval. • The views and opinions expressed in this presentation are those of the authors and do not necessarily reflect the official policy or position of die Mobiliar. • The material is distributed on as "as is" basis without any warranty either expressed or implied. 08.08.2022 5
  4. die Mobiliar • is Switzerland's oldest insurance company, founded in

    1826 • has over 6000 employees that serve over 2 mio. customers • develops most core insurance systems in-house • runs an extensive IT landscape on-premise and is making it's way into the Azure cloud 08.08.2022 7
  5. RWC Stack • We apply the micro service approach to

    the frontend as well as the backend • We manage around 175 Single Page Apps • Applications are based on a technology stack, solving common problems and making development more efficient and secure • Since our move to the cloud, we have been building a platform on top of Gitlab and Azure to build, deploy and host Single Page Apps • Running in production for > 1 year. Around 25% of all Single Page Apps run in the cloud. Tech Stack & Toolchain 08.08.2022 8
  6. Initial Approach • Single Terraform State • Use Terraform for:

    − Provisioning − Deploy − Destroy 08.08.2022 19
  7. Problems • Corrupted Terraform State: No way to recover −

    Terraform Provider upgrade − Cancelled deployment pipeline − Bugs in IaC library • Only destroy all-or-nothing possible • Downtime in case of problems • Teams cannot independently destroy/provision infrastructure • Manual process involved (Admin consent for App Registration) • External process for Certificates (DigiCert) • Pipeline duration 08.08.2022 20
  8. Considerations • Availability • Provisioning/Deployment duration • Autonomy: Teams can

    independently destroy/provision infrastructure • Simplicity/Ease of use • Complexity (Maintenance) 08.08.2022 21
  9. Challenges: IaC with Terraform 08.08.2022 22 • How can we

    recover from Terraform state corruption? • How can we ensure cleanup of resources when Terraform state is corrupt? • How can we improve handling of different lifecycles of resources?
  10. Improved Approach • Two infrastructure layers: − Base Layer −

    App (Service) Layer • Resource Group per Layer • Destroy using Azure CLI − Scripted but can be made more robust • Layers can be provisioned/destroyed independently 08.08.2022 23
  11. Migration Constraints • Many SPAs already in Production • Destroy

    (Downtime) not an option • Automated (no manual steps) 08.08.2022 26
  12. Refactor Terraform State • Terraform stores module paths in state

    • Move blocks • Remove moved blocks once everyone migrated 08.08.2022 29
  13. We're hiring! • Azure Cloud Engineer • System Engineer Cloud

    Basic Services • IT Architect • Cloud DB Specialist • Security Architect • System Engineer Monitoring • Java Developers and more: jobs.mobiliar.ch/Jobs/All 08.08.2022 33