UiPath Community: Communication Mining from Zero to Hero
Running Python Flask web apps on Azure App Service
1. Running Flask apps on
Azure App Service
simon.waight@microsoft.com
@simonwaight
blog.siliconvalve.com
2. Quickly build, deploy and scale applications
without worrying about infrastructure
Azure App Service
High productivity
Python, Node, Java, .NET
Docker, PHP, Ruby
Staging &
deployment
Testing in
production
App gallery
marketplace
Fully managed
Auto scale &
load balancing
High availability
w/ auto patching
Reduced
operations costs
Backup &
recovery
Enterprise grade
Global data
center footprint
Hybrid
support
Azure AD
integration
Secure &
compliant
10. Understanding App Service CI / CD
• Kudu and Oryx are the two App Service engines controlling CI and CD
• Kudu does a web-hook triggered pull from source control and performs
local compile and deployment
• Kudu recognises Python apps based on *.py, requirements.txt
or runtime.txt
• Kudu automatically:
• Activates a virtual environment
• Uses PIP to restore modules in requirements.txt.
• Configure via Azure Portal easiest, but also possible via CLI
• Both Kudu and Oryx are open source and available on GitHub.
11. Python features on App Service
• The Python runtime is deployed from a baseline Docker image
• Docker image:
• Uses Gunicorn WSGI HTTP Server
• Includes Flask web framework. Run Django (or other) frameworks by using
requirements.txt for installation
• Is built using a Dockerfile published on GitHub
• App Settings can be accessed as environment variables using os.eviron
• Troubleshoot runtime issues via web SSH and streaming logs
• Utilise Managed Service Identities (MSI) to access other Azure resources.
12. Running Flask apps on
Azure App Service
simon.waight@microsoft.com
@simonwaight
blog.siliconvalve.com
https://wp.me/p26dla-T6