-
Notifications
You must be signed in to change notification settings - Fork 1
docs: update README and LAB with EC2 support details #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -46,12 +46,15 @@ For optional CLI-based labs with MongoDB and Cassandra, see | |||||||
| - **Docker Desktop** installed and running (includes Docker Compose) | ||||||||
| - A web browser (Chrome, Firefox, or Safari) | ||||||||
| - Basic SQL knowledge (SELECT, INSERT, UPDATE) | ||||||||
| - No cloud account required for the main lab | ||||||||
| - No cloud account required for local Docker; AWS Academy credentials | ||||||||
| required for the EC2 option | ||||||||
|
|
||||||||
| ## Architecture | ||||||||
|
|
||||||||
| The visualizer connects to a live MySQL primary-replica cluster. Every | ||||||||
| button click and console query executes real SQL against real databases. | ||||||||
| The same Docker Compose stack runs locally or on an EC2 instance via | ||||||||
| CloudFormation. | ||||||||
|
|
||||||||
| ```mermaid | ||||||||
| graph LR | ||||||||
|
|
@@ -88,6 +91,7 @@ graph LR | |||||||
| ├── visualizer/ # Main lab (interactive browser) | ||||||||
| │ ├── LAB-VISUALIZER.md # Step-by-step instructions (5 tasks) | ||||||||
| │ ├── docker-compose.yml # MySQL primary + replica + visualizer | ||||||||
| │ ├── cloudformation.yaml # EC2 deployment (AWS Academy) | ||||||||
| │ ├── setup.sh / cleanup.sh # Start and stop environment | ||||||||
| │ ├── Dockerfile # Python API bridge image | ||||||||
| │ ├── server.py # API bridge (proxies SQL to MySQL) | ||||||||
|
|
@@ -118,14 +122,21 @@ graph LR | |||||||
|
|
||||||||
| ## Quick Start | ||||||||
|
|
||||||||
| **Local (Docker Desktop):** | ||||||||
|
|
||||||||
| ```bash | ||||||||
| cd visualizer | ||||||||
| ./setup.sh | ||||||||
| ``` | ||||||||
|
|
||||||||
| Open [http://localhost:8081](http://localhost:8081). The visualizer | ||||||||
| has three tabs (Replication, Consistency, Schema & Indexing) and a | ||||||||
| SQL console at the bottom. Follow | ||||||||
| Open [http://localhost:8081](http://localhost:8081). | ||||||||
|
|
||||||||
| **EC2 (AWS Academy):** Upload `visualizer/cloudformation.yaml` to | ||||||||
| CloudFormation. When the stack completes (~5-10 min), open the | ||||||||
| **VisualizerURL** from the Outputs tab. | ||||||||
|
||||||||
| **VisualizerURL** from the Outputs tab. | |
| **VisualizerURL** from the Outputs tab. When you finish the lab, | |
| delete the CloudFormation stack to clean up the EC2 deployment. |
Copilot
AI
Apr 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The troubleshooting row advises waiting 5–10 minutes after CREATE_COMPLETE for Docker setup, but earlier the Quick Start says the stack completes in ~5–10 minutes (and LAB instructions suggest only a short extra wait after completion). Please make the timing guidance consistent to avoid confusion.
| | EC2 page does not load | Stack still initializing | Wait 5-10 min after CREATE_COMPLETE for Docker setup | | |
| | EC2 page does not load | Stack still initializing | Wait a few minutes after `CREATE_COMPLETE` for Docker setup | |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -156,6 +156,7 @@ graph LR | |||||
| 10-databases/visualizer/ | ||||||
| ├── LAB-VISUALIZER.md # This file (lab instructions) | ||||||
| ├── docker-compose.yml # MySQL primary + replica + visualizer | ||||||
| ├── cloudformation.yaml # EC2 deployment template (AWS Academy) | ||||||
| ├── setup.sh # Start environment and configure replication | ||||||
| ├── cleanup.sh # Tear down all containers and volumes | ||||||
| ├── Dockerfile # Python API bridge image | ||||||
|
|
@@ -171,9 +172,9 @@ graph LR | |||||
|
|
||||||
| ### Step 1.1: Verify the cluster | ||||||
|
|
||||||
| After running `./setup.sh`, open | ||||||
| [http://localhost:8081](http://localhost:8081). The sidebar on the | ||||||
| right shows live database state: | ||||||
| Open the visualizer in your browser (`http://localhost:8081` for local | ||||||
| setup, or the **VisualizerURL** from CloudFormation Outputs for EC2). | ||||||
| The sidebar on the right shows live database state: | ||||||
|
|
||||||
| - **IO Thread / SQL Thread**: Both should show `Yes` (replication | ||||||
| active) | ||||||
|
|
@@ -458,10 +459,15 @@ custom indexes). | |||||
|
|
||||||
| ## Cleanup | ||||||
|
|
||||||
| **Local:** | ||||||
|
|
||||||
| ```bash | ||||||
| ./cleanup.sh | ||||||
| ``` | ||||||
|
|
||||||
| **EC2:** Delete the `lab10-visualizer` CloudFormation stack in the AWS | ||||||
| Console (see [EC2 Cleanup](#ec2-cleanup) above). | ||||||
|
|
||||||
| ## Troubleshooting | ||||||
|
|
||||||
| | Issue | Cause | Fix | | ||||||
|
|
@@ -471,6 +477,8 @@ custom indexes). | |||||
| | Replica shows `--` in sidebar | Replication not configured | Re-run `./setup.sh` | | ||||||
| | EXPLAIN shows `rows: 1` | Table stats stale | Run `ANALYZE TABLE access_log;` in the console | | ||||||
| | Animation stuck | Previous operation still running | Wait for it to finish or refresh the page | | ||||||
| | EC2 page does not load | Stack still initializing | Wait 5-10 min after CREATE_COMPLETE for Docker setup | | ||||||
|
||||||
| | EC2 page does not load | Stack still initializing | Wait 5-10 min after CREATE_COMPLETE for Docker setup | | |
| | EC2 page does not load | Stack still initializing | Wait a couple of minutes after CREATE_COMPLETE for Docker setup | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Prerequisites list still implies Docker Desktop is required, but the doc now supports an EC2 (browser-only) path. Consider splitting prerequisites by environment (Local vs EC2) or rewording this section so EC2 readers don’t think they need Docker Desktop.