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

Moodle 迁移资源Moodle migration resources

使用 Azure 资源管理器 (ARM) 模板迁移 Moodle 时,部署将在 Azure 中创建资源。When you use an Azure Resource Manager (ARM) template to migrate Moodle, the deployment creates resources within Azure. 作为此部署过程的一部分,附加部署会通过子模板自动运行。As part of this deployment process, additional deployments automatically run through child templates. 以下部分介绍了这些部署及其创建的资源。The following sections describe these deployments and the resources they create.

网络模板Network template

网络模板部署创建以下资源:The network template deployment creates the following resources:

  • Azure 虚拟网络:你自己的网络在云中的表示形式。Azure Virtual Network: A representation of your own network in the cloud. 虚拟网络是专用于你的订阅的 Azure 云的逻辑隔离。Virtual network is a logical isolation of the Azure cloud that's dedicated to your subscription. 当你创建虚拟网络时,其中的服务和虚拟机可以直接安全地在云中通信。When you create a virtual network, your services and virtual machines within it can communicate directly and securely in the cloud. 网络模板创建的虚拟网络包括虚拟网络名称、API 版本、位置、DNS 服务器名称和地址空间。The virtual network that the network template creates includes the virtual network name, API version, location, DNS server name, and address space. 地址空间包含子网可以使用的 IP 地址范围。The address space contains a range of IP addresses that subnets can use.

  • 网络安全组 (NSG) :网络筛选器或防火墙,其中包含安全规则的列表。Network security group (NSG): A networking filter, or firewall, that contains a list of security rules. 这些规则允许或拒绝到连接到虚拟网络的资源的网络流量。These rules allow or deny network traffic to resources connected to a virtual network.

  • 网络接口:一个接口,Azure 虚拟机可使用该接口与 Internet、Azure 和本地资源进行通信。Network interface: An interface that an Azure virtual machine can use to communicate with the internet, Azure, and on-premises resources.

  • 子网:大型网络内的小型网络。Subnet: A smaller network inside a large network. 子网也称为子网。Subnets are also known as subnetworks. 默认情况下,子网中的 IP 地址可与虚拟网络中的任何其他 IP 地址进行通信。By default, an IP address in a subnet can communicate with any other IP address inside the virtual network.

  • 公共 IP 地址: Azure 资源用于与 internet 通信的 ip 地址。Public IP address: An IP address that an Azure resource uses to communicate with the internet. 该地址专用于 Azure 资源。The address is dedicated to the Azure resource.

  • Azure 负载均衡器:一个负载均衡器,可在服务器场中的多个服务器之间有效地分发网络或应用程序流量。Azure Load Balancer: A load balancer that efficiently distributes network or application traffic across multiple servers in a server farm. 负载均衡器只会将请求发送到联机的服务器,从而确保高可用性和可靠性。Load balancer ensures high availability and reliability by only sending requests to servers that are online.

  • Azure 应用程序网关:负载均衡器的替代方法。Azure Application Gateway: An alternative to Load Balancer. 所有四个预定义 ARM 模板都部署负载均衡器。All four predefined ARM templates deploy Load Balancer. 如果使用完全可配置的部署而不是 ARM 模板,则可以选择 "应用程序网关" 而不是 "负载均衡器"。If you use a fully configurable deployment instead of an ARM template, you can choose Application Gateway instead of Load Balancer. 应用程序网关是一个 web 流量负载均衡器,可用于管理 web 应用程序的流量。Application Gateway is a web-traffic load balancer that you can use to manage traffic to your web applications. 应用程序网关可以根据 HTTP 请求的其他属性(如 URI 路径或主机标头)做出路由决策。Application Gateway can make routing decisions based on the additional attributes of an HTTP request, such as a URI path or host header.

  • 适用于 Redis 的 Azure 缓存:基于开源软件 Redis 的内存中数据存储区。Azure Cache for Redis: An in-memory data store based on the open-source software redis. Redis 提高了存储后端数据的应用程序的性能和可伸缩性。Redis improves the performance and scalability of an application that heavily stores back-end data. 它可以通过在服务器内存中保留频繁访问的数据来处理大量的应用程序请求。It can process large volumes of application requests by keeping frequently accessed data in the server memory. 可以快速写入和读取此数据。This data can be written to and read from quickly.

存储模板Storage template

存储帐户模板部署创建 FileStorage 类型的 Azure 存储帐户。The storage account template deployment creates an Azure Storage account of type FileStorage. 此帐户具有高级性能,本地冗余存储 (LRS) 复制,1 tb (TB 的存储) 。The account has premium performance, locally redundant storage (LRS) replication, and 1 terabyte (TB) of storage. 配置预定义模板,以便包含 Azure 文件的存储帐户创建文件共享。The predefined template is configured so that a storage account with Azure Files creates file shares.

Azure 存储帐户包含 azure 存储数据对象,例如 blob、文件、队列、表和磁盘。An Azure Storage account contains Azure Storage data objects, such as blobs, files, queues, tables, and disks. 存储帐户为 Azure 存储数据提供唯一的命名空间,这些数据可通过 HTTP 或 HTTPS 从世界各地进行访问。The storage account provides a unique namespace for your Azure Storage data that's accessible from anywhere in the world over HTTP or HTTPS. 提供以下类型的 Azure 存储帐户: General-Purpose v1、General-Purpose v2、BlockBlobStorage、FileStorage 和 Blob 存储。The following types of Azure storage accounts are available: General-Purpose v1, General-Purpose v2, BlockBlobStorage, FileStorage, and Blob Storage. 复制类型可以是异地冗余或 LRS 和区域冗余存储。The replication type can be geo-redundant or LRS and zone-redundant storage. 性能类型为 "标准" 和 "高级",单独的存储帐户可存储多达 500 TB 的数据,就像任何其他 Azure 服务一样。The performance types are standard and premium, and an individual storage account can store up to 500 TB of data, like any other Azure service.

ARM 模板支持以下存储帐户类型:ARM templates support the following storage account types:

  • 网络文件系统 (NFS) :远程主机可用于在网络上装载文件系统的帐户类型。Network File System (NFS): An account type that a remote host can use to mount file systems over a network. 远程主机可与这些文件系统交互,就像它们是在本地装载一样。The remote host can interact with those file systems as though they're mounted locally. 在此设计中,系统管理员可以将资源合并到网络中的集中式服务器。With this design, system administrators can consolidate resources into centralized servers in the network.

  • GlusterFS:一种开源分布式文件系统,可按构建基块方式横向扩展以存储多达 pb 的数据。GlusterFS: An open-source distributed file system that can scale out in building-block fashion to store multiple petabytes of data.

  • Azure 文件:提供安全、基于 SMB 且完全托管的云文件共享的公有云文件存储,这些共享还可以在本地缓存,以实现性能和兼容性。Azure Files: The only public cloud file storage that delivers secure, SMB-based, and fully managed cloud file shares that can also be cached on-premises for performance and compatibility. 对于 NFS 和 GlusterFS,复制是标准 LRS,存储类型为常规用途 v1。For NFS and GlusterFS, the replication is standard LRS, and the storage type is general-purpose v1. 对于 Azure 文件,复制为 premium LRS,类型为 FileStorage。For Azure Files, the replication is premium LRS, and the type is FileStorage.

这些存储机制因选择的部署而异。These storage mechanisms differ depending on which deployment you choose. NFS 和 GlusterFS 创建容器,Azure 文件创建文件共享。NFS and GlusterFS create a container, and Azure Files creates a file share. 对于最小和最短的 Moodle 大小,模板支持 NFS。For minimal and short-to-mid Moodle sizes, the template supports NFS. 对于大和最大的大小,模板支持 Azure 文件。For large and maximal sizes, the template supports Azure Files. 若要访问容器和文件共享,请访问 Azure 门户,并选择资源组中的存储帐户。To access the containers and file shares, go to the Azure portal, and select the storage account in the resource group.

Azure 门户的屏幕截图。

数据库模板Database template

数据库模板部署创建 Azure Database for MySQL 服务器。The database template deployment creates an Azure Database for MySQL server. Azure Database for MySQL 易于设置、管理和缩放。Azure Database for MySQL is easy to set up, manage, and scale. 它可自动管理和维护基础结构和数据库服务器,包括日常更新、备份和安全性。It automates the management and maintenance of your infrastructure and database server, including routine updates, backups, and security. Azure Database for MySQL 是通过最新的 MySQL 社区版(包括版本5.6、5.7 和8.0)构建的。Azure Database for MySQL is built with the latest community edition of MySQL, including versions 5.6, 5.7, and 8.0. 若要访问模板创建的数据库服务器,请访问 Azure 门户并打开部署进程提供的资源组。To access the database server that the template creates, go to the Azure portal and open the resource group that the deployment process provides. 然后,请跳到 Azure Database for MySQL 服务器Then go to Azure Database for MySQL server. 该模板为数据库服务器提供服务器名称、服务器管理员登录名、MySQL 版本和性能配置。The template gives the database server a server name, a server admin login name, a MySQL version, and a performance configuration.

虚拟机模板Virtual machine template

虚拟机模板部署将虚拟机指定为控制器虚拟机。The virtual machine template deployment designates a virtual machine as a controller virtual machine. 控制器虚拟机的操作系统为 Ubuntu 18.04。The operating system for the controller virtual machine is Ubuntu 18.04.

虚拟机扩展是小型应用程序,可在 Azure 虚拟机上提供部署后配置和自动化任务。Virtual machine extensions are small applications that provide post-deployment configuration and automation tasks on Azure Virtual Machines. 虚拟机扩展运行 shell 脚本,该脚本在控制器虚拟机上安装 Moodle 并捕获日志文件。A virtual machine extension runs a shell script that installs Moodle on the controller virtual machine and captures log files. stderr stdout 在文件夹中创建和日志文件 /var/lib/waagent/custom-script/download/0/It creates the stderr and stdout log files in the /var/lib/waagent/custom-script/download/0/ folder. 你可以将这些文件视为根用户。You can view these files as a root user.

规模集模板Scale set template

规模集模板部署创建 虚拟机规模集The scale set template deployment creates a virtual machine scale set. 通过使用虚拟机规模集,可以部署和管理一组自动缩放虚拟机。By using a virtual machine scale set, you can deploy and manage a set of autoscaling virtual machines. 可以手动缩放规模集中的虚拟机数,或根据资源使用情况(如 CPU、内存需求或网络流量)定义要自动缩放的规则。You can scale the number of virtual machines in the scale set manually or define rules to autoscale based on resource usage like CPU, memory demand, or network traffic. 当实例向上扩展时,它将部署虚拟机。When an instance scales up, it deploys a virtual machine. 然后,将运行一个安装 Moodle 必备组件并设置 cron 作业的 shell 脚本。Then a shell script runs that installs Moodle prerequisites and sets up cron jobs. 规模集中的虚拟机具有专用 IP 地址。A virtual machine in a scale set has a private IP address. 有关在规模集中查看虚拟机实例以及如何访问这些实例的详细信息,请参阅 虚拟机规模集文档For more information on viewing the virtual machine instances in a scale set and how to access these instances, see the virtual machine scale set documentation.

后续步骤Next steps

继续 Moodle 手动迁移步骤 ,以执行 Moodle 迁移过程中的后续步骤。Continue to Moodle manual migration steps for the next steps in the Moodle migration process.