To do this, you have to extract data from a source DB, create a database dump file of the on-premises Database which is the source DB, import this DB dump into our Google Cloud SQL which is the destination Database (GCP), and extract the existing PDF files (covid 19 testing results) from the Application server, Zip the pdf files, copy and move the zip files to our Amazon S3 bucket (AWS).
NOTE The extraction and creation of both the PDF files and the DB Dump file have already been done, so our focus on the last part of this project is moving the database migration and file migration into the multi-cloud environment.
-
Connect to Google Cloud Shell
-
Download the dump using wget
cd
mkdir mission3_en
cd mission3_en
wget https://tcb-public-events.s3.amazonaws.com/icp/mission3.zip
unzip mission3.zip
-
Connect to MySQL DB running on Cloud SQL (once it prompts for the password, provide welcome123456). Don’t forget to replace the placeholder with your Cloud SQL Public IP
mysql --host=<replace_with_public_ip_cloudsql> --port=3306 -u app -p
-
If it prompts a password use: welcome123456
-
Import the dump on Cloud SQL
use dbcovidtesting;
source ~/mission3/en/db/db_dump.sql
-
Check if the data got imported correctly
select * from records;
exit;
-
Connect to the AWS Cloud Shell
-
Download the PDF files
cd
mkdir mission_en
cd mission3_en
wget https://tcb-public-events.s3.amazonaws.com/icp/mission3.zip
unzip mission3.zip
-
Sync PDF Files with your AWS S3 used for COVID-19 Testing Status System. Replace the bucket xxxx name with yours.
cd mission3/en/pdf_files
aws s3 sync . s3://luxxy-covid-testing-system-pdf-en-xxxx
-
Test the application. Upon migrating the data and files, you should be able to see the entries under the “View Guest Results” page.

-
Click on Link in any of the Customers' Data to view each of their PDF files (COVID testing results)

Congratulations! You have migrated an "on-premises" application & database to a MultiCloud Architecture!
After completing the hands-on project and gathering the implementation evidence, follow the step-by-step instructions below to remove the entire MultiCloud environment.
kubectl delete deployment luxxy-covid-testing-system
kubectl delete service luxxy-covid-testing-system
cd ~/mission1/en/terraform/
terraform destroy
cd ~
rm -rf mission*
cd ~
rm -rf mission*
rm -rf .ssh




