Microsoft 2016 5/26/2018 4:12 AM BRK3189 Modernizing existing .NET web apps with Azure Cloud and Windows containers Cesar De La Torre Ankit Asthana Senior Program manager Principal Program Manager .NET Product Group .NET Product Group cesardl@microsoft.com aasthan@microsoft.com Twitter: @cesardelatorre @ankitasthana86 © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Outline .NET application Architecture Portal 5/26/2018 4:12 AM Outline .NET application Architecture Portal Modernization Maturity Model Cloud Infrastructure Ready Cloud DevOps Ready Cloud Optimized Call to Action Q & A © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
.NET Application Architecture Portal 5/26/2018 4:12 AM Microservices, Web, Mobile and UWP apps 250K+ eBook downloads since //Build 2017 Sample applications top rated on GitHub https://github.com/dotnet-architecture/ dot.net/architecture © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
.NET Application Architecture Portal 5/26/2018 4:12 AM Existing .NET developers and Solution Architects Accompanied with journeys of modernizing two existing ASP.NET (WebForms, MVC) applications on eShopModernizing GitHub repository http://aka.ms/modernizeebook © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
“Why Modernize my application?” Microsoft Build 2017 5/26/2018 4:12 AM “Why Modernize my application?” © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Modernization IT Simplification Standardization AGILITY DevOps practices using continuous delivery & containers Time to market Scalability and HA Insights and Analytics Total cost of ownership Infrastructure Cost Ongoing Maintenance
“Alright!, so how do we get started?” Microsoft Build 2017 5/26/2018 4:12 AM “Alright!, so how do we get started?” © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Cloud Maturity Model 5/26/2018 4:12 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
1. Cloud Infrastructure ready Simply Rehost your on-premise application to IaaS on Azure Pros No re-architect or new code Least effort for quick migration Supported on the least common denominator on Azure Existing Apps .NET Web apps (on-prem.) Lift & Shift .NET Web apps (Cloud) On-Premises IaaS Cloud Relational Database Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Using: Virtual Machines (VM) Azure SQL DB Managed Instance Monolithic Architecture Monolithic Architecture
1. Cloud Infrastructure ready 5/26/2018 4:12 AM 1. Cloud Infrastructure ready Tools and Resources Azure Migrate © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
1. Cloud Infrastructure ready 5/26/2018 4:12 AM 1. Cloud Infrastructure ready Tools and Resources Azure Migrate Azure Site Recovery service overview © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
1. Cloud Infrastructure ready 5/26/2018 4:12 AM 1. Cloud Infrastructure ready Tools and Resources Azure Migrate Azure Site Recovery service overview Azure SQLDB Managed Instance and Database Migration Service © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
1. Cloud Infrastructure ready 5/26/2018 4:12 AM 1. Cloud Infrastructure ready Tools and Resources Azure Migrate Azure Site Recovery service overview Azure SQLDB Managed Instance and Database Migration Service Migrating VMs in AWS to Azure VMs New options to modernize your application with Azure SQL Database Configuring Communications between VNETS Upgrading an ASP.NET Web application to ASP.NET 4.X © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
1. Cloud Infrastructure ready Simply Rehost your on-premise application to IaaS on Azure Pros No re-architect or new code Least effort for quick migration Supported on the least common denominator on Azure Cons Smaller Cloud Value Manual Patching, Upgrades No Automated App Scaling and High Availability Existing Apps .NET Web apps (on-prem.) Lift & Shift .NET Web apps (Cloud) On-Premises IaaS Cloud Relational Database Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Using: Virtual Machines (VM) SQL DB Managed Instance Monolithic Architecture Monolithic Architecture
Modernization Maturity Model Lift and Shift Existing .NET apps Cloud- Optimized Cloud Optimized Cloud Infrastructure- Ready Existing Apps & Services .NET Framework on-premises Cloud DevOps- Ready Lift and shift approaches No code changes
Monolithic Architecture 2. Cloud DevOps ready Get more Cloud benefit by Containerizing your app with Windows Server Docker Containers and deploying them to Azure cloud or on-premises. Lift & Shift .NET Web apps (Cloud) Pros No re-architect or new code Increased density & lower deployment cost Improved productivity and DevOps agility Portability of apps and dependencies High availability and Orchestration with ACS/K8 and Service Fabric Existing Apps .NET Web apps (on-prem.) On-Premises Relational Database Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Monolithic Architecture
TechReady 23 5/26/2018 4:12 AM Docker Containers Docker helps automating the deployment of applications as portable, self-sufficient containers that can run on any cloud or on-premises. No more: “It works in my dev machine!... Why not in production?” Now it is: “If it works in Docker, it works in production” Keywords about WHY Docker? Dependencies (self-sufficient) Deployment © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Virtual Machines Docker Containers compared to Hypervisor + Network isolation at container level + Resources constraints at container level App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs Guest OS Guest OS Guest OS App/Svc 1 App/Svc 2 App/Svc 3 Bins/Libs Bins/Libs Bins/Libs Hypervisor Container Engine Host Operating System Operating System Infrastructure Infrastructure
Docker Engine for Linux and Windows
Docker and .NET .NET Framework images Windows Server Core TechReady 23 5/26/2018 4:12 AM Docker and .NET .NET Framework images Windows Server Core .NET Core Docker images xPlat. (Linux & Windows Nano Server) See at Docker Hub © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5/26/2018 4:12 AM Demo Containerizing your ASP.NET Web Application with Docker in Visual Studio Try for yourself: https://github.com/dotnet-architecture/eShopModernizing © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5/26/2018 4:12 AM Image2Docker tool Ports existing Windows application workloads to Docker IIS and ASP.NET apps Extract ASP.NET websites config/dependencies from a VM or server Generates dockerfiles for Windows Docker images, based on analysis of existing Windows machines. Open Source community tool, powered by Docker (the company) Windows IIS ASP.NET dockerfiles © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
VM for Test Environment 5/26/2018 4:12 AM Scenario: Deploy to Azure VM through a Docker Registry Docker Registry Microsoft Azure VM for Test Environment Windows Server 2016 or later Docker Engine Docker engine and Docker CLI Local Docker Image Repository Docker-compose up PC Dev Environment Windows 10 or later Docker for Windows Docker Hub or Azure Container Registry ASP.NET (.NET Framework) on Windows Server Core Container docker push docker pull Docker engine and Docker CLI SQL Server on Windows Server Core Container Local Docker Image Repository (*) SQL Server in a container should only be used for dev/test environments. Move to high available systems, like Azure SQL Database, for production environments (*) docker-compose build or docker build © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Scenario: Deploy to Azure VM through CI/CD pipelines 5. Test/Staging Azure VM Windows Server 2016 Docker Engine CD, deploy 4. VSTS Application code repo (SCC) Code Push 2. git push Build, CI 3. VSTS (*) Docker Hub (Internet) or Azure Container Registry (Azure) Docker registry docker push Custom Image Inner loop 1. Code, run, debug (*) SQL Server in a container should only be used for dev/test environments. Move to high available systems, like Azure SQL Database, for production environments VS Application Insights Dev environment
Demo Deploying Windows Containers to an Azure VM 5/26/2018 4:12 AM Demo Deploying Windows Containers to an Azure VM Adding CI/CD pipelines for your containerized application © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Azure SQL Database Managed Instance SQL Server cluster on-premises Why do you need orchestrators when moving to production? How to scale-out application containers? Azure SQL Database Or Azure SQL Database Managed Instance SQL Server cluster on-premises And with no IaaS/VM operations? SQL Server on Windows Server Core Container Orchestrators High Availability PaaS service
Choosing Orchestrators in Azure TechReady 23 5/26/2018 4:12 AM Choosing Orchestrators in Azure Azure Product Orchestrator Description Good for Common workloads Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts Production-ready & Windows/Linux ecosystem Microservices based on containers As a datacenter operating system, DC/OS is itself a distributed system, a cluster manager and a container platform Linux ecosystem Docker Swarm is a clustering and scheduling tool for Docker containers. With Swarm, IT administrators and developers can establish and manage a cluster of Docker nodes as a single virtual system Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices Stateful svc & Actors Microservices based on plain processes Kubernetes Azure Container Service Mesosphere DC/OS Docker Swarm Azure Service Fabric Service Fabric © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Choosing Orchestrators in Azure TechReady 23 5/26/2018 4:12 AM Choosing Orchestrators in Azure Azure Product Orchestrator Description Good for Common workloads Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts Production-ready & Windows/Linux ecosystem Microservices based on containers As a datacenter operating system, DC/OS is itself a distributed system, a cluster manager and a container platform Linux ecosystem Docker Swarm is a clustering and scheduling tool for Docker containers. With Swarm, IT administrators and developers can establish and manage a cluster of Docker nodes as a single virtual system Azure Service Fabric is a distributed systems platform that makes it easy to package, deploy, and manage scalable and reliable microservices Stateful svc & Actors Microservices based on plain processes Kubernetes Azure Container Service Mesosphere DC/OS Docker Swarm Azure Service Fabric Service Fabric © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Kubernetes Cluster – Production Scenario: Direct deployment to a Kuberbetes cluster in ACS Microsoft Azure PC Dev Environment Windows 10 or later Docker for Windows Kubectl (K8s CLI) Kubernetes Cluster – Production Windows Server 2016 nodes ACS K8s Cluster kubectl create -f app-deploy.yml Command App Deployment to cluster 2 docker push 1 Node Private vnet docker build Local Docker Image Repository Docker host Master Node DNS Scheduler Proxy Etc. Node Azure Load Balancer Kubectl (K8s CLI) Docker host Additional nodes (*) SQL Server in a container should only be used for dev/test environments. Move to high available systems, like Azure SQL Database, for production environments
Scenario: Deploy to Kubernetes through CI/CD pipelines CD, deploy 4. VSTS ACS – Kubernetes Application code repo (SCC) Code Push 2. git push Build, CI 3. VSTS (*) Docker Hub (Internet) or Azure Container Registry (Azure) Docker registry docker push Custom Image Inner loop 1. Code, run, debug (*) SQL Server in a container should only be used for dev/test environments. Move to high available systems, like Azure SQL Database, for production environments VS Application Insights Dev environment
5/26/2018 4:12 AM Demo Running a containerized application in KUBERNETES and scaling it up Try for yourself: Deploy eShopModernized to Kubernetes Deploy eShopModernized to ServiceFabric © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Monolithic Architecture 2. CONS in Cloud DevOps ready Get more Cloud benefit by Containerizing your app with Windows Server Docker Containers and deploying them to Azure using production orchestration Lift & Shift .NET Web apps (Cloud) Pros No re-architect or new code Increased density & lower deployment cost Improved productivity and DevOps agility Portability of apps and dependencies High availability and Orchestration with ACS/K8 and Service Fabric Existing Apps .NET Web apps (on-prem.) On-Premises Relational Database CONS Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Containerization is an additional step in the learning curve Monolithic Architecture
2. Cloud DevOps ready Tools and Resources 5/26/2018 4:12 AM 2. Cloud DevOps ready Tools and Resources New options to modernize your application with Azure SQL Database Azure SQLDB Managed Instance and Database Migration Service Configuring Communications between VNETS Upgrading an ASP.NET Web application to ASP.NET 4.X Azure Site Recovery service overview Migrating VMs in AWS to Azure VMs © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Cloud Maturity Model
Monolithic Architecture 3. Going to Cloud-Optimized (Full PaaS) Extend your apps with new services based upon Server less computing, Microservices architecture and PaaS services (AppService) to fully exploit the advantages of the cloud. Pros Optimized for long term agility Existing Apps .NET Web apps (on-prem.) On-Premises Relational Database Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Wrap-up Monolithic Architecture
Traditional application (monolith) Microservices application TechReady 23 5/26/2018 4:12 AM Traditional application (monolith) Microservices application A traditional application has most of its functionality within a few processes that are componentized with layers and libraries. Scales by cloning the app on multiple servers/VMs/Containers App 1 A microservice application segregates functionality into separate smaller services. Scales out by deploying each service independently with multiple instances across servers/VMs App 1 App 2 Independent deployment of microservice Coarse-grained density of apps/services Fine-grained density of services Need to deploy the full application © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Monolithic Architecture 3. Going to Cloud-Optimized (Full PaaS) Extend your apps with new services based upon Server less computing, Microservices architecture and PaaS services (AppService) to fully exploit the advantages of the cloud. Pros Optimized for long term agility Optimized for scale and high availability Modern Architecture with Microservices and Cloud Native technologies Existing Apps .NET Web apps (on-prem.) On-Premises Relational Database Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Wrap-up Monolithic Architecture
When to use Azure App Service? (PaaS for Web Apps) 5/26/2018 4:12 AM When to use Azure App Service? (PaaS for Web Apps) Server-side applications in .NET Framework Use just .NET Framework on pure PaaS Azure App Service Cloud-Optimized for web apps NO dependencies A ASP.NET MVC app Web Forms app App has server/custom dependencies? Web API service Use .NET Framework on Windows Containers Windows Containers Azure or On-Premises B Cloud DevOps-Ready for web apps YES, dependencies SignalR service Web Pages app WCF service Server/custom dependencies: i.e. MSI to install on server, COM/COM+ components, ISAPI, etc. © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Monolithic Architecture 3. Going to Cloud-Optimized (Full PaaS) Extend your apps with new services based upon Server less computing, Microservices architecture and PaaS services (AppService) to fully exploit the advantages of the cloud. Pros Optimized for long term agility Optimized for scale and high availability Modern Architecture with Microservices and Cloud Native technologies Existing Apps .NET Web apps (on-prem.) On-Premises Relational Database CONS Requires significant code refactoring or rewriting (increased time and budget) Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Wrap-up Monolithic Architecture
Modernization Maturity Model
“Alright! I am ready. Anything else to consider ?” Microsoft Build 2017 5/26/2018 4:12 AM “Alright! I am ready. Anything else to consider ?” © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Data Migration SQL Server OnPrem SQL Server on Azure VM’s (IaaS) Azure SQL DB Managed Instance (PaaS)* Fast migration with minimal changes Eliminates hardware costs Hybrid deployment available Manual Patching, Scaling and HA Built-in HA, Scaling, Upgrades VNET support for private IP address Eliminates hardware & administrative costs No Migration or changes Hybrid Scenarios Setup VPN or Express Route for mission control workloads Network Latency Azure Database Migration Service Azure Database Migration Service © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Hybrid – Connecting ‘SQL Server OnPrem’ to Azure Cloud Customer Segment and workloads Secure point-to-site connectivity Developers POC Efforts Small scale deployments Connect from anywhere SMB, Enterprises Connect to Azure compute Secure site-to-site VPN connectivity ExpressRoute private connectivity SMB & Enterprises Mission critical workloads Backup/DR, media, HPC Connect to all Azure services
Your Azure IaaS workloads/app s 5/26/2018 4:12 AM Managing Identity Enable Azure AD Domain services in a few clicks Users, passwords and groups sync’d from Azure AD tenant Reflection of Azure AD Azure Your virtual network Azure AD Domain Services Your Azure IaaS workloads/app s Azure Active Directory Azure AD Connect Windows Server Active Directory © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Other Recommended Improvements 5/26/2018 4:12 AM Other Recommended Improvements .NET VERSIONS Recompile .NET 2.0, 3.5 apps to target latest .NET 4.X version ASP.NET Caching InProc vs. Distributed Caching Azure Redis Cache provides a session state provider (link here) Centralized Logging Azure provides native support for log tracing and diagnostics (Blob storage, File Storage, Table Storage) SECURITY Encryption, MFA, RBAC, Hardware Security Model and more © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Call to Action http://aka.ms/modernizeebook http://dot.net/architecture http://aka.ms/modernizeebook
Please evaluate this session Tech Ready 15 5/26/2018 Please evaluate this session From your Please expand notes window at bottom of slide and read. Then Delete this text box. PC or tablet: visit MyIgnite https://myignite.microsoft.com/evaluations Phone: download and use the Microsoft Ignite mobile app https://aka.ms/ignite.mobileapp Your input is important! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5/26/2018 4:12 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Call to Action http://aka.ms/modernizeebook http://dot.net/architecture http://aka.ms/modernizeebook
Please evaluate this session Your feedback is important to us! 5/26/2018 4:12 AM Please evaluate this session Your feedback is important to us! The slide will be replaced onsite through Silver Fox Productions with an updated QR code. This slide is required. Do NOT delete or alter the slide. From your PC or Tablet visit MyIgnite at http://myignite.microsoft.com From your phone download and use the Ignite Mobile App by scanning the QR code above or visiting https://aka.ms/ignite.mobileapp © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5/26/2018 4:12 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5/26/2018 4:12 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.