Final Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

3/10/2023 Cloud Migration

Plan and Key


Success Factors
COSC6359-Cloud Computing

Erik Hernán Sánchez Pérez


UNIVERSITY OF HOUSTON VICTORIA
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Design cloud migration plan and key success factors.

1) Introduction and Overview

In the near future, the world IT market for cloud computing, which is the use of scalable IT resources
offered as a service over a network, is expected to grow a lot. Even in the field of science, cloud
services are becoming more and more popular.

Even though the technology is still young, it has been used in many different kinds of research in
recent years. But for the same reason — and because it's a current topic — it always gives researchers
new ways to look into it. More research is needed because the market wants to find the best ways to
use and sell the technology and business ideas that are still being developed.

If you look at the research that has already been done, you can see that some of the most popular
topics are cloud security and privacy, pricing, scalability and elasticity, and mobile cloud, which means
offering the same cloud services to all kinds of mobile devices. But there are a few things that haven't
gotten as much attention. One of these is cloud migration, which is the process of moving IT systems
from traditional server architecture to a cloud-based, virtualized environment.

Even fewer papers have been written about a special case in the research field of cloud migration:
moving old, out-of-date legacy applications to the cloud. But the issue itself is important and up-to-
date. Large companies in particular may use business-critical old applications that need to be updated
but can't be completely redesigned because of dependencies and costs. In this case, moving to the
cloud could be a solution that brings the platform up to date, extends the life of the application, and,
depending on the situation, makes it possible to use other cloud computing benefits.

Luxxy – Luxury Hotels & Resorts is a hotel located in Cabo San Lucas. A development initiative was
made recently to capture COVID vaccination cards from guests, and due to a higher demand for this
service, a cloud-based migration has been suggested. The goal of the hotel is to be able to capture
COVID details in a secure, scalable, and cost-effective manner.

2) Migration strategy design

Requirement Analysis

Luxxy—Luxury Hotels & Resorts COVID-on-premises applications and databases should be migrated
to a multi-cloud architecture. The app consists of a web application that will register all the guests
vaccination records for compliance purposes, is currently saving the guest’s data in a database server,
and also has an image attachment with the guest’s vaccination card. A cloud solution to store the
image records is needed due to the scalability of the number of records and also to migrate the current
DB records and application into cloud architectures.

Selection of possible cloud providers

Google Cloud Platform.

Amazon Web Services.

Environment compatibility analysis and Assessment of required changes:


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

The web application involved is a Python app, for which we have the source code and which can be
easily deployed in a cloud infrastructure.

The DB server is an SQL database, and to move those records to an SQL Cloud instance, a set of scripts
will be needed.

The image records are PDF files, which will require more storage. We can get a cloud simple storage
service to put all the pdf records, and in the database, we can put an URL that will point to those
objects in the cloud, which will make the SQL instance not as heavy as it was before.

Identification of architecture solutions

GKE Google Kubernetes Engine would be a good solution to deploy and host the Python app, providing
a managed environment for deploying, managing, and scaling a containerized application using
Google infrastructure. The GKE environment consists of multiple machines grouped together to form
a cluster.

Advantages:

• Google Cloud’s load balancing for Compute Engine instances.


• Node pools to designate subset of nodes within a cluster for additional flexibility.
• Automatic scaling of your cluster’s node instance count.
• Automatic upgrades for your cluster’s node software.
• Node auto-repair to maintain node health and availability.
• Logging and monitoring with Google clouds operation suit for visibility into your cluster.

We can see a series of advantages compared to the Server on-premises servers that Luxxy – Luxury
Hotels & Resorts would have using cloud infrastructure, using a containerized application and GKE it
would allow multiple instances of our application (autoscaling) and also use Googles top technology
for load balancing between those instances, also the node auto-repair features will keep the nodes in
a healthy running state; making periodic checks on the health of each node in the cluster. Also the
logging and monitoring would be easier using Google’s default console or even using third-party
solutions like Lens software.

Google Cloud Platform SQL Instance: from now on, using Google’s SQL Cloud instance looks like the
better choice to migrate our DB server. Using the Google Cloud Platform, we would be able to manage
GKE and the cloud instance in just one portal. Also, Google Cloud SQL offers the following advantages:

• Less Maintenance Cost: Being attributed as fully managed means you do not have to worry
about the maintenance of the application data. This gives you the flexibility to focus on
improving your cloud applications, i.e., framing strategies that give you a competitive edge.
• Ensure Business Continuity: Cloud SQL ensures data backup and recovery. In case of any
disaster, you can easily retrieve the application data and continue operations without
worrying about interruptions.
• Ensures Security and Compliance: Cloud SQL provides data encryption and firewall protection.
It is a secure RDBMS service that focuses on providing private connectivity through
authentication and user-controlled network access. Google’s service is compliant with SSAE
16, ISO 27001, PCI DSS, and HIPAA.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• Easy Setup: The standard connection drivers and migration tools enable you to set up your
first Google database app within minutes. Google’s easy-to-use SQL service provides a hassle-
free first-time experience.
• Automated Tasks: Cloud SQL supports automatic task management to ensure you can focus
on scaling your business on the go. Whether it is storage management, backup or redundancy
management, undergoing updates, capacity management, or providing data access, the
Google service offers it all.
• Easy Integration: Google provides easy access to cloud SQL instances and ensures easy
integration with Kubernetes Engine, App Engine, and Compute Engine. Also, it helps build
analytics possibilities and lets you make SQL queries to the databases through BigQuery.

Since a SQL Cloud instance in GCP will comply with all the highest standards and have easy integration
with Python apps, it will be considered the best option to migrate the DB server.

The following step will be to migrate from GKE, which we could manage, to a cloud storage solution
since we would like to follow a multi-cloud solution, and the most popular storage in the market is
Amazon S3, which presents the following advantages:

• Budget-friendly: Amazon provides service based on a pay-as-you-go model. This allows us to


pay only for the storage and time that we use on S3.
• High availability: It allows auto-scaling as well. S3 perfectly manages everything, whether
there is an increase or decrease in demand.
• Durability: This is the likelihood of data loss. All the services provided by Amazon, including
Amazon S3, are highly durable.
• High availability: To determine how readily a service can be used, AWS has availability zones
or regions across multiple countries to ensure high availability.
• Security: S3 enables automatic encryption of data as soon as the data uploading process
finishes.
• Easy to manage: The AWS Management Console is user-friendly. We can manage our
resources with a GUI, CLI, or API.

Cloud provider selection:

1) Google Cloud Platform:


• Google Cloud consists of a set of physical assets, such as computers and hard disk drives,
and virtual resources, such as virtual machines (VMs), that are contained in Google's data
centers around the globe. Each data center location is in a region.
2) Amazon Web Services:
• Amazon Web Services offers a broad set of global cloud-based products including
compute, storage, databases, analytics, networking, mobile, developer tools,
management tools, IoT, security, and enterprise applications: on-demand, available in
seconds, with pay-as-you-go pricing.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Solution Diagram:

3) Legacy system design and provide cloud data security.

Steps to create your AWS Free Account

Step 1

Open your browser in an Anonymous way and go to

• https://aws.amazon.com/free/

Click on create Free Acount

Step 2

Fill up the empty fields with your information.

Check on Verify email address.

After concluding this step, access your email to conclude the validation.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• Access your email to conclude the email verification.

Verify email address.

• Your email has been successfully verified. Now, on Root user password, add your password
and click on Continue.

Step 3

Select Personal and fill up the empty fields.

Click on Continue.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Step 4

Add credit card information.

On the billing address section, check if your address added before is right.

Select your Home Country Registration Type and fill up the Tax Registration Number field. Click on
Verify and Continue.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Step 5

Choose the Text message (SMS) option, add your Country or region and your Mobile phone number
for verification. On the Security check section type, type the characters as shown above. Click on Send
SMS.

Step 6

Add the received SMS code and click on Continue.

Step 7

Keep Basic support Free selected


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Click on Complete Sign up.

Step 8

Click on Go to the AWS Management Console.

Select Root user, add your email address on Root user email address field and Click on Next.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Step 9

Type the characters seen in the image and click on Submit.

Add your personal password and click on Sign in.


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Select in AWS Management Console the best region according to your physical location.

Steps to create Google Cloud Platform Free Account

Step 1

Open your browser and go to:

https://console.cloud.google.com/freetrial

Click on Create Account.

Step 2

Click on For myself and fill up the information.

Step 3

Add your information and Click Next


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Select the two options and click on Create Account.

Step 4

Choose your country and select the Terms of Service to Continue


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Step 5
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Step 6

Free Google Cloud Platform Account should be created.

4) Task automation design in migration.

We will provide the migration in three different sections.

To automate the migration of our resources to the cloud, we will use Terraform scripts, which is an
infrastructure-as-code tool that lets you define both cloud and on-premises resources in human-
readable configuration files that you can version, reuse, and share.

We will have 3 different folders for the 3 different sections of the migration:

The first folder defined will provide the Terraform scripts to connect Google Cloud Platform to the
AWS S3 bucket, which will hold the PDF vaccination cards from our guests. In order to do this, we will
need to configure AWS S3 bucket credentials that will grant access to our project in GCP.

Amazon Web Services

• Access AWS console and go to IAM Service.


• Under Access management, Click in “Users”, then “Add Users”. Insert the User name
terraform-en-1 and click Next to create a programmatic user.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• On Set permissions, Permissions options click in “Attach policies directly “button.

• Type AmazonS3FullAccess in Filter distributions by text, property or value, press Enter.


• Select AmazonS3FullAccess.

• Click in Next.
• Review all details.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• Click in Create user.

AWS has recently changed the way to download the key. Follow the new steps:

• Click Next.
• Click on Create Access key.
• Click on Download .csv file
• After download, click Done.
• Now rename .csv file downloaded to accessKeys.csv.

Google Cloud Platform (GCP)

• Access GCP Console and open Cloud shell.


• Upload accessKeys.csv and .zip on file to GCP Cloud Shell. Link: https://tcb-public-
events.s3.amazonaws.com/icp/mission1.zip
• Hands on file preparation.
mkdir mission1_en
mv mission1.zip mission1_en
cd mission1_en
unzip mission1.zip
mv ~/accessKeys.csv mission1/en
cd mission1/en
chmod +x *.sh
• Run the following command to prepare AWS and GCP environment Authorize when asked.

./aws_set_credentials.sh accessKeys.csv
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

gcloud config set project <project_id>

• Execute the command below.


./gcp_set_project.sh
• Enable the Container Registry API, Kubernetes Engine API and the Cloud SQL API.
gcloud services enable containerregistry.googleapis.com
gcloud services enable container.googleapis.com
gcloud services enable sqladmin.googleapis.com
• Before exexuting the Terraform commands open the Google Editor and update the file
tcb_aws_storage.tf replacingthe bucket namewith an unique name (AWS requires unique
bucket names).
- Open the tcb_aws_storage.tf using Google Editor
- On line 4 of the file tcb_aws_storage.tf:
- Replace xxxx with your name initials plus two random numbers:
Example: luxxy-covid-testing-system-pdf-en-jr29
• Run the following commands to finish provision infrastructure steps.
cd ~/mission1_en/mission1/en/terraform/

terraform init
terraform plan
terraform apply
Type Yes and go ahead.

Access GKE Service to create a cluster.


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Cloud SQL Network Configuration.

• Create a Cloud SQL instance inside GCP, select the name luxxy-covid-testing-system-
database-intance-en.

• Once the SQL instance is provisioned, access the Cloud SQL service.
• Click on your Cloud SQL instance.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• On the left side under Primary Instance, click on Connections.


• Under Instance IP assignments enable Private IP.
o Under Associated networking select “Default”.
o Click Set up Connection.
o Enable Service Networking API.
o Select Use an automatic allocated IP range in your network.
o Click Continue.
o Click create connection and wait minutes.
• Under Authorized Networks, click “Add Network”.
• Under New Network, enter the following information.
o Name: Public Access.
o Network: 0.0.0.0/0
o Click Done.
o Click Save and wait to finish the update.

The second folder defined will provide the Python app that will be migrated to the Google Kubernetes
Engine. Also in this section, we will create the cloud SQL instance, and at the end of it, we will have
deployed our Python app to the GKE.

Amazon Web Services

• Access AWS console and go to IAM service.


• Under Access management Click in “Users”, then “Add users”. Insert the User name luxxy-
covid-testing-system-en-app1 and click in Next to create a programmatic user.

• On Set permissions, Permissions options, click in “Attach policies directly” button.


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• Type AmazonS3Full Access in Filter distributions by text property or value, press Enter.
• Select AmazonS3FullAccess.

• Click in Next.
• Review all details.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• Click in Create User.

Steps to create access key:

• Click on the user you have created.


• Click on Security credentials.
• Scroll down and go to Access key section.
• Click on Create access key.

• Select Command Line Interface CLI and I understand the above recommendation and
want to proceed to create an access key checkbox.
• Click Next.
• Click on Create access key.
• Click on Download .csv file.
• After download, click Done.
• Now, rename .csv file download to luxxy-covid-testing-system-en-app1.csv

Google Coud Platform (GCP)

• Navigate to Cloud SQL instance and create new user app with password welcome123456
on Cloud SQL MySQL database.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

• Connect to Google Cloud Shell.


• Download the mission2 files to Google Cloud Shell using the wget command as shown
below. Link (https://tcb-public-events.s3.amazonaws.com/icp/mission2.zip)

cd

mkdir mission2_en

cd mission2_en

wget https://tcb-public-events.s3.amazonaws.com/icp/mission2.zip

unzip mission2.zip

• Connect to MySQL DB running on Cloud (once it prompts for the password, provide
welcome123456).

mysql --host=<public_ip_cloudsql> --port=3306 -u app -p

• Once you’re connected to the database instance, create the products table for testing
purposes.

use dbcovidtesting;

source ~/mission2_en/mission2/en/db/create_table.sql;

show tables;

exit;

• Enable Cloud Build API via Cloud Shell.

# Command to enable Cloud Build API


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

gcloud services enable cloudbuild.googleapis.com

• Build the Docker image and push it to Google Container Registry. Please replace the
<PROJECT_ID> with your My First Project ID.

cd ~/mission2_en/mission2/en/app

gcloud builds submit --tag gcr.io/<PROJECT_ID>/luxxy-covid-testing-system-app-en

• Open the Cloud Editor and edit the Kubernetes deployment file (luxxy-covid testing-
system.yaml) and update the variables below with your PROJECT_ID on the Google
Container Registry path, AWS Bucket name, AWS Keys (from luxxy-covid-testing-system-
en-app1.csv) and Cloud SQL Database Private IP.

cd ~/mission2/en/kubernetes

luxxy-covid-testing-system.yaml

image: gcr.io/<PROJECT_ID>/luxxy-covid-testing-
system-app-en:latest

...

- name: AWS_BUCKET

value: "luxxy-covid-testing-system-pdf-en-xxxx"

- name: S3_ACCESS_KEY

value: "xxxxxxxxxxxxxxxxxxxxx"

- name: S3_SECRET_ACCESS_KEY

value: "xxxxxxxxxxxxxxxxxxxx"

- name: DB_HOST_NAME

value: "172.21.0.3"

• Connect to the GKE (Google Kubernetes Engine) cluster via Console.


• Deploy the application Luxxy in the Cluster

cd ~/mission2_en/mission2/en/kubernetes

kubectl apply -f luxxy-covid-testing-system.yaml

• Get the public IP and test the application.


• You should see the app up and running.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

The third folder defined will perform the database migration, and we will also be able to see the PDF
files in the S3 bucket. The SQL scripts will insert the records from the old database, and the link to the
PDF file will be constructed by the Python app. (Link: https://tcb-public-
events.s3.amazonaws.com/icp/mission3.zip )

Google Cloud Platform - Database Migration steps

• Connect to Google Cloud Shell.


• Download the dump.

cd

mkdir mission3_en

cd mission3_en

wget https://tcb-public-events.s3.amazonaws.com/icp/mission3.zip

unzip mission3.zip

• Connect to Cloud SQL MySQL database instance.

mysql --host=<public_ip_address> --port=3306 -u app -p

• Import the dump on Cloud SQL.


Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

use dbcovidtesting;

source ~/mission3_en/mission3/en/db/db_dump.sql

• Check if the data got imported correctly.

select * from records;

Google Cloud Platform - Database Migration steps

• Connect to the AWS Cloud Shell


• Download the pdf files

cd

mkdir mission3_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
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 “View Guest Results” page.
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

5) New cloud-based environment performance and customer satisfaction.

Cloud-based environments can have a big effect on customer satisfaction because how well they
work has a direct effect on how the user feels. Here are some of the areas more impacted by the
cloud base on customer satisfaction:
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

Network connection: The quality of the network connection can have an effect on how well a
cloud-based environment works. Slow or unstable network connections can make it hard for users
to do their jobs and make customers unhappy.

Server capacity: The size of the servers in the cloud can also affect how well they work. If there
aren't enough resources to handle user requests, the environment may slow down or even crash,
making users unhappy.

Security: Another important part of cloud-based environments is security. If users don't think their
data is safe, they might not want to use the environment and might look for other ways to solve
their problems.

Ease of use: The cloud-based environment can also affect customer satisfaction by how easy it is
to use. If the environment is hard to get around or use, people may get frustrated and not come
back.

Support: How well a cloud provider helps customers can also affect how happy they are with their
service. If users have problems or questions and can't get answers quickly and effectively, they
may not be happy with the environment.

Overall, the Luxxy Luxury Hotels & Resorts app will have greater performance and cost efficiency
and it can escalate in homogeneous way that only cloud solutions can provide without a huge
cost.

6) Intellectual merits and broader impacts of the migration.

Moving the Luxxy Luxury Hotels & Resorts app to the cloud can have both intellectual benefits
and effects on a wider scale.

Innovation: Moving to the cloud can lead to innovation because it opens up new ways to build,
deploy, and manage applications.

Scalability: Cloud-based environments let you quickly increase or decrease the amount of
resources to meet changing needs. This makes apps run more efficiently and effectively.

Cost savings: Moving to the cloud can save money on hardware, software, and maintenance,
which can then be used for other business needs.

Accessibility: Cloud-based environments make it easier for people with disabilities to use
applications and data by letting them access them from anywhere with an internet connection.
This lets people work from home and work together.

7) Summary.

As we showed in the migration diagram, the on-premise app will be fully migrated to the cloud.
We know that, especially with big companies, a full cloud migration would not be always possible
due to numerous legacy applications and compliance regulations. They would need to keep some
of their processes on premises, but what we would recommend is to follow a non-monolithic
approach on their legacy applications and move some of their processes to the cloud in an
Name: Erik Sanchez
Subject: COSC6359- Cloud Computing

organized and structured way, always taking due diligence on security, compliance, and best
coding practices.

The Luxxy Luxury Hotels & Resorts app, as we showed previously, could take big advantage of the
cloud, using a containerized deployment and taking full advantage of cloud instance backup and
even cloud storage for important files like vaccination cards, which probably will make good use
of the encryption methods in AWS.

8) References.

Rajnish Kumar, RK (2014) . What is Google Cloud SQL? Everything about the Cloud Platform
Service. Retrieved from https://www.netsolutions.com/insights/what-is-google-cloud-sql-its-
features-and-some-products-that-have-benefited-from-it/

Educative.io Advantages of Using S3. Retrieved from https://www.educative.io/courses/detailed-


workings-aws-s3/qZ4ApmolOr3

You might also like