Customers have expressed a desire for more flexible options for installing SQL Server, seeking greater control during deployment. Previous versions of the AWS Launch Wizard allowed for the deployment of Always On Availability Groups exclusively on Windows Server. However, with the latest update, users can now deploy Always On configurations, as well as single-node setups, on both Windows Server and Linux via Amazon Elastic Compute Cloud (EC2).
The Launch Wizard simplifies the process of sizing, configuring, and deploying Microsoft SQL Server Always On applications on EC2, alongside other applications like SAP, eliminating the need for manual resource identification and provisioning. It guides users through a series of sizing and customization questions, offering recommendations and pricing feedback. This results in a production-ready, highly available application that aligns with budgetary constraints while being optimized for security, reliability, and efficiency, adhering to best practices outlined in the AWS Well-Architected Framework.
In this article, I will highlight the new capability to deploy SQL Server Always On topologies on Linux. This enhancement allows customers to run SQL Server workloads on Linux-based systems without requiring Windows Server licenses. I will also provide a step-by-step guide for deploying an Always On application on Linux using the Launch Wizard. For further details on single-node deployments, check out this blog post for additional insights.
Differences with SQL Server on Linux
The SQL Server database engine operates similarly on both Windows Server and Linux; however, certain tasks differ significantly when using Linux. Fortunately, the Launch Wizard is designed to help you adapt to these changes and configure highly available solutions.
A major distinction between running SQL Server Always On applications on Linux versus Windows involves failover clustering. With Always On Availability Groups on Windows Server, users benefit from the built-in features of Windows Server Failover Cluster (WSFC) and Active Directory. In contrast, Linux lacks WSFC and Active Directory for failover clustering. Instead, the Launch Wizard configures Pacemaker and virtual IP resources, ensuring that the IP remains stable during failovers.
In clustering solutions, a quorum is utilized to determine which node assumes primary control during a failure. While traditional setups often require a minimum of three nodes, the Launch Wizard can configure a two-node cluster. To achieve quorum in this setup, an additional resource must be designated as a cluster witness. Unlike Windows deployments, which typically use a file share for this purpose, SQL Server on Linux employs a third SQL Server node solely for maintaining cluster configuration metadata. Here’s a simplified representation of this setup:
Whether you choose a two-node configuration or more, this process involves significant provisioning and configuration work. The Launch Wizard automates these tasks, saving you valuable time and effort. Additionally, it generates a reusable AWS CloudFormation template for future deployments.
Deploying SQL Server Always On on Linux
To illustrate the new support, let’s walk through the deployment of SQL Server Always On on Linux.
In the AWS Management Console, I navigate to the Launch Wizard home and select “Choose application.” Next, I select the application type and click “Create deployment” to initiate the Launch Wizard.
The first step informs me that a role will be created in my account, granting Launch Wizard the necessary permissions to access AWS services for resource provisioning.
After proceeding, I begin configuring my Always On application settings. I select Linux as the target operating system and choose a highly available deployment model, although a single-instance deployment is also an option. Many subsequent options will feel familiar if you’ve read the original AWS News Blog post.
I provide a name for the deployment and can designate an Amazon Simple Notification Service (SNS) topic ARN for alerts and notifications.
I can either deploy resources in an existing Virtual Private Cloud (VPC) that meets requirements or create a new one. In this scenario, I opt to create a new VPC, tagging it as “sqhalinux-vpc.” Additionally, I specify a key pair name for connecting to the instances, choosing “james-demo@us-east-1.”
Next, I configure the SQL Server settings by setting an administrative password and deciding between using a license-included image from AWS or a custom AMI for Bring-Your-Own licenses. Note that custom AMIs must meet specific requirements, as outlined in the documentation.
As noted earlier, WSFC is not available for SQL Server on Linux, which means it cannot detect failover events. For Linux deployments, the Launch Wizard installs and configures Pacemaker. For the cluster settings, I provide a name, password for the cluster user account, and credentials for the SQL Pacemaker account, used for communication with SQL Server.
The SQL Server nodes must also share signed certificates, requiring a storage location; I specify an existing Amazon S3 bucket.
Finally, I can assign names for the primary and secondary SQL Server nodes, the additional configuration node for quorum, and names for the database and availability group. Naming the nodes simplifies identification; if no names are assigned, Launch Wizard will generate random ones.
After clicking “Next,” I’m taken to infrastructure requirements settings. Depending on the application type, the Launch Wizard may pre-select a compute and storage combination or allow me to define requirements. I choose to proceed with the suggested infrastructure.
Next, the Launch Wizard displays the estimated cost based on my selections, an invaluable feature that helps me adjust my choices to fit my budget before deployment.
Clicking “Next” leads me to a summary of my selections. Once satisfied, I simply click “Deploy” to initiate the deployment process and allow the Launch Wizard to handle the complexities of launching my high-availability SQL Server Always On setup.
The deployment may take some time; I can monitor the status by clicking on the application name.
Upon completion, I review the status in the Amazon EC2 console, where I see the newly created instances (including primary, secondary, and configuration nodes for quorum). Notably, my requested names have been applied to the instances, rather than the default Launch Wizard naming convention.
For further reading, you can explore this excellent resource which provides valuable insights into the onboarding process for Amazon warehouse workers. Additionally, if you’re looking for more expert information on this subject, check out this authoritative piece.
Leave a Reply