aws ec2 选择可用区
In this article, we will review how to set up multi-subnet Always On Availability groups using AWS EC2 instances and AWS FSx as file share witness.
在本文中,我们将回顾如何使用AWS EC2实例和AWS FSx作为文件共享见证来设置多子网Always On可用性组。
The following are the steps involved in creating a multi-subnet Always On Availability groups in AWS EC2 instances:
以下是在AWS EC2实例中创建多子网Always On可用性组所涉及的步骤:
- Prepare EC2 instances 准备EC2实例
- Create AWS FSx for file share witness 创建用于文件共享见证的AWS FSx
- Create Windows Server Failover cluster 创建Windows Server故障转移群集
- Create Always On Availability Groups 创建始终在线可用性组
Let’s go over these steps one by one.
让我们一步一步地进行这些步骤。
准备EC2实例 (Preparing EC2 instances)
Log in to the AWS management console, click on Services, and navigate to the EC2 console.
登录到AWS管理控制台,单击服务 ,然后导航到EC2控制台。
Click on the Launch Instance button and choose the instance of your choice. For demo purposes, I used Windows Server 2019 with SQL Server 2017 Enterprise edition image. You can also launch windows server image and install SQL Server by bringing your own license method (BYOL).
单击启动实例按钮,然后选择所需的实例。 出于演示目的,我将Windows Server 2019与SQL Server 2017 Enterprise版映像一起使用。 您还可以通过自带许可证方法(BYOL)启动Windows Server映像并安装SQL Server。
Choose the instance type of your choice and configure the instance details like virtual private cloud network (VPC), subnet, etc. In this case, I am launching node 1 in the us-east-1a availability zone.
选择所需的实例类型,然后配置实例详细信息,例如虚拟私有云网络(VPC),子网等。在这种情况下,我将在us-east-1a可用性区域中启动节点1。
Add the storage and tag the instances. Configure the security group and launch the instance. Similarly, launch node 2 in the same virtual private cloud network (VPC) but a different availability zone i.e., us-east-1b. So, we have both the nodes up and running in the respective availability zones.
添加存储并标记实例。 配置安全组并启动实例。 同样,在相同的虚拟私有云网络(VPC)中启动节点2,但在不同的可用区域(即us-east-1b)中启动节点2。 因此,我们在相应的可用区中都启动并运行了节点。
Add two secondary IPs for each node. One is used for Windows Server Failover Clustering, and the other will be used for Always On Availability group listener.
为每个节点添加两个辅助IP。 一种用于Windows Server故障转移群集,另一种用于Always On可用性组侦听器。
To add the secondary IPs, select the node, and click on Actions (1). Click on Networking (2) and finally select Manage IP Addresses (3).
要添加辅助IP,请选择节点,然后单击“操作(1)”。 单击网络(2),最后选择管理IP地址(3)。
In Manage IP Addresses pop up, Click on Assign new IP two times and then click on Yes, Update as shown in the below image. You can input the custom IP addresses that are available or use the auto-assign option, which assigns a random IP address automatically.
在弹出的“ 管理IP地址”中 ,单击两