您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure 应用程序迁移示例概述Overview of application migration examples for Azure

适用于 Azure 的云采用框架的这一部分提供了几种常见迁移方案的示例,并演示了如何将本地基础结构迁移到 Microsoft AzureThis section of the Cloud Adoption Framework for Azure provides examples of several common migration scenarios and demonstrates how you can migrate on-premises infrastructure to Microsoft Azure.

简介Introduction

Azure 提供了针对一套全面的云服务的访问权限。Azure provides access to a comprehensive set of cloud services. 作为开发人员和 IT 专业人员,你可以使用这些服务通过数据中心的全球网络在各种工具和框架上构建、部署和管理应用程序。As developers and IT professionals, you can use these services to build, deploy, and manage applications on a range of tools and frameworks through a global network of datacenters. 随着你的业务挑战与数字转换相关,Azure 平台可帮助你了解如何执行以下操作:As your business faces challenges associated with the digital shift, the Azure platform helps you to figure out how to:

  • 优化资源和操作。Optimize resources and operations.
  • 与客户和员工合作。Engage with your customers and employees.
  • 转换你的产品。Transform your products.

云提供了更高的优点,可提高速度和灵活性、降低成本、提高性能和可靠性。The cloud provides advantages for speed and flexibility, minimized costs, performance, and reliability. 但许多组织需要继续运行本地数据中心。But many organizations will need to continue to run on-premises datacenters. 为了应对云采用障碍,Azure 提供了一种混合云策略,可在本地数据中心与 Azure 公有云之间建立桥梁。In response to cloud adoption barriers, Azure provides a hybrid cloud strategy that builds bridges between your on-premises datacenters and the Azure public cloud. 例如,使用 azure 云资源(如 Azure 备份)来保护本地资源,或使用 Azure analytics 来深入了解本地工作负荷。An example is using Azure cloud resources like Azure Backup to protect on-premises resources or Azure analytics to gain insights into on-premises workloads.

作为混合云策略的一部分,Azure 提供了不断增长的解决方案,用于将本地应用程序和工作负荷迁移到云。As part of the hybrid cloud strategy, Azure provides growing solutions for migrating on-premises applications and workloads to the cloud. 通过简单的步骤,你可以全面评估你的本地资源,以确定他们将如何在 Azure 平台中运行。With simple steps, you can comprehensively assess your on-premises resources to figure out how they'll run in the Azure platform. 然后,根据完成的深度评估,你可以自信地将资源迁移到 Azure。Then, with a deep assessment in hand, you can confidently migrate resources to Azure. 当资源已就位并在 Azure 中运行时,可以对它们进行优化来保持和提高可访问性、灵活性、安全性和可靠性。When resources are up and running in Azure, you can optimize them to retain and improve access, flexibility, security, and reliability.

迁移模式Migration patterns

迁移到云的策略分为以下四大模式:重新托管、重构、重新架构或重新生成。Strategies for migration to the cloud fall into four broad patterns: rehost, refactor, rearchitect, or rebuild. 采用的策略因业务驱动因素和迁移目标而异。The strategy you adopt depends on your business drivers and migration goals. 可采用多种模式。You might adopt multiple patterns. 例如,你可以选择在重新架构应用程序时 rehost 非关键应用程序,这些应用程序更复杂且业务关键。For example, you could choose to rehost noncritical applications while rearchitecting applications that are more complex and business-critical. 接下来看看这些模式。Let's look at these patterns.

模式Pattern 定义Definition 何时使用When to use
重新托管Rehost 此选项通常称为 "提升并迁移",不需要更改代码。Often referred to as a lift-and-shift migration, this option doesn't require code changes. 可以使用它快速将现有应用程序迁移到 Azure。You can use it to migrate your existing applications to Azure quickly. 每个应用程序都按原样迁移,以获得云的优势,而不会产生与代码更改相关的风险和成本。Each application is migrated as is to reap the benefits of the cloud without the risk and cost associated with code changes. 需要快速将应用程序移动到云时。When you need to move applications quickly to the cloud.

如果要移动应用程序而不修改它。When you want to move an application without modifying it.

当应用程序设计为可在迁移后利用 Azure 基础结构即服务 (IaaS) 可扩展性。When your applications are designed so that they can take advantage of Azure infrastructure as a service (IaaS) scalability after migration.

当应用程序对你的业务很重要,但不需要立即更改应用程序功能。When applications are important to your business, but you don't need to immediately change application capabilities.
重构Refactor 通常称为 "重新打包",重构需要对应用程序进行少量的更改,以便它们可以连接到 Azure 平台即服务 (PaaS) 并使用云产品/服务。Often referred to as "repackaging," refactoring requires minimal changes to applications so that they can connect to Azure platform as a service (PaaS) and use cloud offerings.

例如,可以将现有应用程序迁移到 Azure App Service 或 Azure Kubernetes Service (AKS) 。For example, you could migrate existing applications to Azure App Service or Azure Kubernetes Service (AKS).

或者,可以将关系数据库和非关系数据库重构为 Azure SQL 托管实例、Azure Database for MySQL、Azure Database for PostgreSQL 和 Azure Cosmos DB 等选项。Or, you could refactor relational and nonrelational databases into options such as Azure SQL Managed Instance, Azure Database for MySQL, Azure Database for PostgreSQL, and Azure Cosmos DB.
如果你的应用程序可以轻松地重新打包以便在 Azure 中工作。If your application can easily be repackaged to work in Azure.

如果要应用 Azure 提供的创新 DevOps 实践,或者考虑使用容器策略作为工作负荷,请使用 DevOps。If you want to apply innovative DevOps practices provided by Azure, or if you're thinking about DevOps using a container strategy for workloads.

对于重构,你需要考虑现有代码库和可用开发技能的可移植性。For refactoring, you need to think about the portability of your existing code base and available development skills.
重新架构Rearchitect 迁移的重新架构侧重于修改和扩展应用程序功能和基本代码,以便优化应用程序体系结构的云可伸缩性。Rearchitecting for migration focuses on modifying and extending application functionality and the code base to optimize the application architecture for cloud scalability.

例如,可将整体应用分解为一组一起工作且缩放轻松的微服务。For example, you could break down a monolithic application into a group of microservices that work together and scale easily.

你还可以将关系和非关系数据库重塑到完全托管的数据库解决方案,如 SQL 托管实例、Azure Database for MySQL、Azure Database for PostgreSQL 和 Azure Cosmos DB。You could also rearchitect relational and nonrelational databases to a fully managed database solution, such as SQL Managed Instance, Azure Database for MySQL, Azure Database for PostgreSQL, and Azure Cosmos DB.
当应用程序需要进行重大修订以合并新功能或在云平台上有效工作时。When your applications need major revisions to incorporate new capabilities or to work effectively on a cloud platform.

如果要使用现有的应用程序投资,请满足可伸缩性要求,应用创新的 DevOps 实践,并最大程度地减少虚拟机的使用。When you want to use existing application investments, meet scalability requirements, apply innovative DevOps practices, and minimize use of virtual machines.
重新生成Rebuild 重新生成使用 Azure 云技术从头开始重新生成应用程序,从而进一步执行操作。Rebuild takes things a step further by rebuilding an application from scratch using Azure cloud technologies.

例如,可以通过 Azure Functions、AI、SQL 托管实例和 Azure Cosmos DB 等 云本机 技术来构建领域应用程序。For example, you could build greenfield applications with cloud-native technologies like Azure Functions, AI, SQL Managed Instance, and Azure Cosmos DB.
当你需要快速开发和现有应用程序的功能和生命周期有限时。When you want rapid development, and existing applications have limited functionality and lifespan.

当准备好加快业务创新(包括 Azure 提供的 DevOps 实践)、使用原生于云的技术生成新应用程序,以及充分利用 AI、区块链和 IoT 中的改进时。When you're ready to expedite business innovation (including DevOps practices provided by Azure), build new applications using cloud-native technologies, and take advantage of advancements in AI, blockchain, and IoT.

迁移示例文章Migration example articles

本部分提供了几种常见迁移方案的示例。This section provides examples of several common migration scenarios. 每个示例都包括背景信息和详细的部署方案,这些方案说明了如何设置迁移基础结构并评估本地资源是否适合迁移。Each example includes background information and detailed deployment scenarios that illustrate how to set up a migration infrastructure and assess the suitability of on-premises resources for migration. 随着时间推移,我们将在本节中添加更多文章。More articles will be added to this section over time.

迁移和现代化项目类别关系图。 图1:常见的迁移和现代化项目类别。Diagram of migration and modernization project categories. Figure 1: Common migration and modernization project categories.

此系列重点介绍每个迁移方案,这些方案由确定迁移策略的不同业务目标驱动。This series focuses on each migration scenario, driven by slightly different business goals that determine the migration strategy. 对于每个部署方案,我们提供以下信息:For each deployment scenario, we provide information about:

  • 业务驱动程序和目标。Business drivers and goals.
  • 建议的体系结构。A proposed architecture.
  • 执行迁移的步骤。Steps to perform the migration.
  • 迁移完成后的清除和后续步骤的建议。Recommendations for cleanup and next steps after migration is finished.

评估Assessment

项目Article 详细信息Details
评估本地资源以供迁移到 AzureAssess on-premises resources for migration to Azure 计划方法中的此最佳实践一文介绍了如何对 VMware 上运行的本地应用程序进行评估。This best practice article in the Plan methodology discusses how to run an assessment of an on-premises application running on VMware. 本文中的示例组织通过使用数据迁移助手 Azure Migrate 和应用程序 SQL Server 数据库来评估应用程序 Vm。In the article, an example organization assesses application VMs by using Azure Migrate and the application SQL Server database by using Data Migration Assistant.

基础结构Infrastructure

项目Article 详细信息Details
部署 Azure 基础结构Deploy Azure infrastructure 这篇文章介绍了组织如何准备本地基础结构和 Azure 基础结构以供迁移。This article shows how an organization can prepare its on-premises infrastructure and its Azure infrastructure for migration. 本节提供的其他示例引用了这篇文章中建立的基础结构示例。The infrastructure example established in this article is referenced in the other samples provided in this section.

Windows Server 工作负荷Windows Server workloads

项目Article 详细信息Details
在 Azure Vm 上 Rehost 应用程序Rehost an application on Azure VMs 本文提供了有关使用 Azure Migrate 将本地应用程序 Vm 迁移到 Azure Vm 的示例。This article provides an example of migrating on-premises application VMs to Azure VMs using Azure Migrate.

SQL Server 工作负荷SQL Server workloads

项目Article 详细信息Details
将 SQL Server 数据库迁移到 AzureMigrate SQL Server databases to Azure 本文说明了虚构公司 Contoso 如何评估、计划并将其各种本地 SQL Server 数据库迁移到 Azure。This article demonstrates how the fictional company Contoso assessed, planned, and migrated its various on-premises SQL Server databases to Azure.
Rehost Azure VM 和 SQL 托管实例上的应用程序Rehost an application on an Azure VM and SQL Managed Instance 本文举例说明了如何将本地应用程序迁移到 Azure。This article provides an example of a lift-and-shift migration to Azure for an on-premises application. 此过程涉及使用 Azure 数据库迁移服务,将 Azure Migrate 和应用程序数据库迁移到 SQL 托管实例。This process involves migrating the application front-end VM by using Azure Migrate and the application database to SQL Managed Instance by using Azure Database Migration Service.
使用 SQL Server Always On 可用性组在 Azure Vm 上 Rehost 应用程序Rehost an application on Azure VMs using SQL Server Always On availability groups 此示例演示如何使用 Azure 托管 SQL Server Vm 来迁移应用程序和数据。This example shows how to migrate an application and data by using Azure-hosted SQL Server VMs. 它使用 Azure Migrate 来迁移应用程序 Vm,并使用数据库迁移服务将应用程序数据库迁移到受 Always On 可用性组保护的 SQL Server 群集。It uses Azure Migrate to migrate the application VMs and Database Migration Service to migrate the application database to a SQL Server cluster that's protected by an Always On availability group.

Linux 和开源数据库Linux and open-source databases

项目Article 详细信息Details
将开源数据库迁移到 AzureMigrate open-source databases to Azure 本文说明了虚构公司 Contoso 如何评估、计划并将其各种本地开源数据库迁移到 Azure。This article demonstrates how the fictional company Contoso assessed, planned, and migrated its various on-premises open-source databases to Azure.
将 MySQL 迁移到 AzureMigrate MySQL to Azure 本文介绍虚构公司 Contoso 如何计划并将其本地 MySQL 开源数据库平台迁移到 Azure。This article demonstrates how the fictional company Contoso planned and migrated its on-premises MySQL open-source database platform to Azure.
将 PostgreSQL 迁移到 AzureMigrate PostgreSQL to Azure 本文说明了虚构公司 Contoso 如何计划并将其本地 PostgreSQL 开源数据库平台迁移到 Azure。This article demonstrates how the fictional company Contoso planned and migrated its on-premises PostgreSQL open-source database platform to Azure.
将 MariaDB 迁移到 AzureMigrate MariaDB to Azure 本文说明了虚构公司 Contoso 如何计划并将其本地 MariaDB 开源数据库平台迁移到 Azure。This article demonstrates how the fictional company Contoso planned and migrated its on-premises MariaDB open-source database platform to Azure.
在 Azure Vm 和 Azure Database for MySQL 上 Rehost Linux 应用程序Rehost a Linux application on Azure VMs and Azure Database for MySQL 本文提供了有关使用 Azure Migrate 将 Linux 托管的应用程序迁移到 Azure Vm 的示例。This article provides an example of migrating a Linux-hosted application to Azure VMs by using Azure Migrate. 使用 数据库迁移服务将应用程序数据库迁移到 Azure Database for MySQL。The application database is migrated to Azure Database for MySQL by using Database Migration Service.
在 Azure Vm 上 Rehost Linux 应用程序Rehost a Linux application on Azure VMs 此示例演示如何使用 Azure Migrate 完成基于 Linux 的应用程序到 Azure Vm 的直接迁移。This example shows how to complete a lift-and-shift migration of a Linux-based application to Azure VMs by using Azure Migrate.

开发/测试工作负载Dev/test workloads

项目Article 详细信息Details
将开发/测试环境迁移到 Azure IaaSMigrate dev/test environments to Azure IaaS 本文演示如何通过迁移到 Azure Vm,Contoso 原名不同其针对 VMware Vm 上运行的两个应用程序的开发/测试环境。This article demonstrates how Contoso rehosts its dev/test environment for two applications running on VMware VMs by migrating to Azure VMs.
迁移到 Azure 开发测试实验室Migrate to Azure DevTest Labs 本文介绍 Contoso 如何使用开发测试实验室将其开发/测试工作负荷移动到 Azure。This article discusses how Contoso moves its dev/test workloads to Azure by using DevTest Labs.

ASP.NET 和 PHP Web 应用ASP.NET and PHP web apps

项目Article 详细信息Details
使用应用服务和 SQL 数据库重构 Windows 应用程序Refactor a Windows application using App Service and SQL Database 此示例演示如何使用 数据库迁移服务将基于 Windows 的本地应用程序迁移到 azure web 应用,以及将应用程序数据库迁移到 Azure SQL 数据库服务器实例。This example shows how to migrate an on-premises Windows-based application to an Azure web app and migrate the application database to an Azure SQL Database server instance by using Database Migration Service.
使用应用服务和 SQL 托管实例重构 Windows 应用程序Refactor a Windows application using App Service and SQL Managed Instance 此示例演示如何使用 数据库迁移服务将基于 Windows 的本地应用程序迁移到 Azure web 应用,以及将应用程序数据库迁移到 SQL 托管实例。This example shows how to migrate an on-premises Windows-based application to an Azure web app and migrate the application database to SQL Managed Instance by using Database Migration Service.
使用应用服务、Azure 流量管理器和 Azure Database for MySQL 将 Linux 应用程序重构到多个区域Refactor a Linux application to multiple regions using App Service, Azure Traffic Manager, and Azure Database for MySQL 此示例演示如何使用流量管理器将基于 Linux 的本地应用程序迁移到多个 Azure 区域的 Azure web 应用,以便与 GitHub 集成以实现持续交付。This example shows how to migrate an on-premises Linux-based application to an Azure web app on multiple Azure regions by using Traffic Manager to integrate with GitHub for continuous delivery. 应用程序数据库将迁移到 Azure Database for MySQL 实例。The application database is migrated to an Azure Database for MySQL instance.
在 Azure 中重新生成应用程序Rebuild an application in Azure 本文提供一个示例,说明如何使用一系列 Azure 功能和托管服务重建本地应用程序。This article provides an example of rebuilding an on-premises application by using a range of Azure capabilities and managed services. 这些功能和服务包括应用服务、AKS、Azure Functions、Azure 认知服务和 Azure Cosmos DB。These capabilities and services include App Service, AKS, Azure Functions, Azure Cognitive Services, and Azure Cosmos DB.
重构 Team Foundation Server 到 Azure DevOps ServicesRefactor Team Foundation Server to Azure DevOps Services 这篇文章举例说明了如何将本地 Team Foundation Server 部署迁移到 Azure 中的 Azure DevOps Services。This article shows an example migration of an on-premises Team Foundation Server deployment to Azure DevOps Services in Azure.

SAPSAP

项目Article 详细信息Details
SAP 迁移指南SAP migration guide 获取将本地 SAP 工作负荷迁移到云的实用指导。Get practical guidance to move your on-premises SAP workloads to the cloud.
将 SAP 应用程序迁移到 AzureMigrate SAP applications to Azure 针对 SAP 旅程到云的白皮书和路线图。White paper and roadmap for your SAP journey to the cloud.
适用于 Azure 上的 SAP 的迁移方法Migration methodologies for SAP on Azure 将 SAP 应用程序迁移到 Azure 的各种迁移选项的概述。Overview of various migration options to move SAP applications to Azure.

专用工作负载Specialized workloads

项目Article 详细信息Details
将本地 VMware 基础结构移动到 AzureMove on-premises VMware infrastructure to Azure 本文提供使用 Azure VMware 解决方案将本地 VMware Vm 迁移到 Azure 的示例。This article provides an example of moving on-premises VMware VMs to Azure by using Azure VMware Solution.
Azure NetApp 文件Azure NetApp Files 由 NetApp 提供支持的企业文件存储。Enterprise file storage powered by NetApp. 在 Azure 中运行 Linux 和 Windows 文件工作负荷。Run Linux and Windows file workloads in Azure.
Azure 上的 OracleOracle on Azure 在 Azure 和 Oracle 云基础结构中运行 Oracle 数据库和企业应用程序。Run your Oracle databases and enterprise applications in Azure and Oracle Cloud Infrastructure.
Azure 中的 CrayCray in Azure 在 Azure 中通过 Cray 进行高性能计算。High-performance computing with Cray in Azure. 虚拟网络上的专用 cray。A dedicated supercomputer on your virtual network.

VDIVDI

项目Article 详细信息Details
将本地远程桌面服务移到 Azure 中的 Windows 虚拟桌面Move on-premises Remote Desktop Services to Windows Virtual Desktop in Azure 本文介绍如何将本地远程桌面服务迁移到 Azure 中的 Windows 虚拟桌面。This article shows how to migrate on-premises Remote Desktop Services to Windows Virtual Desktop in Azure.

迁移扩展Migration scaling

项目Article 详细信息Details
扩展 Azure 迁移Scale a migration to Azure 本文介绍示例组织如何准备扩展到 Azure 的完整迁移。This article shows how an example organization prepares to scale to a full migration to Azure.

演示应用程序Demo applications

本部分中提供的示例文章使用了两个演示应用程序: SmartHotel360 和 osTicket。The example articles provided in this section use two demo applications: SmartHotel360 and osTicket.

SmartHotel360:此测试应用程序由 Microsoft 开发,在使用 Azure 时使用。SmartHotel360: This test application was developed by Microsoft to use when you work with Azure. 它在开源许可证下提供,你可以从 GitHub下载它。It's provided under an open-source license, and you can download it from GitHub. 它是连接到 SQL Server 数据库的 ASP.NET 应用程序。It's an ASP.NET application connected to a SQL Server database. 在这些文章中讨论的方案中,此应用程序的当前版本部署到运行 Windows Server 2008 R2 并 SQL Server 2008 R2 的两个 VMware Vm 上。In the scenarios discussed in these articles, the current version of this application is deployed to two VMware VMs running Windows Server 2008 R2 and SQL Server 2008 R2. 这些应用程序 Vm 在本地托管,由 vCenter Server 管理。These application VMs are hosted on-premises and managed by vCenter Server.

osTicket:此开源服务台票证应用程序在 Linux 上运行。osTicket: This open-source service desk ticketing application runs on Linux. 可以从 GitHub 下载它。You can download it from GitHub. 在这些文章中讨论的方案中,当前版本的应用程序部署到运行 Ubuntu 16.04 LTS 的两个 VMware Vm (使用 Apache 2、PHP 7.0 和 MySQL 5.7)。In the scenarios discussed in these articles, the current version of this application is deployed on-premises to two VMware VMs running Ubuntu 16.04 LTS using Apache 2, PHP 7.0, and MySQL 5.7.