Preparation Steps

Lab: Setting Up and Configuring a MySQL Cluster with GFS2 and Integrating WordPress on AWS

In this lab, we will follow the steps below to set up and test a MySQL cluster with GFS2 (Global File System 2) on AWS, integrating it with a WordPress instance. The lab involves working with AWS services such as EC2, EBS, NLB (Network Load Balancer), System Manager, and CloudWatch.

Preparation Steps

  1. Create a Virtual Private Network (VPC): Set up a VPC in AWS to house the infrastructure components.

  2. Provision Two EC2 Instances: Deploy two EC2 instances within the created VPC. These instances will be used to install GFS2 and configure the MySQL cluster.

  3. Create a Shared EBS Volume: Establish an Elastic Block Store (EBS) volume to be shared between the two EC2 instances.

  4. Install and Configure GFS2: Perform the installation of GFS2 on both EC2 instances for shared file storage.

  5. Install and Configure MySQL Cluster: Set up MySQL on both instances to form a MySQL cluster.

  6. Provision an Internal Network Load Balancer (NLB): Configure an NLB to forward traffic on the default MySQL port (3306) to the MySQL target group.

  7. Set Up a WordPress Instance: Deploy an EC2 instance for WordPress, configured to connect to the MySQL cluster through the NLB endpoint.

  8. Create AWS System Manager Automation Runbook: Develop a runbook to automate troubleshooting steps for switching to the secondary MySQL instance.

  9. Establish AWS System Manager Incident Manager Response Plan: Build a response plan in AWS System Manager Incident Manager to execute the automation runbook.

  10. Set Up AWS CloudWatch Alarms: Create an alarm in CloudWatch to trigger the Incident Manager in case the primary MySQL instance fails the health check.

  11. Test the Fail-over Mechanism: Perform a fail-over test by stopping the primary MySQL instance and verifying access to the WordPress instance continues.