azure web服务器_如何将简单的Web服务器从Azure迁移到阿里云

azure web服务器

This article was originally published on Alibaba Cloud. Thank you for supporting the partners who make SitePoint possible.

本文最初发表在阿里云上 感谢您支持使SitePoint成为可能的合作伙伴。

The cloud, despite its ubiquity, is still an emerging technology with vast innovations across multiple industries. Owing to its flexibility and advanced security model, organizations have already started to move most of their IT workloads to the cloud. Some of the high-level reasons to move to cloud are listed below:

尽管云无处不在,但它仍然是一种新兴技术,在多个行业中都有巨大的创新。 由于其灵活性和先进的安全模型,组织已经开始将其大多数IT工作负载移至云中。 下面列出了迁移到云的一些高级原因:

  • Fast and efficient deployment

    快速高效的部署
  • Less or no capital investment

    很少或没有资本投资
  • Reliability, scalability, sustainability & resource pooling

    可靠性,可扩展性,可持续性和资源池
  • Pay as you go, with no monthly commitment

    即付即用,无需每月承诺
  • Highly automated with utility based system

    高度自动化的基于实用程序的系统
  • On-demand service

    按需服务

Seamless integration is what we all expect when it comes to information technology, especially with migration. However, this is easier said than done. Cloud migration is fairly complicated because it involves so many elements, from picking a suitable operating system (OS) to selecting the best geographical region for our deployments. Migration also involves some standard processes and considerations and is no small feat.

无缝集成是我们所有人对信息技术(尤其是迁移)的期望。 但是,这说起来容易做起来难。 云迁移非常复杂,因为它涉及许多要素,从选择合适的操作系统(OS)到为我们的部署选择最佳地理区域。 迁移还涉及一些标准流程和注意事项,这并非易事。

Migration strategies differ on a case-by-case basis, however as a whole, cloud migration should be based on best practices from previous examples. An effective migration strategy should maintain a reliable, real-time migration, with less or zero down time. Migration can be broadly categorized into physical to virtual (cloud migration), virtual to virtual (multi-cloud), and virtual to physical (hybrid cloud). Migration can have any combination of these categories.

迁移策略因个案而异,但是总体而言,云迁移应基于先前示例中的最佳实践。 有效的迁移策略应保持可靠的实时迁移,并且停机时间更少或为零。 迁移大致可分为物理到虚拟(云迁移),虚拟到虚拟(多云)和虚拟到物理(混合云)。 迁移可以具有这些类别的任何组合。

In this article, we are focused on physical to virtual and virtual to virtual migration. Here the target is going to be the Alibaba Cloud platform. This whole process involves Alibaba tools for image conversion, OSS for storage, and some third-party tools to synchronize the data in real time.

在本文中,我们专注于物理到虚拟以及虚拟到虚拟的迁移。 目标是阿里云 平台。 这整个过程涉及用于图像转换的阿里巴巴工具,用于存储的OSS以及一些用于实时同步数据的第三方工具。

For a successful migration, the standard process and procedures below are applicable for most organizations.

为了成功进行迁移,下面的标准过程和步骤适用于大多数组织。

  • Cloud ready assessment (involves infra assessment to decide which workloads can be moved to the cloud)

    云就绪评估(涉及基础评估,以确定可以将哪些工作负载移至云)
  • Migration kick-off meeting (listing down servers, application, down time preparation, cutover and other requirements)

    迁移启动会议(列出服务器,应用程序,停机时间准备,切换和其他要求)
  • Creating a backup plan – A migration plan is incomplete without a backup plan. There is always a non-zero probability for errors to happen in a migration process, and damage is often irreversible.

    创建备份计划–没有备份计划的迁移计划是不完整的。 在迁移过程中发生错误的可能性总是非零的,并且损坏通常是不可逆的。
  • Schedule migration, notify users if there is any down time expected during cutover.

    计划迁移,并在过渡期间预期有任何停机时间时通知用户。
  • Make a checklist of functions.

    制作功能清单。
  • Post migration testing before moving to production, to ensure all are met in terms of functions, operations.

    在进行生产之前要进行迁移测试,以确保在功能,操作方面都符合要求。

Cloud migration can be perform in two ways: application level migration and virtual machine (VM) migration. The choice is based on the applications running on virtual/physical servers; we may need to plan which one will be best suitable for migration.

可以通过两种方式执行云迁移:应用程序级别迁移和虚拟机(VM)迁移。 该选择基于在虚拟/物理服务器上运行的应用程序; 我们可能需要计划哪个最适合迁移。

应用程序迁移 (Application Migration)

During migration assessment, we need to check how many applications can support real time migration. For example, Microsoft Exchange can use native DAG; SQL replication tools can be used for database mirroring.

在迁移评估期间,我们需要检查有多少应用程序可以支持实时迁移。 例如,Microsoft Exchange可以使用本机DAG。 SQL复制工具可用于数据库镜像。

Irrespective of any application and platform, it is always better to get an insight from application experts. Typically, a migration expert will create similar infrastructure as the source on the target platform (such as Alibaba Cloud), and then establish a connection using VPN/MPLS to create site-site connection. Some applications can simply be migrated using public IP without VPN.

无论任何应用程序和平台如何,最好都从应用程序专家那里获得见识。 通常,迁移专家会在目标平台(例如Alibaba Cloud )上创建与源类似的基础结构,然后使用VPN / MPLS建立连接以创建站点到站点的连接。 某些应用程序可以简单地使用没有VPN的公共IP进行迁移。

Do real time replication/migration using native methods and switchover. Switchover/cutover requires several steps to be performed by administrators like changing DNS, routing configuration, firewall customization and so on.

使用本机方法和切换进行实时复制/迁移。 切换/切换需要管理员执行几个步骤,例如更改DNS,路由配置,防火墙自定义等等。

VM迁移(映像迁移) (VM Migration (Image Migration))

If there is no available method for application migration, or if the application level migration is complicated, VM migration is an alternative. Also known as image migration, VM migration is the best option for any organization to simplify the migration process.

如果没有可用的方法来进行应用程序迁移,或者应用程序级别的迁移很复杂,则可以选择VM迁移。 VM迁移也称为映像迁移,是任何组织简化迁移过程的最佳选择。

This method is sometimes simply referred to as migrating from a platform to another platform. Alibaba Cloud runs on the KVM/XEN platform, so we need to ensure that it has all required drives to support automation, licensing, and all other cloud dependencies.

有时将该方法简称为从一个平台迁移到另一个平台。 阿里云在KVM / XEN平台上运行,因此我们需要确保其具有所有必需的驱动器来支持自动化,许可和所有其他云相关性。

There are few migration scenarios listed below:

下面列出了几种迁移方案:

  • On premise (IDC) to Alibaba Cloud

    本地(IDC)到阿里云
  • Traditional virtualization platform to Alibaba Cloud

    传统虚拟化平台到阿里云
  • Other public cloud to Alibaba Cloud

    其他公共云到阿里云
  • One region of Alibaba Cloud to another region of Alibaba Cloud

    阿里云的一个区域到阿里云的另一个区域

阿里云迁移工具 (Alibaba Cloud Migration Tool)

Irrespective of any source platform Alibaba Cloud has a tool called Alibaba Cloud Migration Tool (Cloud Migration Tool) to perform migration to create ECS instances. Alibaba Cloud invests resources into various categories of image migration to carry out the process with ease and effectiveness.

无论使用哪种源平台,阿里云均具有一个称为阿里云迁移工具 (Cloud Migration Tool)的工具,可以执行迁移以创建ECS实例。 阿里云将资源投入各种类型的映像迁移中,以轻松,高效地执行该过程。

Before you use the Alibaba Cloud Migration Tool, you need to consider the following:

使用阿里云迁移工具之前 ,需要考虑以下事项:

  • The on-premises server can access the Internet for uninterruptedly transferring data to Alibaba Cloud ECS console.

    本地服务器可以访问Internet,以不间断地将数据传输到阿里云ECS控制台。

  • The system time of the on-premises server is synchronized with the real time. Otherwise, an error indicating abnormal TimeStamp is recorded in the migration log file.

    本地服务器的系统时间与实时同步。 否则,指示异常时间戳记的错误记录在迁移日志文件中。
  • To enable all the server configuration successfully after the migration, we recommend that you install cloud-init for your on-premises servers.

    为了在迁移后成功启用所有服务器配置,我们建议您为本地服务器安装cloud-init。

For on-premises servers running Windows OS

对于运行Windows OS的本地服务器

  • The go2aliyun_client.exe and Rsyncbinrsync.exe programs are not restricted by firewall on the server.

    go2aliyun_client.exe和Rsyncbinrsync.exe程序不受服务器上防火墙的限制。
  • The system start loader is normal.

    系统启动加载程序正常。
  • Run Alibaba Cloud Migration Tool as an administrator.

    以管理员身份运行阿里云迁移工具。

For on-premises servers running Linux OS

对于运行Linux OS的本地服务器

  • The go2aliyun_client program is not restricted by firewall on the server.

    go2aliyun_client程序不受服务器上防火墙的限制。
  • The Rsync library has been installed.

    Rsync库已安装。

oCentOS: Run yum install rsync –y. oUbuntu: Run apt-get install rsync –y. oDebian: Run apt-get install rsync –y. oOther distributions: See the installation documents of the distributions on their official website.

oCentOS:运行yum install rsync –y。 实用程序:运行apt-get install rsync –y。 oDebian:运行apt-get install rsync –y。 o其他发行版:请在其官方网站上查看发行版的安装文档。

  • The Xen or Kernel-based Virtual Machine (KVM) driver is installed. For more information about how to install a KVM driver, see install virtio driver.

    已安装Xen或基于内核的虚拟机(KVM)驱动程序。 有关如何安装KVM驱动程序的更多信息,请参见install virtio driver

  • SELinux must has been deactivated. You can temporarily deactivate SELinux by running setenforce 0.

    SELinux必须已停用。 您可以通过运行setenforce 0暂时停用SELinux。
  • Run Alibaba Cloud Migration Tool as a root user.

    以root用户身份运行阿里云迁移工具

  • If the kernel of your on-premises Linux servers is too old and the version of GRUB (GRand Unified Bootloader) is earlier than 1.9. You may update the boot loader GRUB to a version later than 1.9.

    如果本地Linux服务器的内核太旧并且GRUB(GRand Unified Bootloader)的版本早于1.9。 您可以将引导加载程序GRUB更新到1.9以上的版本。

The migration process is as follows:

迁移过程如下:

  • Request for migration tool from this link

    通过此链接请求迁移工具

  • After approval, decompress the folder at source and modify the JSON Script as needed

    批准后,在源处解压缩该文件夹并根据需要修改JSON脚本
  • JSON Script needs to have the value of AccessID, Secret Key, Region ID, Image name, System disk size & Data disk

    JSON脚本需要具有AccessID,秘密密钥,区域ID,图像名称,系统磁盘大小和数据磁盘的值
  • For more details refer to this link and refer to below screenshots to validate the process.

    有关更多详细信息,请参考此链接,并参考以下屏幕截图以验证该过程。

样品迁移过程 (Sample Migration Process)

Below are the steps performed to migrate a simple web server from Azure to Alibaba cloud.

下面是将简单的Web服务器从Azure迁移到阿里云所执行的步骤。

Operating System: Windows Server 2016

作业系统:Windows Server 2016

1. Extract the folder and locate JSON > Open with > Notepad

1.提取文件夹并找到JSON>打开方式>记事本

alt

2. Modify as below. Refer to this link for more parameters. To create and obtain new access key, refer here.

2.进行如下修改。 有关更多参数,请参考此链接 。 要创建并获取新的访问密钥,请参阅此处

{
    "access_id": "ENTER_YOUR_ACCESS_ID",
    "secret_key": "ENTER_YOUR_SECRET_KEY",
    "region_id": "me-east-1",
    "image_name": "KingsonWS",
    "system_disk_size": 60,
    "platform": "",
    "architecture": "",
    "data_disks": [],
    "bandwidth_limit": 0
}

3. Save the file and run go2aliyun_client tool as an administrator.

3.保存文件,然后以管理员身份运行go2aliyun_client工具。

alt

4. You may notice that it creates VPC, Vswitch, Security group all by itself.

4.您可能会注意到它自己创建了VPC,Vswitch,安全组。

alt
alt
alt

5. During migration you can see that it creates a new instance named INSTANCE_FOR_GOTOALIYUN.

5.在迁移期间,您可以看到它创建了一个名为INSTANCE_FOR_GOTOALIYUN的新实例。

6. Post sync the same will be exported with the image name that you specified in JSON and the same instance will be released.

6.同步后,将使用您在JSON中指定的图像名称导出相同的图像,并释放相同的实例。

7. Below is the screenshot for the new webserver image that was migrated from Azure to Alibaba.

7.下面是从Azure迁移到阿里巴巴的新Web服务器映像的屏幕截图。

alt
alt

Source before migration:

迁移前的来源:

alt

Image created after migration:

迁移后创建的映像:

alt

Target site after migration:

迁移后的目标站点:

alt

After completing the migration, you still need to check whether the migration is 100% successful. To do this, you need to run some tests as listed below.

完成迁移后,您仍然需要检查迁移是否100%成功。 为此,您需要运行下面列出的一些测试。

Post migration tasks:

迁移后任务:

  • Ensure all services are functioning as expected.

    确保所有服务均按预期运行。
  • Make comparison using functions check list.

    使用功能检查表进行比较。
  • Ensure that the Windows license is activated by running slmgr.vbs /dlv command in command prompt.

    通过在命令提示符下运行slmgr.vbs / dlv命令,确保Windows许可证已激活。
  • Ensure to do all DNS redirection to Alibaba Cloud instance public IP (If required).

    确保将所有DNS重定向到阿里云实例公共IP(如果需要)。
  • Make sure to restart servers from cloud portal and monitor the events to confirm if any issues needs an attention.

    确保从云门户重新启动服务器并监视事件以确认是否需要注意任何问题。

Considerations:

注意事项:

  • This migration tool supports data disks as well.

    该迁移工具也支持数据磁盘。
  • It doesn’t support incremental sync. If your application requires real-time replication, you may have to consider using native or third-party tools.

    它不支持增量同步。 如果您的应用程序需要实时复制,则可能必须考虑使用本机或第三方工具。
  • The same image can also be used to enable Hybrid DR environment. It requires SID correction in active directory environment before joining to the domain.

    同一映像也可以用于启用混合DR环境。 加入域之前,它需要在活动目录环境中更正SID。

Please note that region level migration within the same Alibaba Cloud account can be achieved by taking a snapshot and sharing the copy to the target region.

请注意,可以通过拍摄快照并将副本共享到目标区域来实现同一阿里云帐户内的区域级别迁移。

结语 (Wrapping It Up)

We hope you found this guide useful. It’s always recommended that you get advice from the experts, to ensure the most suitable approach to make migration as seamless as possible.

我们希望您对本指南有所帮助。 始终建议您从专家那里获取建议,以确保最合适的方法使迁移尽可能无缝。

Did you know you can get $300 of Alibaba Cloud credit just for signing up as a new user, and that you could win up to $3,840 of additional credit? Check out the details over at Alibaba Cloud.

您知道吗?只要注册成为新用户,您就可以获得300美元的阿里云信用额度,并且您最多可以赢得3,840美元的信用额度? 在阿里云上查看详细信息

翻译自: https://www.sitepoint.com/how-to-migrate-a-simple-web-server-from-azure-to-alibaba-cloud/

azure web服务器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值