AWS Marketplace

Establishing Amazon EC2 infrastructure for Oracle RAC database migrations with FlashGrid

Clustered databases provide high availability for the majority of mission-critical workloads in finance, telecom, retail, public sector, defense, and other industries.  In these industries, even a small downtime translates into significant losses. As the industries migrate their IT infrastructures to AWS, one challenge they face is migrating Oracle RAC clustered databases. These databases are today sitting in datacenters either on physical hardware or in virtualized environments. The challenge becomes most pronounced when an organization takes a conservative “migrate first, re-engineer after” approach to reduce the complexity and uncertainties of already massive digital transformation projects.

As a result, some organizations are looking for lift-and-shift-to-AWS options for their clustered Oracle databases. Because an RAC database usually combines high requirements for size, performance, and availability, this dictates the need for a reliable and high-performing database infrastructure.

In this post, I show you how to create an Amazon EC2 infrastructure for Oracle RAC. This is delivered by using FlashGrid, available in AWS Marketplace. Flashgrid tools use AWS CloudFormation for infrastructure-as-code deployments, complete with installation and patching of database software.

Solution overview

FlashGrid Cloud Cluster for Oracle RAC is an engineered cloud system. A FlashGrid Cloud Cluster is a virtual database infrastructure appliance for Oracle RAC that can be deployed into your AWS accounts. It’s similar to the engineered systems of the datacenter era that were designed, pre-configured, and tested with a specific workload in mind.

The following diagram shows how components of the solution are placed in AWS infrastructure. A typical cluster consists of two, three, or more Amazon EC2 instances running Oracle RAC database instances. The EC2 instances are spread across availability zones, which allows maximizing the database uptime service level agreement (SLA). Amazon EBS volumes are used as the primary storage for user data. FlashGrid Storage Fabric software provides shared access to the EBS volumes. More details are available in the FlashGrid white paper. Refer to the following diagram.

Prerequisites

For a successful deployment, you need the following prerequisites:

  • An AWS account with AWSCloudFormationFullAccess and AmazonEC2FullAccess You can’t use trial accounts because of limitations on the number of vCPUs.
  • Access to the FlashGrid Cloud Cluster AMI in AWS Marketplace. Cluster nodes are created using this AMI.
  • An Amazon S3 bucket with Oracle installation and patch files.
  • A Virtual Private Cloud (VPC) where the cluster will be deployed. You can create a VPC for the cluster or put it in an existing VPC. For this post, we assume that you create a VPC by choosing the corresponding option in FlashGrid Launcher. For information about deploying a cluster in an existing VPC, see the FlashGrid Cloud Cluster for Oracle RAC on AWS Deployment Guide.

To get the AMI, follow these steps.

  1. Open one of the FlashGrid Cloud Cluster product pages in AWS Marketplace:
  2. Choose Continue.
  3. Choose the Manual Launch
  4. Choose Accept Software Terms.

To create an S3 bucket with the correct IAM role access, follow these steps.

  1. Create an S3 bucket or folder for uploading the installation files.
  2. Upload the required files to the S3 bucket or folder. The list of required files depends on the database version and on the Oracle Release Update that will be installed. An exact list of required files to put in the bucket is provided during the configuration of the cluster in the Launcher tool, described in the next section.
  3. On the IAM console, create a policy named GetOracleFilesFromS3 that allows the s3:GetObject action on all uploaded files.
  4. Create a role named GetOracleFilesFromS3 and attach the GetOracleFilesFromS3 policy to it.
  5. Use the GetOracleFilesFromS3 role when configuring cluster parameters in the FlashGrid Cloud Cluster Launcher tool.

Step 1: Sizing the new cluster

To estimate the size of a new cluster on AWS, evaluate the following parameters.

Number of database nodes to deploy

For this post, I focus on two- and three-node configurations that are standard for FlashGrid Launcher. More complex setups with more nodes are available on request via customized configurations.

In many cases, it’s practical to simplify a horizontally scaled on-premises cluster with more than three nodes to a two- or three-node cluster on AWS, and then leverage the wide range of vertical scaling that can be achieved by changing AWS instance sizes of the cluster nodes.

Type and size of EC2 instances

To achieve the required level of database performance, you must have enough CPU cores, memory, storage throughput, and network throughput at the EC2 instance level. For a lift-and-shift migration, a good starting point is matching the CPU and memory sizing of the existing on-premises database nodes. The R5b instance type offers a ratio of CPU, memory, and storage throughput that is optimal in most cases. You can do further sizing optimization based on an Oracle AWR report captured during peak hours.

The FlashGrid architecture enables you to resize database nodes without database downtime, one node at a time. This means that the initial sizing for a new deployment doesn’t need to be precise because you can adjust the instance sizing after the deployment.

Database size

The corresponding amount of Amazon EBS storage is provisioned on each of the database nodes.

Step 2: Generating an AWS CloudFormation template with FlashGrid Launcher

FlashGrid Launcher is an online tool available when you choose Launch on the FlashGrid website. The launcher is a configuration wizard that collects parameters for a cluster and generates an AWS CloudFormation template that deploys the cluster.

The configuration steps are self-explanatory, with detailed instructions provided at each step. After the configuration is complete, the final screen offers to launch the cluster. Choosing Launch Cluster generates an AWS CloudFormation template and takes you to your AWS account with the template ready to be deployed, as described in step 3.

Step 3: Creating and initializing the database infrastructure

This is a simplified description that assumes that you create a VPC for the cluster. For advanced features and troubleshooting, see the FlashGrid Cloud Cluster for Oracle RAC on AWS Deployment Guide and the FlashGrid Knowledge Base.

A. Step 2 opens the AWS CloudFormation console to the Create stack wizard. To complete the wizard, follow these steps.

  1. Choose Next.
  2. On the Specify stack details page, under Cluster Nodes, select your SSH key and choose Next.
  3. On the Configure stack options page, keep the default values and choose Next.
  4. On the Review page, choose Create stack.
  5. Wait until the status of the stack changes to CREATE_COMPLETE.

B. If creating the stack fails, do the following:

  1. Check for the cause of the failure on the Events tab.
  2. Correct the cause of the error.
  3. Delete the failed stack.
  4. Repeat the above steps for creating a new stack.

After the stack has been created, the cluster still needs approximately 90 minutes to complete software initialization. During this time, Oracle software is installed and patched using the files in the S3 bucket, and ASM (Automatic Storage Management) disk groups are created.

C. To check on the initialization process, follow these steps.

  1. Use the Amazon EC2 console to get the IP addresses of the cluster node instances.
  2. Connect via SSH to the first (as specified on the cluster configuration page) cluster node as user fg@.
  3. Check the current initialization status of the cluster in the welcome message: in progress, failed, or completed.
  4. If initialization is still in progress, wait for it to complete. You receive a broadcast message when initialization completes or fails.

When initialization is complete, the first cluster node shows a message confirming that initialization of the cluster completed successfully.

The cluster is now up and running. It doesn’t have databases created yet. That step is left for your database administrator (DBA) to complete.

For standard maintenance operations, including the graceful shutdown and restart sequences, see the FlashGrid Knowledge Base.

Step 4: Migrating data to the cluster

Although the subject of this post is creating a functional clustered database infrastructure that is ready for use by a qualified Oracle DBA, we want to mention data migration. Data migration is the final step of a database lift-and-shift project.

After you complete steps 1-3, a DBA must use one of the standard Oracle procedures for creating and populating the databases on the cluster. Generally, the procedures aren’t different from migrating between two clusters running in datacenters and can involve any of the following standard tools:

  • Oracle RMAN enables backing up the on-premises database and restoring it to the new cluster on AWS.
  • AWS Snowball enables moving large amounts of data from on-premises to Amazon S3 in case doing so over the network would take too long.
  • Oracle Data Guard enables directly replicating database from on-premises to the new cluster on AWS.

Infrastructure support and maintenance

Once your cluster is up and running and you have migrated data to it, it’s time to focus on security, support, and maintenance of your cluster.

Since you deploy the cluster infrastructure in your AWS account, FlashGrid staff never has access to the systems or data. This simplifies security arrangements, gives you full control over the deployed cluster, but also requires qualification and responsibility from operators of the system on the user side.

The support and maintenance model for FlashGrid Cloud Cluster is the following:

  • Your team of DBAs and cloud engineers, who can be your consulting partner of choice, maintain the cluster in your account. They do this much as they would maintain a cluster running in a datacenter.
  • For FlashGrid-related tasks and issues, see the documentation in the FlashGrid Knowledge Base.
  • When facing a cluster infrastructure issue that you can’t resolve with the documentation, you have access to 24/7 support by FlashGrid. FlashGrid maintains a global staff of trained AWS and Oracle engineers. They’re ready to handle database infrastructure issues ranging from an isolated problem, such as a disk failure, to broader issues that are harder to attribute, such as cluster performance deterioration or network malfunctions.

Conclusion

In this post, I showed you how to create infrastructure for a clustered Oracle database on Amazon EC2. Using AWS services and the FlashGrid methodology of deploying a cloud-engineered system with a clustered Oracle database, you can decrease deployment times for complex systems. Using Amazon EC2 for compute, Amazon EBS for storage, AWS Marketplace for billing, and AWS CloudFormation for deployment orchestration reduces the weeks and sometimes months of provisioning a cluster in a datacenter to a few hours on AWS.

Next steps

To keep the post compact, we limited the description to a case where a VPC is created automatically, which is useful for a proof of concept and test deployments. For deploying a production system, you need to create the cluster in an existing VPC as described in the FlashGrid Cloud Cluster for Oracle RAC on AWS Deployment Guide. FlashGrid professional services are available in AWS Marketplace for customers who need further assistance in assessing, sizing, and deploying their clustered database workloads on AWS.

The content and opinions in this post are those of the third-party author, and AWS is not responsible for the content or accuracy of this post.

About the author

Art Danielov is the CEO and CTO at FlashGrid, a frequent speaker on running Oracle database workloads on AWS, with a special focus on highly available, clustered, and high-performance databases.