Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Running Python Flask web apps on Azure App Service

128 views

Published on

Presentation walking through how you can run Python Flask web applications on Azure App Service.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Running Python Flask web apps on Azure App Service

  1. 1. Running Flask apps on Azure App Service simon.waight@microsoft.com @simonwaight blog.siliconvalve.com
  2. 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
  3. 3. App Service High productivity Your choice of languages, pre-built packages, and tools Develop A Build </> Deploy Monitor
  4. 4. High productivity Your choice of languages, pre-built packages, and tools Develop IDE tools Language Pre-built packages .NET
  5. 5. High productivity Your choice of languages, pre-built packages, and tools Build z z Source code CI engines Container registry
  6. 6. Web ARM Docker k8s Docker Compose Zip war High productivity Your choice of languages, pre-built packages, and tools Deploy z Slots CD tools Deploy packages
  7. 7. High productivity Your choice of languages, pre-built packages, and tools Monitor Monitoring Tools Debug tools
  8. 8. P R O V I S I O N I N G A P Y T H O N W E B A P P H O S T
  9. 9. Demo Time
  10. 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. 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. 12. Running Flask apps on Azure App Service simon.waight@microsoft.com @simonwaight blog.siliconvalve.com https://wp.me/p26dla-T6

×