Multi Cloud Classroom Notes – 10/May/2024

Deploy python web application in Azure App Service

  • Refer Here for sample
  • Lets deploy our applications using Azure CLI
  • We have deployed the application using the following commands post cloning the code
# creates a resource group
az group create --name webapps --location eastus
# brings up the application
az webapp up --sku B1 --resource-group "webapps" --runtime "PYTHON:3.11" --location "eastus" --basic-auth Disabled --logs

Deploying python web application to aws elastic beanstalk

  • For this python has to be installed
  • To configure system to communicate with AWS, we need to configure AWS CLI
  • For creating IAM User refer classroom video
  • Now clone the code from some folder in your system c:\temp\paas\aws
git clone https://github.com/Azure-Samples/msdocs-python-flask-webapp-quickstart
  • cd into folder
cd msdocs-python-flask-webapp-quickstart
  • Now to deploy application into elasticbeanstalk we need eb cli Refer Here
  • To install eb cli Refer Here
  • Create a virtual environment, activate and install dependencies
python -m venv .venv
.venv/Scripts/activate
pip install -r requirements.txt
  • Create a new file in the folder called as .ebignore with the following content
.venv
  • Now intialize elastic beanstalk using the following command
eb init -p python-3.11 flask-webapp --region ap-south-1
  • rename app.py to application.py
mv app.py application.py
  • Now create environment using
eb create flask-env
  • Once created execute eb open
  • Now terminate
eb terminate flask-env
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube