×
Community Blog Quick Path to Build OLTP (RDS MySQL) & OLAP (AnalyticDB MySQL) Cluster with Data Synchronization Channel

Quick Path to Build OLTP (RDS MySQL) & OLAP (AnalyticDB MySQL) Cluster with Data Synchronization Channel

This tutorial shows you how to build OLTP (RDS MySQL) & OLAP (AnalyticDB MySQL) cluster with data synchronization channel quickly.

You can access the tutorial artifact including deployment script (Terraform), related source code, sample data and instruction guidance from the github project.

More tutorial around Alibaba Cloud Database, please refer to this link.

Overview

1

Index

  • Step 1. Use Terraform to provision services on Alibaba Cloud
  • Step 2. Run the demo application

Step 1. Use Terraform to provision services on Alibaba Cloud

If you are the 1st time to use Terraform, please refer to this link to learn how to install and use the Terraform on different operating systems.

Run the terraform script to provision the resources and services.

2

Step 2. Run the demo application

Open 2 CLI windows and log on them to ECS with ECS EIP. By default, the password is N1cetest, which is preset in the terraform provision script in Step 1. If you've already changed it, please update accordingly.

ssh root@<ECS_EIP>

Within one CLI window, edit and configure source_rdsmysql_app.py with connection to RDS MySQL, then run it as the OLTP demo application.

cd ~
vim source_rdsmysql_app.py

Then run this Python script as the OLTP demo application, which will be continuously inserting data into the RDS MySQL database.

python3 source_rdsmysql_app.py

Within another CLI window, edit and configure target_adbmysql_app.py with connection to AnalyticDB MySQL, then run it as the OLAP demo application.

cd ~
vim target_adbmysql_app.py

Then run this Python script as the OLAP demo application, which will be continuously querying data from the AnalyticDB MySQL data warehouse.

python3 target_adbmysql_app.py

3

0 0 0
Share on

ApsaraDB

235 posts | 18 followers

You may also like

Comments