Hands-on Challenge Day - Cloud Migration to Azure VM
Cloud migration involves moving data, applications, or other business elements from an on-premises infrastructure to a cloud computing environment. One common scenario is migrating web applications from local servers to cloud-based virtual machines to leverage the cloud's scalability, reliability, and security features.
Microsoft Azure provides a suite of cloud services, including computing, analytics, storage, and networking. Users can pick and choose from these services to develop and scale new applications, or run existing applications, in the public cloud.
"LegacyApps Inc." is a company that has been running its critical web application on an on-premises server. Due to increasing maintenance costs and the need for scalability, the company decides to migrate its application to a virtual machine in Azure. The application is a simple Python Flask web application that displays messages to visitors.
Problem Statement: LegacyApps Inc. needs to migrate their on-premises web application to Azure to improve scalability and reduce infrastructure costs. The process must ensure minimal downtime and maintain application performance.
Your Mission: Migrate a simple Python Flask web application from an on-premises server to an Azure VM. Set up the Azure environment, migrate the application, and ensure it runs successfully in the cloud.
Set Up Azure VM:
Prepare the Application:
/app
- app.py
- requirements.txt
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, Azure!'
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80)
Flask==2.0.1
Migrate the Application:
sudo apt update && sudo apt upgrade -y
sudo apt install python3-pip -y
pip3 install -r requirements.txt
Run the Application:
python3 app.py