gerard toonstra | migrating to the cloud: our …...what we learned lessons learned from this...
TRANSCRIPT
![Page 1: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/1.jpg)
Gerard Toonstra | Migrating to the Cloud: Our Journey | 28-11-2019
![Page 2: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/2.jpg)
![Page 3: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/3.jpg)
Data Center Architecture
Data Source 1
External Systems
(...)
Data Source 2
Data Source 3
![Page 4: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/4.jpg)
Data Center Architecture
Data Source 1
External Systems
(...)
Staging Data Warehouse
Data Mart 1
Data Source 2
Data Source 3
Data Mart 2
![Page 5: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/5.jpg)
Data Center Architecture
Data Source 1
External Systems
(...)
Staging Data Warehouse
Data Mart 1 OLAP 1
Data Source 2
Data Source 3
Data Mart 2 OLAP 2
![Page 6: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/6.jpg)
Data Center Architecture
Data Source 1
External Systems
(...)
Azkaban
Staging Data Warehouse
Data Mart 1 OLAP 1
Data Source 2
Data Source 3
Data Mart 2 OLAP 2
![Page 7: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/7.jpg)
Data Center Architecture
Data Source 1
External Systems
(...)
Staging Data Warehouse
Data Mart 1 OLAP 1
Data Source 2
Data Source 3
Data Mart 2 OLAP 2
Azkaban
![Page 8: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/8.jpg)
Data Center Architecture
Data Source 1
External Systems
(...)
Staging Data Warehouse
Data Mart 1 OLAP 1
Data Source 2
Data Source 3
Data Mart 2 OLAP 2
Azkaban
![Page 9: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/9.jpg)
Azkaban
Data Center Architecture
Data Source 1
External Systems
(...)
Staging Data Warehouse
Data Mart 1 OLAP 1
Data Source 2
Data Source 3
Data Mart 2 OLAP 2
![Page 10: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/10.jpg)
Migration Steps
Move OLAP Server from Data Center to
Cloud
Move SQL Server from Data Center to
Cloud
Moving away from Azkaban and adopt
Airflow
Create data validation mechanisms
![Page 11: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/11.jpg)
![Page 12: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/12.jpg)
● Templated arguments, like SQL
queries
● A lot of building blocks designed for
data engineering work
● Interface is not great to
browse historical runs
● Hard to rerun individual tasks
Azkaban vs Airflow
Azkaban● Task configuration separate
from code
● Dates as first class citizen; easily
trigger historical runs
Airflow
![Page 13: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/13.jpg)
What do we need to migrate?
![Page 14: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/14.jpg)
Big daily process
![Page 15: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/15.jpg)
Identifying and splitting up
![Page 16: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/16.jpg)
Introducing checkpoints
Organizing it in Airflow● Multiple pipelines instead of one
● Interdependent communication
● Multiple “checkpoints”
![Page 17: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/17.jpg)
Our new daily process(es!)
Time
Load to staging area325 tasks
Heavy calculations50 tasks
Loading data warehouse tables140 tasks
Process semantic layer20 tasks
![Page 18: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/18.jpg)
● Easier to read and reason
● Maintainable
● Separate logical units
● Less dependency management
● Interdependency checks can fail,
blocking the next step
● More code because of the
interdependency checks
Checkpoints approach
Disadvantages● Easier to test● Generally slower
Advantages
![Page 19: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/19.jpg)
Ignoring the black box
Observing behaviour
?Source Staging
![Page 20: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/20.jpg)
Old code
Most code looked like this
def main():
result = run_query('some_query.sql')
filename = create_csv(result)
upload_to_gcs(filename, GCS_FILENAME)
load_to_mssql(GCS_FILENAME, MSSQL_TABLE)
![Page 21: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/21.jpg)
New code
Now we have this
OracleToMsSqlOperator(
sql='some_query.sql',
source_conn_id=’oracle’,
target_conn_id=’mssql’)
![Page 22: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/22.jpg)
Advantages
Now we have this● Configuration as code
○ Easier to read
○ Very easy to test● Less code to maintain
○ Written and maintained by Airflow contributors
○ Custom code is rare instead of the default
● Quicker to create new pipelines
![Page 23: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/23.jpg)
Summary
Airflow● All configuration now in code
● Building blocks for faster pipeline development
● Lot less code
● Manageable daily process
![Page 24: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/24.jpg)
![Page 25: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/25.jpg)
Migration Steps
Move OLAP Server from Data Center to
Cloud
Move SQL Server from Data Center to
Cloud
Moving away from Azkaban and adopt
Airflow
Create data validation mechanisms
![Page 26: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/26.jpg)
SQL Server
SQL Server from Data Center to Cloud
Data CenterPhysical Server Cloud
![Page 27: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/27.jpg)
SQL Server
Amazon Relational Database Service (RDS)● Simple to setup and configure
● Supports multiple databases providers
● Patching the database software, backing up databases and
some other DBA tasks are managed by AWS itself
![Page 28: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/28.jpg)
SQL Server
Step by Step - SQL Server Migration to Cloud
New SQL Server Instance on RDS
Deploy DW onto new Instance
Populate historical tables
Configure daily ETL in Airflow
Data Validation tools
![Page 29: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/29.jpg)
SQL Server
Step by Step - SQL Server Migration to Cloud
MyDB: Properties: AllocatedStorage: "100" DBInstanceClass: db.m1.small Engine: sqlserver-se EngineVersion: "14.00.3015.40.v1" Type: "AWS::RDS::DBInstance"
![Page 30: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/30.jpg)
SQL Server
New SQL Server Instance on RDS
Deploy DW onto new Instance
Populate historical tables
Configure daily ETL in Airflow
Data Validation tools
Step by Step - SQL Server Migration to Cloud
Team City Deployment
![Page 31: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/31.jpg)
SQL Server
New SQL Server Instance on RDS
Deploy DW onto new Instance
Populate historical tables
Configure daily ETL in Airflow
Data Validation tools
Step by Step - SQL Server Migration to Cloud
![Page 32: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/32.jpg)
SQL Server
New SQL Server Instance on RDS
Deploy DW onto new Instance
Populate historical tables
Configure daily ETL in Airflow
Data Validation tools
Step by Step - SQL Server Migration to Cloud
Data Source 1
Data Source 2
Data Source 3ETL
![Page 33: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/33.jpg)
SQL Server
New SQL Server Instance on RDS
Deploy DW onto new Instance
Populate historical tables
Configure daily ETL in Airflow
Data Validation tools
Step by Step - SQL Server Migration to Cloud
![Page 34: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/34.jpg)
SQL Server
New SQL Server Instance on RDS
Deploy DW onto new Instance
Populate historical tables
Configure daily ETL in Airflow
Data Validation tools
Apache Beam
Step by Step - SQL Server Migration to Cloud
NBi
Data Validation
![Page 35: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/35.jpg)
Summary
SQL Server on RDS● We can easily scale our instance
● No server maintenance
● All configurations in code (Cloudformation) facilitates maintenance
● Backup mechanism offered by AWS needs good understanding
+
![Page 36: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/36.jpg)
![Page 37: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/37.jpg)
Migration Steps
Move OLAP Server from Data Center to
Cloud
Move SQL Server from Data Center to
Cloud
Moving away from Azkaban and adopt
Airflow
Create data validation mechanisms
![Page 38: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/38.jpg)
OLAP Server
What is an OLAP database?● OLAP stands for OnLine Analytical Processing
● An OLAP database is a multi-dimensional array of data,
commonly referred as “cube”
● This technology used to facilitate query processing on
data warehouse.
![Page 39: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/39.jpg)
OLAP Server
OLAP on top of Data warehouse
Data warehouse
Report 1
Report 2
Report N
![Page 40: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/40.jpg)
OLAP Server
(SSAS)
![Page 41: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/41.jpg)
OLAP Server
How to migrate our OLAP Server?
?
![Page 42: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/42.jpg)
OLAP Server
Main Challenges
![Page 43: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/43.jpg)
OLAP Server
Main Challenges
No support for our OLAP technology
![Page 44: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/44.jpg)
OLAP Server
Main Challenges
No support for our OLAP technology
● Owning and support our VM
(EC2)
● Configure VM using “code” (no UI on Windows Server Core)
![Page 45: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/45.jpg)
OLAP Server
Main Challenges
Weekly Recycling (wipe)
![Page 46: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/46.jpg)
OLAP Server
Main Challenges
Weekly Recycling (wipe)
● Keep same machine
configurations after recycling
● Keep data in OLAP Server after recycling
![Page 47: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/47.jpg)
OLAP Server
1st step - AMI (basebox)
431 2
![Page 48: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/48.jpg)
OLAP Server
2nd step - Cloudformation (AWS Architecture)
21 43
![Page 49: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/49.jpg)
OLAP Server
3rd step - Configurations and Backups
21 2 3 4
![Page 50: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/50.jpg)
OLAP Server
4th step - Integration with our ETL pipeline
1 322 4
![Page 51: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/51.jpg)
OLAP Server
Integrate OLAP Server with Airflow
Partition 2019W04
Partition 2019W03
Partition 2019W02
...
![Page 52: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/52.jpg)
OLAP Server
Integrate OLAP Server with Airflow
Process Partition
Create Partition Partition 2019W04
Partition 2019W03
Partition 2019W02
...
![Page 53: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/53.jpg)
OLAP Server
Integrate OLAP Server with Airflow
Process Partition
Create Partition Partition 2019W04
Partition 2019W03
Partition 2019W02
...
![Page 54: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/54.jpg)
OLAP Server
Integrate OLAP Server with Airflow and... USERS
Partition 2019W04
Partition 2019W03
Partition 2019W02
...
![Page 55: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/55.jpg)
Summary
OLAP Server on EC2● We can easily scale our instance
● Infrastructure as Code facilitates maintenance
● Easy to rebuild machine if gets corrupted
● A lot of effort on understanding AWS & CI tools
● Load balancers don’t like SSAS
+
![Page 56: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/56.jpg)
![Page 57: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/57.jpg)
Migration Steps
Move OLAP Server from Data Center to
Cloud
Move SQL Server from Data Center to
Cloud
Moving away from Azkaban and adopt
Airflow
Create data validation mechanisms
![Page 58: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/58.jpg)
Automated validation
![Page 59: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/59.jpg)
Automated validation
Same result set is important
PK value
1 A
2 B
3 C
PK value
4 D
3 C
2 B
SELECTTOP 3 *FROM FooORDER BY PK
![Page 60: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/60.jpg)
Automated validation
Getting the hashes
PK hash
1 c4ca4238
2 c81e728d
3 eccbc87e
PK hash
1 c4ca4238
2 c81e728d
3 a87ff679
![Page 61: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/61.jpg)
Automated validation
Comparing hashes
Sourcehashes
Targethashes Apache Beam
Not in source
Not in target
Different
![Page 62: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/62.jpg)
Automated validation
Grouping the outputTable Type Count
A not_in_target 0
not_in_source 5
different 1000
B not_in_target 20
not_in_source 0
different 500
![Page 63: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/63.jpg)
Automated validation
Daily report
Table Difference Difference yesterday
A 5000 0
B 300 300
C 20 10,000
![Page 64: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/64.jpg)
Automated validation
What’s different?
Table Primary Key Type
A 1 not_in_target
A 2 not_in_source
A 3 different
![Page 65: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/65.jpg)
Automated validation
Automated validation steps1. Get result set from source and target
2. Calculate hashes
3. Compare hashes, track differences
4. Store counts of differences in tracking tables
5. Talk through differences every day
![Page 66: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/66.jpg)
Custom validation
![Page 67: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/67.jpg)
Custom validation
![Page 68: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/68.jpg)
Custom validation
NBi
● Unit testing for Business Intelligence, based on NUnit
● For tables where the logic changed, so needs custom
validation
● For validating the OLAP Server output
![Page 69: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/69.jpg)
Summary
Validation● Automated validation for most of our data
● Custom validation for tables that changed
● Custom validation for important parts of
the OLAP Server
Apache Beam NBi
![Page 70: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/70.jpg)
![Page 71: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/71.jpg)
What we gained
![Page 72: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/72.jpg)
What we learned
Lessons learned from this migration (1 / 2)● Not everything you have on data center will be supported by AWS as it is
● Less sqlserver DB monitoring capabilities in comparison to data center.
No server admin on RDS.
● Doing two migrations in parallel (Azkaban → Airflow, data center → AWS)
causes a much longer migration process, but the target environment shadows
your still active production environment.
![Page 73: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/73.jpg)
What we learned
Lessons learned from this migration (2 / 2) ● You should arrange training on AWS/DevOps upfront
● Think about infrastructure as code, both for Airflow pipelines as well as weekly
OLAP recycling: all is in code now, less in documentation and manual routines
● AWS flexibility allows you to scale your infrastructure with ease
![Page 74: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/74.jpg)
Timeline
![Page 75: Gerard Toonstra | Migrating to the Cloud: Our …...What we learned Lessons learned from this migration (1 / 2) Not everything you have on data center will be supported by AWS as it](https://reader033.vdocuments.site/reader033/viewer/2022042205/5ea7048a3bc4c2796711add1/html5/thumbnails/75.jpg)
Gerard Toonstra| Data Discovery with Amundsen | 28-11-2019 | https://www.careersatcoolblue.com
Join at slido.com with #bigdata2019