36,59 €
Modernize your apps with Microsoft Azure by moving web, desktop, and mobile apps to the cloud
Key Features
Book Description
Whether you are trying to re-architect a legacy app or build a cloud-ready app from scratch, using the Azure ecosystem with .NET and Java technologies helps you to strategize and plan your app modernization process effectively.
With this book, you'll learn how to modernize your applications by using Azure for containerization, DevOps, microservices, and serverless solutions to reduce development time and costs, while also making your applications robust, secure, and scalable.
You will delve into improving application efficiency by using container services such as Azure Container Service, Azure Kubernetes Service (AKS), and more. Next, you will learn to modernize your application by implementing DevOps throughout your application development life cycle. You will then focus on increasing the scalability and performance of your overall application with microservices, before learning how to add extra functionality to your application with Azure serverless solutions. Finally, you'll get up to speed with monitoring and troubleshooting techniques.
By the end of this book, you will have learned how to use the Azure ecosystem to refactor, re-architect, and rebuild your web, mobile, and desktop applications.
What you will learn
Who this book is for
This book is for.NET and Java developers who want to modernize their applications using Azure. Solution architects and experienced developers interested in modernizing legacy applications using Azure will also find this book useful. Some prior understanding of cloud computing concepts will be beneficial.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 407
Veröffentlichungsjahr: 2019
Copyright © 2019 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Amey VarangaonkarAcquisition Editor: Rahul NairContent Development Editor: Ronn KurienSenior Editor: Richard Brookes-BlandTechnical Editor: Mohd Riyan KhanCopy Editor: Safis EditingProject Coordinator: Anish DanielProofreader: Safis EditingIndexer: Manju ArasanProduction Designer: Joshua Misquitta
First published: December 2019
Production reference: 1061219
Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.
ISBN 978-1-83921-747-0
www.packt.com
Packt.com
Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Spend less time learning and more time coding with practical eBooks and videos from over 4,000 industry professionals.
Improve your learning with Skill Plans built especially for you.
Get a free eBook or video every month.
Fully searchable for easy access to vital information.
Copy and paste, print, and bookmark content
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.packt.com and, as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details.
At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Sjoukje Zaal is a managing consultant, Microsoft Cloud Architect, and Microsoft Azure MVP with over 15 years' experience of providing architecture, development, consultancy, and design expertise. She works at Capgemini, a global leader in consulting, technology services, and digital transformation.
She loves to share her knowledge and is active in the Microsoft community as a cofounder of the Dutch user groups, SP&C NL and MixUG, and the Global Mixed Reality Bootcamp. She is also a board member of Global Azure Bootcamp and Azure Thursdays. She is a public speaker and is involved in organizing events. She has written several books, writes blogs on a regular basis, and is active in the Microsoft Tech community. She is also part of the Diversity and Inclusion Advisory Board.
Amit Malik is an IT enthusiast and technology evangelist focused on cloud and emerging technologies. He is currently employed by Spektra Systems as the director of technology, where he helps Microsoft partners grow their cloud businesses by using effective tools and strategies. He specializes in the cloud, DevOps, software-defined infrastructure, application modernization, data platforms, and emerging technologies around AI. Amit holds various industry-admired certifications from all major OEMs in the cloud and data space, including Azure Solutions Architect Expert. He is also a Microsoft Certified Trainer (MCT). Amit is also an active community member for various technology groups and is a regular speaker at industry conferences and events.
Sander Rossel is a Microsoft-certified professional developer and author with experience and expertise in .NET and .NET Core, Azure, Azure DevOps, SQL Server, JavaScript, and other technologies. With his company, JUUN Software, he builds cloud-native applications and brings companies to the cloud.
Jason Marston is a Cloud Solution Architect based in England. He was recruited by Microsoft because of his OSS background. Jason has worked with Java since version 1 and has a long history with open source. He has over 30 years' experience of developing software and now helps organizations migrate and modernize legacy applications to the cloud. Jason was an SME in the Worldwide Communities project at Microsoft and, as part of the leadership team for those communities, helped many people solve their problems by adopting Java on Azure. In his spare time, Jason reads science fiction books and has two children who think he is a geek/nerd.
Mohamed Wali is a Cloud DevOps engineer based in Amsterdam who has been working with Microsoft technologies for around 7 years. He has been working with Azure since 2013. In July 2014, Mohamed was recognized as the youngest Microsoft MVP in the world. He has already authored/coauthored four books about Microsoft Azure and shares his knowledge and experience through blogging, authoring books, and speaking at events.
Stefano Demiliani is a Microsoft MVP on business applications, a Microsoft Certified Solution Developer (MCSD), Azure Certified Architect, and an expert in other Microsoft-related technologies. His main activity is architecting and developing enterprise solutions based on the entire stack of Microsoft technologies (mainly focused on ERP and the cloud). He has worked with Packt Publishing on many IT books related to Azure cloud applications and Dynamics 365 Business Central, and is a speaker at conferences around Europe. You can reach him on Twitter (@demiliani) or LinkedIn.
Alexey Bokov is an experienced Azure architect and Microsoft technical evangelist since 2011. He works closely with Microsoft's top-tier customers all around the world to develop applications based on the Azure cloud platform. Building cloud-based applications on challenging scenarios is his passion, along with helping the development community to upskill and learn new things through hands-on exercises and hacking. He's a long-time contributor to, and coauthor and reviewer of, many Azure books, and, from time to time, is a speaker at Kubernetes events.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Title Page
Copyright and Credits
Migrating Applications to the Cloud with Azure
About Packt
Why subscribe?
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Planning Application Modernization
Strategies for Application Modernization Using Azure
Introducing application modernization
The value of application modernization
The cloud maturity model
Different migration strategies
Rehost
Refactor
Rearchitect
Rebuild
Summary
Questions
Further reading
Building Your Application Migration Roadmap
Building a migration roadmap
Assess
Creating a cloud migration plan
Involving stakeholders
Calculating your TCO
Discovering and evaluating apps
Migrate
Optimize
Cost management and billing
Secure and manage
Security
Cloud health monitoring
Data protection
Migration tooling
Microsoft Assessment and Planning Toolkit
Azure Migrate
Azure Site Recovery
Azure Database Migration Guide
App Service Migration
Summary
Questions
Further reading
Implementing Containerization and DevOps in a Development Cycle
Getting Started with Docker and Kubernetes
Technical requirements
Understanding the Docker ecosystem in Azure
Azure Container Instances
Azure Kubernetes Service
Web Apps for Containers
Azure Batch for Containers
Docker in Azure Marketplace
Docker Enterprise Edition (basic, standard, advanced)
Azure Service Fabric
Red Hat OpenShift on Azure
Docker in Azure IaaS
Containerizing your applications
Planning for containerization
Building a Docker host in Azure
Preparing Docker images
Preparing a Dockerfile
Preparing a sample Dockerfile for a sample app
Building the Docker image
Pushing Docker images to Docker Hub
Pushing Docker images to the Azure Container Registry 
Running the application with containers
Kubernetes and Azure
Kubernetes overview
What does Kubernetes do?
Kubernetes architecture 
Kubernetes concepts
Building Kubernetes environments on Azure
Azure Kubernetes Service
Why Azure Kubernetes Service?
Top use cases with AKS
Summary
Questions
Further reading
Deploying Highly Scalable Apps with Kubernetes
Technical requirements
Azure makes Kubernetes easy
Deploying an AKS cluster
Deploying with the Azure portal
Deploying with the Azure CLI
Connecting to the AKS cluster 
Understanding AKS networking modes
Deploying applications on AKS
Planning scalable application deployment on AKS
Frontend
Backend
Building a deployment YAML file
Deployment for the backend pod
Service for the backend pod's deployment
Deployment for the frontend application
Service for the frontend application
Deploying the sample application
Scaling applications on AKS
Scaling applications on AKS manually
Autoscaling AKS applications
Scaling the AKS cluster
Scaling an AKS cluster manually
Autoscaling the AKS cluster
Upgrading applications on AKS
Upgrading an AKS cluster
Exposing applications outside the Kubernetes cluster
Monitoring and logging AKS using OMS
Insights
Metrics
Logs
Running highly scalable AKS applications using ACI
Using Helm to deploy applications 
Summary
Questions
Further reading
Modernizing Apps and Infrastructure with DevOps
Understanding Azure DevOps
Getting Azure DevOps
Signing up for Azure DevOps
Azure boards
Azure Repos
Azure pipelines
Azure pipeline agents
Azure test plans
Azure artifacts
Building a CI/CD pipeline with Azure DevOps
Creating a new Azure DevOps project
Cloning the voting app code to your development machine
Setting up an Azure repo for the voting app and pushing the application code
Setting up a build pipeline
Building a release pipeline
Simulating an end-to-end CI/CD experience
Using Azure pipelines with GitHub
Summary
Questions
Further reading
Building a Web and Microservices Architecture on Azure
Designing Web Applications
Technical requirements
Azure Web Apps
App Service Plans
App Service Environment
Creating an App Service Environment
Web Apps for containers
Creating a web app for containers
Designing web apps for high availability, scalability, and performance
High availability and performance
Using a CDN
Using Azure Cache for Redis
Using Azure Traffic Manager
Scalability
Scaling out
Scaling up
Designing and securing custom web APIs
Designing your web API
Securing your web API
Summary
Questions
Further reading
Scalability and Performance
Technical requirements
Working with HPC virtual machines
Virtual machine scale sets
Understanding Microsoft HPC Pack
Cloud-native HPC solutions
Hybrid HPC architecture
Deploying an HPC cluster on-premises
Understanding Azure Batch
Creating an Azure Batch service
Stateless components
Containers on Azure Batch
Executing a Batch job from code
Summary
Questions
Further reading
Building Microservices with Service Fabric
Technical requirements
Understanding Azure Service Fabric
Stateless and stateful microservices 
Stateless services
Stateful services
Azure Service Fabric application scenarios
Programming models
The Reliable Services programming model
The Reliable Actor programming model
Life cycle management
Azure Service Fabric Mesh
Creating an Azure Service Fabric cluster
Creating a Service Fabric .NET application
Setting up your development environment
Creating the application
Deploying the application
Creating a Service Fabric Java application
Setting up your development environment
Setting up a local Service Fabric cluster
Installing the Eclipse plugin for service fabric
Creating the application
Deploying the application
Summary
Questions
Further reading
Going Serverless and Deploying to the Cloud
Building Scalable Systems with Azure Functions
Technical requirements
Understanding serverless computing
Dynamic scaling
Dynamic pricing
Disadvantages of serverless computing
Creating an Azure function
Creating a Function App
Creating a function
Consuming your HTTP function
Function management
Working with triggered functions
Creating a triggered function
Creating Azure Functions in Visual Studio
Deploying Azure Functions
Deploying using Visual Studio
Deploying using Azure DevOps
Timer triggered functions
Using the cron syntax
Writing a second function
Input and output bindings
Adding bindings in the portal
Adding bindings in Visual Studio
Understanding bindings
Azure Functions proxies
Creating a proxy
Proxies for testing
Best practices
Summary
Questions
Further reading
Connecting to the Database
Technical requirements
Working with Azure SQL
Picking your version
Creating an Azure SQL Database
Pricing tiers
Using your database in the portal
Connecting to SQL Server Management Studio
Connecting to Azure SQL from .NET Core
Connecting using ADO.NET
Connecting using Entity Framework Core
Entity Framework migrations
Connecting to Azure SQL from Java
Connecting using JDBC
Connecting using JPA
Understanding Cosmos DB
The key-value model/Table API
The document model/MongoDB API
The SQL API
The graph model/Gremlin API
The wide-column model/Cassandra API
Working with the MongoDB API
Working with MongoDB in the Azure portal
Working with MongoDB from C#
Working with MongoDB from Java
Working with the Redis cache database
Creating a Redis cache
Working with Redis from C#
Using the ServiceStack Redis API
Working with Redis from Java
Summary
Questions
Further reading
Managing and Deploying Your Code
IDEs for Azure
Using Visual Studio with Azure
Getting Azure tools for Visual Studio
Visual Studio in the Azure Marketplace
Installing Azure tools for Visual Studio
Logging in to Visual Studio with Azure credentials
Using Cloud Explorer in Visual Studio
Developing and deploying with Visual Studio for Azure
Connecting Visual Studio to an existing Azure DevOps project
Deploying applications to Azure using Visual Studio
Using Eclipse with Azure
Installing Azure Toolkit for Eclipse
Signing in to Azure and using Azure Explorer within Eclipse
Publishing a Java project to Azure using Eclipse
Visual Studio Code and Azure
IntelliJ and Azure
Summary
Questions
Further reading
Securing Your Azure Services
Understanding Azure Key Vault
AKV scenarios
AKV advantages
AKV flavors
Creating an Azure Key Vault
AKV keys
AKV secrets
AKV certificates
Securing Azure Storage
Securing access to storage accounts
Granting the Reader role to a user using RBAC
Securing access to the storage account data
Azure Storage Service Encryption
Advanced Threat Protection for Azure Storage
Azure Storage firewall
Securing Azure SQL databases
Firewall and virtual network access
Controlling access using a firewall
Controlling access using virtual networks
Access control
Security authentication to Azure SQL 
Transparent data encryption
How does transparent data encryption work?
Securing your Azure SQL Databases with your own key
Transparent data encryption tips
Advanced data security for Azure SQL services
Securing your Azure VMs and network
Azure VM security
Azure network security
Azure Security Center
Microsoft Trust Center
Summary
Questions
Further reading
Planning for Security, Availability, and Monitoring
Diagnostics and Monitoring
Azure Log Analytics
Creating a Log Analytics workspace
Azure Monitor
Application Insights
Azure Service Health
Azure Advisor
Addressing recommendation from Azure Advisor
Azure Network Watcher
Summary
Questions
Further reading
Designing for High Availability and Disaster Recovery
Introducing high availability and disaster recovery
App Service
Scaling up the App Service plan
Key points regarding scaling up your App Service plan
Scaling out your App Service plan
Scaling out your App Service plan manually
Scaling out your App Service plan automatically
Key points for autoscaling your App Service plan
App Services deployment slots
Deployment slots key points
Backing up your App Services 
Key points for backing up your App Service 
Azure SQL Database
Active geo-replication
Auto-failover groups
Business continuity for Azure SQL Database
Hardware failures
Point-in-time restore
Key points for point-in-time restore
Highly available access to apps using Azure Traffic Manager
Azure Traffic Manager benefits
Azure Traffic Manager endpoints
Azure Traffic Manager routing methods
Building a Traffic Manager
Azure Traffic Manager key points
Azure Backup
Supported workloads
Enabling backups for a virtual machine 
Azure Site Recovery
Supported scenarios – ASR
Summary
Questions
Further reading
Assessments
Chapter 1: Strategies for Application Modernization Using Azure
Chapter 2: Building Your Application Migration Roadmap
Chapter 3: Getting Started with Docker and Kubernetes
Chapter 4: Deploying Highly Scalable Apps with Kubernetes
Chapter 5: Modernizing Apps and Infrastructure with DevOps
Chapter 6: Designing Web Applications
Chapter 7: Scalability and Performance
Chapter 8: Building Microservices with Service Fabric
Chapter 9: Building Scalable Systems with Azure Functions
Chapter 10: Connecting to the Database
Chapter 11: Managing and Deploying Your Code
Chapter 12: Securing Your Azure Services
Chapter 13: Diagnostics and Monitoring
Chapter 14: Designing for High Availability and Disaster Recovery
Other Books You May Enjoy
Leave a review - let other readers know what you think
This book is designed to show developers and architects how to modernize and run their applications effectively on the cloud. It introduces you to modern technologies, including containers, microservices, DevOps, and serverless computing, with a focus on running applications effectively by choosing the right solution. You'll also learn how to architect, develop, and deploy applications using these modern technologies on Azure.
Chapter 1, Strategies for Application Modernization Using Azure, introduces app modernization for Azure and different migration strategies.
Chapter 2, Building Your Application Migration Roadmap, focuses on defining an app modernization roadmap for your organization or customers.
Chapter 3, Getting Started with Docker and Kubernetes, focuses on the modernization and migration of applications to Azure by leveraging the power of containerization.
Chapter 4, Deploying Highly Scalable Apps with Kubernetes, covers deploying and managing Kubernetes-based environments on Azure.
Chapter 5, Modernizing Apps and Infrastructure with DevOps, goes into detail about Microsoft's new offering, Azure DevOps, which provides various tools and services to facilitate an enterprise-class DevOps culture in organizations of every size.
Chapter 6, Designing Web Applications, covers information regarding Azure web apps, the different App Service plans that are available, and the characteristics of the different App Service plans.
Chapter 7, Scalability and Performance, introduces compute-intensive applications. It covers how to design high-performance computing (HPC) and other compute-intensive applications using Azure services, how to determine when to use Azure Batch, and how to design stateless components to accommodate scale and containers with Azure Batch.
Chapter 8, Building Microservices with Service Fabric, dives into creating a microservice application from scratch using Azure Service Fabric. We will create an application in .NET and in Java.
Chapter 9, Building Scalable Systems with Azure Functions, talks about Azure Function apps, which are a great way to write small pieces of code that are highly scalable, reusable, and cheap.
Chapter 10, Connecting to the Database, talks about the various databases that can be used to connect your application.
Chapter 11, Managing and Deploying Your Code, covers Azure integrations and plugins for popular IDEs, including Visual Studio, Eclipse, Visual Studio Code, and IntelliJ.
Chapter 12, Securing Your Azure Services, teaches you how to secure some of the most commonly used Azure services, such as Azure Storage, Azure App Service, and Azure SQL Database.
Chapter 13, Diagnostics and Monitoring, introduces the design for operations objective by covering application and platform monitoring and alerting strategies, providing an overview of the solutions that Azure has to offer.
Chapter 14, Designing for High Availability and Disaster Recovery, covers a number of solutions that will keep your solutions highly available so as to avoid downtime as much as possible.
You should have a basic understanding of, and experience in, developing applications using either the .NET or Java programming frameworks. Knowledge of Azure or cloud fundamentals is desirable. You should have an Azure subscription with admin rights to follow the labs alongside the chapters, and you should also explore related Azure services and samples available on GitHub to dig deeper into any specific Azure service or application modernization methodology. Click on the following link to create your Azure account: https://azure.microsoft.com/enus/free/.
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
Log in or register at
www.packt.com
.
Select the
Support
tab.
Click on
Code Downloads
.
Enter the name of the book in the
Search
box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
WinRAR/7-Zip for Windows
Zipeg/iZip/UnRarX for Mac
7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Migrating-Apps-to-the-Cloud-with-Azure. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781839217470_ColorImages.pdf.
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Create a new VNet and call it PacktPubASEVNet and pick a region."
A block of code is set as follows:
namespace PacktPubToDoAPI.Models{ public class TodoItem { public long Id { get; set; } public string Name { get; set; } public bool IsComplete { get; set; } }}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
namespace PacktPubToDoAPI.Models{ public class TodoItem {
public long Id { get; set; }
public string Name { get; set; } public bool IsComplete { get; set; } }}
Any command-line input or output is written as follows:
git clone https://github.com/amalik99/project-nodejs-express-webapp.git
cd project-nodejs-express-webapp
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Choose your Subscription, Resource group, and the Location where you'd want to deploy this."
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.
In this section, we will modernize and move your existing infrastructure to Azure IaaS and PaaS. You will learn strategies for reducing your costs, increasing storage, and increasing your return on investment.
This section contains the following chapters:
Chapter 1
,
Strategies for Application Modernization Using Azure
Chapter 2
,
Building Your Application Migration Roadmap
This book will cover the different migration strategies, services, resources, and functionalities that Microsoft Azure has to offer to migrate your applications to Azure.
This first chapter introduces application modernization for Azure. It describes the different strategies and steps that companies can take to eventually end up with a full cloud-native app that is fully designed for elastic scaling, is cost-effective, can be decomposed into several loosely coupled services, and is easy to deploy, manage, and maintain.
In this chapter, we will cover the following topics:
Introducing application modernization
The value of application modernization
The cloud maturity model
Different migration strategies
The cloud is rapidly changing the way in which applications are designed and architected. We are shifting from monolithic applications to applications that are designed as loosely coupled services that can either communicate through APIs or are using asynchronous messaging and eventing. These applications need to be designed to easily scale horizontally, and new instances should be added or removed rapidly, and mostly automatically.
This brings big challenges to the underlying architecture of your applications. Operations should be able to be processed in parallel and deployments must be fully automated. The system as a whole, with all the different services included, should be resilient when failures occur.
Monitoring and telemetry must be embedded for the system as a whole as well, to gain insights into the health and performance of the system and all the loosely coupled services that are used for composing the application.
Let's now go on to understand the advantages of having your application modernized to Azure.
Moving applications to Azure can bring big value to organizations. Organizations can now fully focus on the business that they are in and focus on the changes they want to make to their IT environments, their businesses, and their products. By undergoing this digital transformation, organizations are able to think differently about their products, and are able to change the way they engage with their customers and support the things they want to do with their customers in a much faster and more agile way. Employees can be empowered using all of these new technologies, and operations can be optimized easily as well.
By bringing more value to an organization's business and customers, costs can be reduced significantly, because organizations don't have to invest in, or think about, the underlying infrastructure anymore.
The benefits that organizations can enjoy by migrating applications from on-premises environments to Azure can be categorized as follows:
Agility
/
time to market
: This refers to how quickly you can get your applications out and deploy updates. You can use
continuous delivery
(
CD
) and
continuous integration
(
CI
) or containerize your applications for rapid deployment.
Reducing costs
:
By shifting over to cloud-native applications and services, you can significantly reduce costs, since there is no infrastructure that needs to be maintained and there are no licensing costs. For serverless applications and containers, you only pay for the compute power you need.
IT simplification
: Using cloud-native technologies, you can simplify your IT environment. There is no infrastructure to manage anymore and there are no monolithic architectures to maintain. Applications can use modern architectures such as microservices, for instance. Additionally, breaking up applications into reusable pieces makes it a lot easier to maintain.
In the next section, we are going to look at the cloud maturity model, a predefined set of steps that will eventually let your applications evolve into a fully cloud-native application.
For an application to eventually become fully cloud-native, it should follow an iterative process called the cloud maturity model. The first two steps will either require minimal code or simply the configuration changes necessary to connect to Azure PaaS services or to optimize the application for cloud scale. Applications are moved to the cloud, but are mostly using the same code base as they were using when they were deployed on the on-premises systems. The last step, that is, the step to rebuild the application, will require a complete redesign and refactoring of the application. This step will be the most difficult and most intensive part of the application migration process.
The order of this process can be completely random. Organizations can decide to rebuild their applications from scratch to fully modernized applications immediately that leverage all cloud-native technologies, such as Azure Functions, microservices, Logic Apps, Service Fabric, and much more. They can also decide to start moving virtual machines (VMs) with the on-premises applications first, and, over time, expand their Azure resources and start refactoring, rearchitecting, and rebuilding their applications. However, following the steps in this flow, from left to right, is how most organizations start their journey of moving and migrating their applications to Azure:
In the upcoming section, we will cover the four different migration strategies.
There are four migration strategies that are defined in the cloud maturity model: rehost, refactor, rearchitect, and rebuild. In the upcoming sections, these migration strategies will be explained in more detail.
Rehost is often referred to as lift-and-shift migration. When you rehost your applications to the cloud, each application is migrated as-is to the cloud. This technically means that you move the VMs or on-premises servers and put them into the cloud infrastructure. The applications that are installed on the on-premises VMs and servers are then moved in their original state, without any code changes or refactoring of the application.
You can use some of the managed services in the cloud as well. For instance, you can migrate your databases to Azure SQL, PostgreSQL, or MySQL on Azure.
In the following diagram, you can see an illustration of a lift-and-shift migration. On-premises VMs with applications and databases deployed on them are moved as they are to Azure. By using this migration method, the VMs and databases can leverage the Azure IaaS scalability capabilities:
The pros of this method include the following:
You don't have to refactor or rewrite your code.
You can migrate to Azure quickly. You can just put your VM in the cloud. There could be some minor caveats such as networking issues, for instance, but this is the quickest way of migrating your applications to the cloud.
The cons of this method including the following:
This method brings the least cloud value to your applications.
You are still responsible for patching and upgrading the VMs in Azure.
You can make limited use of horizontal scaling and high availability.
You are still using a monolithic architecture for your applications.
Refactoring is often referred to as repackaging your applications. This is a migration approach that means you only need to make minimal changes to the application code or only apply the necessary configuration changes to connect the application to PaaS services, such as Azure app services or Azure SQL Database managed instances, for example.
In the following diagram, you can see the migration of on-premises applications to PaaS services in Azure. They are deployed in one or more Azure app services and the SQL databases can be moved as-is to Azure SQL Database managed instances:
The pros of this method include the following:
You don't have to rearchitect or write new code.
You can easily repackage your code to deploy in Azure.
You can start using DevOps practices for your projects.
You can make use of high availability for your applications.
The cons of this method include the following:
You can still only make limited use of horizontal scaling and high availability.
You are still using a monolithic architecture for your applications.
Using this cloud migration strategy, you are modifying or extending the application's code base to optimize the application architecture for horizontal scale. Your applications will be modernized into a resilient, highly scalable, and independently deployable architecture. You can use Azure services such as containers to speed up the process, scale applications easily, and simplify the management of your applications.
As you can see in the following diagram, on-premises applications are migrated to containers in Azure, such as Azure Kubernetes. Databases are migrated to Azure SQL databases:
The pros of this method include the following:
You can start using horizontal scaling and high availability for your applications in a cost-effective way.
You can start using DevOps practices for your projects.
You can lower the deployment costs for your applications.
You can minimize the use of VMs.
The cons of this method include the following:
Your applications need major revisions to be rearchitected into applications that can be deployed into containers.
Your developers need additional skills to start using containerization.
With this migration strategy, the applications are completely rebuilt from scratch using cloud-native technologies. Azure PaaS services and serverless features are used to provide a complete development and deployment environment in the cloud. Such services and features include Azure Functions, Logic Apps, and Azure Service Bus.
In the following diagram, you can see a migration of on-premises applications and databases, which are completely rebuilt from scratch, to cloud-native applications. Databases can be rebuilt and can use Azure SQL databases, or Azure Cosmos DB, for instance. Applications can use the PaaS offering of Azure, such as Logic Apps, Azure Functions, and Cognitive Services:
The pros of this method include the following:
You can make use of rapid development.
There is no need for managing the underlying infrastructure for your applications.
Your applications can take advantage of AI, Blockchain, IoT, and more.
You can fully apply DevOps practices in Azure.
You can use modern architectures such as microservices.
The cons of this method are the following:
Your applications need major revisions to be rearchitected into applications that can be deployed into containers.
Your developers require additional skills to start using all the different cloud-native technologies.
It requires significant code changes, refactoring, and the rearchitecture of your applications.
In this chapter, we covered the value that application migration can bring to organizations. We introduced the different migration strategies that are available for migrating your applications to Azure, from a simple lift and shift to a complete rebuild of your application.
In the upcoming chapter, we are going to create a roadmap for application migration to Azure and discuss the different migration strategies.
Answer the following questions to test your knowledge of the information found in this chapter. You can find the answers in the Assessments section at the end of this book.
What values can migrating applications to Microsoft Azure bring to your organization?
Reducing costs
No investments in developing the skills of your developers
Faster time to market
IT simplification
What are the biggest pros of using the rehost migration strategy for your applications?
No code changes
Migrate quickly to Azure
No infrastructure to manage
Maximum cost reduction
Which migration strategy do you need to choose to start making use of the DevOps practices in Azure?
Rehost
Refactor
Rearchitect
Rebuild
You can refer to the following links for more information about the topics covered in this chapter:
Azure Application Architecture Guide
:
https://docs.microsoft.com/en-us/azure/architecture/guide/
Application Modernization with Microsoft Azure: Build 2018
:
https://www.youtube.com/watch?v=kcHhMjymt_0
Migrate to the cloud
:
https://www.microsoft.com/net/learn/architecture/migrate-to-the-cloud
Azure Migration Center
:
https://azure.microsoft.com/en-us/migration/
Cloud Migration Essentials: A guide to migrating servers and virtual machines:
https://azure.microsoft.com/en-us/resources/cloud-migration-essentials-e-book/
In the previous chapter, we covered the value for organizations of migrating their applications to Microsoft Azure. We covered the cloud maturity model and different migration strategies.
This chapter focuses on defining an application modernization roadmap for your organization or customers. It covers how to plan your strategy to take advantage of the benefits offered by the cloud by following a couple of predefined steps.
In this chapter, the following topics will be covered:
Building a migration roadmap
Migration tooling
Microsoft defines building a complete road map and strategy for migrating your applications to Azure with the following four steps:
Assess
Migrate
Optimize
Secure and manage
These are described in more detail in the upcoming sections.
This is the first phase of the migration journey. In this first step, you take a view of your current environment; you get an overview of all of the virtual machines, applications, and on-premises servers that are deployed inside the environment, and what the migration of all of these different components and features will look like.
This first step—assessing your current environment—consists of the following four steps.
Before you can start planning your migration, you need to set your cloud migration priorities and objectives. By following this approach, a more successful migration is ensured. You can also get insights into the environment anddependencies by using automated cloud migration tools. This way you create the cloud migration project plans.
You can build a template that aligns with individual apps, locations, or groups within yourorganization for future use by assessing your environment. Start with applications that are expected to have few dependencies to get your migration moving quickly.
Migrating to the cloud is a digital transformation for most businesses. Besides the technical migration, broad organizational change and support are required as well. Involve key people throughout the organization, such as involved business and IT owners. The migration will lead a lot smoother and faster if you get the engagement and support of the stakeholders.
By calculating the Total Cost of Ownership (TCO), you can evaluate the potential cost savings of migrating to Azure compared to an on-premises deployment. The Azure TCO calculator can be used to build a customized cloud assessment that can help to build a personal business case to support the Azure migration.
The discovery step includes scanning your current environment to create an inventory of all of the physical and virtual servers and all of the applications that are deployed inside your data center. The data obtained by the scan can include profile information and performance metrics about your applications and servers. At the end of this step, you'll have a complete inventory with all of the metadata necessary to build your cloud migration plan.
This inventory can be made using cloud migration assessment tools. One of these tools is Azure Migrate, which is offered by Microsoft and will be covered in more detail later in this chapter. There are other third-party tools available as well.
Using the information from the discovery phase, you can map your servers to represent your on-premises applications. This will help you to identify dependencies between servers, such as communication between applications and servers, for instance. This way, you can include all of the necessary application components in your cloud migration plan. You can group all of the servers logically to represent applications, and then select the best migration strategy for each application based on its requirements and migration objectives.
This is the last step. With all of the application groups mapped, you can use cloud migration assessment tools to evaluate the best way to migrate your on-premises application to the cloud. These tools provide recommendations and migration strategies for your application servers.
Step two is to migrate and actually move all of the resources to the cloud. In this step, you pick one or more of the migration strategies that are described in Chapter 1, Strategies for Application Modernization Using Azure, in the Different migration strategies section.
Just as a recap, the following strategies can be adopted in the migration phase:
Rehost
: Also called lift-and-shift migration, this is no-code migration, where each server and application is migrated, as is, using IaaS and Azure networking components. Physical and virtual servers are moved to Azure VMs, and databases can be migrated as is as well, using an Azure
SQL Database Managed Instance.
Refactor
: Also called repackaging, this involves repackaging your applications, such as web apps and containers, to deploy them to Azure PaaS. This approach involves minimal code changes.
Rearchitect
: Using this approach, your application code base is modernized into a
resilient, highly scalable, independently deployable architecture. The application is then optimized to scale for the cloud.
Rebuild
: Using this approach, the application is completely rebuilt from scratch using cloud-native technologies and design principles. It uses a
complete development and deployment environment from the cloud without the need to manage your own infrastructure. All of this is completely handled by Azure.
In this third phase, you can use the different Azure Cost Management features to monitor your usage inside Azure. To optimize your cloud usage, you can use the Azure resources mentioned in the upcoming section.
Azure Cost Management allows you to track the cloud usage of your Azure resources. It is the process of effectively planning and controlling costs involved in your business. It helps to take action to optimize cloud spending and it helps to analyze costs effectively.
In Azure Cost Management, you can continuously monitor cloud consumption and cost trends using advanced analytics, and track actual spend against your budget to avoid overspending. Reports in Cost Management show the usage-based costs consumed by Azure services and third-party marketplace offerings. You can also use historical data to improve your forecasting accuracy as well. Cost Management uses Azure budgets, management groups, and recommendations on how to reduce costs and how your expenses are organized.
Azure Cost Management can be accessed from the Azure portal. You can also export the cost data to custom applications, external systems, or processes using the various APIs. Scheduled reports and automatic billing data export are also available. You can use Azure Cost Management for free.
You can use the different Azure security and management features to secure and monitor your applications inside Azure. These services can be used during migration, with Azure Hybrid support, and can be continued after migration for a consistent experience across your (Hybrid) cloud using the products and resources available in the Azure portal.
In the upcoming sections, the different services are explained.
Azure Security Center offers security management and advanced threat protection across (Hybrid) cloud workloads. Security Center gives you insights into—and control over—applications in Azure. You can limit your exposure to threats, and detect and respond to attacks quickly.
You need to make sure that your workloads are secured when you migrate them to the cloud. When you migrate your workloads to Infrastructure as a Service (IaaS), there is more customer responsibility compared to moving to Platform as a Service (PaaS).
Azure Security Center provides the following tools to do the following:
Protect against threats
: The workloads in Azure are assessed by Security Center, and it raises threat prevention recommendations and threat detection alerts when needed.
Strengthen security posture
: The environment in Azure is also assessed by Security Center, and it enables you to understand the status of your resources, and whether they are secure.
Get secured out of the box:
Security Center is natively integrated in Azure and easily deployed.
The following screenshot gives an overview of your Azure and non-Azure workloads from a security perspective inside Azure Security Center. In there, you can discover and assess the security of your environment. The dashboard provides insights into vulnerabilities that require attention:
Next, we will look at the health and performance of your apps.
You can use Azure Monitor, Log Analytics, and Application Insights to gain insights into the health and performance of your apps, infrastructure, and data. For instance, you can view application and network dependencies across multiple VMs, or you can track the performance of your applications. You can integrate the monitoring tools with other services' management solutions as well as use the APIs that are provided by Azure.
The following is a screenshot of Azure monitoring in the Azure portal:
Next, let's look at data protection.
You can back up your applications in Azure, protect your data against human error or ransomware, and meet compliance goals using the backup capabilities of Azure. Azure Backup offers a built-in solution that can be deployed to back up different resources such as VMs, data, databases, and more.
It is easy to set up, and you only pay for what you use. Restoring your data comes with no additional costs.
When building your application migration roadmap, you can use the guides and tools provided by Microsoft. The possibilities are described in the upcoming sections.
The Microsoft Assessment and Planning (MAP) Toolkit is a free tool with a set of templates that can be used to assess your on-premises environment and current IT infrastructure for a variety of migration projects. It provides a tool that can assess servers and VMs, Office, SharePoint, and Exchange installations, and much more. It can then define whether an application, server, or device is adequately prepared to migrate to a new operating system, server version, or cloud environment. It also offers a reporting tool that simplifies the migration process.
The MAP Toolkit consists of the following components:
MAPSetup.exe
: This c
ontains the MAP tool as well as the files that are needed to set up a local SQL database.
readme_en.htm file
: This details
what administrators need to run MAP Toolkit and known issues.
MAP_Sample_Documents.zip
: This p
rovides examples of the types of reports and proposals the MAP Toolkit creates.
MAP_Training_Kit.zip
: This e
Tausende von E-Books und Hörbücher
Ihre Zahl wächst ständig und Sie haben eine Fixpreisgarantie.
Sie haben über uns geschrieben: