[Music] Welcome to Deploy Django Apps on Cloud. After watching this video, you will be able to Explain how Django apps are deployed on web servers. Describe Cloud Foundry and the benefits of IBM Cloud Foundry, and use Python buildpack and Staticfile buildpack provided by Cloud Foundry to deploy a sample Django app In Django development, when you run the `runserver` command line, it starts a minimal development web server for you to quickly develop and test Django apps. To deploy reliable, scalable, and maintainable Django apps, you need to deploy them on web servers. Since most web servers such as Apache HTTP server and Nginx are not written in Python, Django apps need extra interfaces to talk to web servers supporting those interfaces. The Web Server Gateway Interface, or WSGI, is the main Python standard for communicating between Web servers and applications. It supports synchronous code only. To make Django apps work with WSGI, the startproject command line will create a wsgi.py file declaring an application callable by default. WSGI servers will try to find this application callable and use it as an entry point to communicate with your Django app. There are some popular WSGI web servers available for Django apps, such as green unicorn, uWSGI, Apache, and mod_wsgi. The Asynchronous Server Gateway Interface is another web server interface the Django app supports. The main difference from WSGI is it supports asynchronous code. To work with ASGI webserver, the startproject command line creates an asgi.py file declaring an application callable. Popular ASGI web servers are Daphne, Hypercorn and Uvicorn. Deploying Django apps or any other web apps in a production environment is non-trivial, as you need to carefully build and configure platforms and infrastructure such as runtimes, operating systems, network, databases, and servers in order to meet your deployment requirements. Thankfully, nowadays with the help of Infrastructure as a Service and Platform as a Service, you can deploy apps on provisioning platforms with minimal effort. Cloud Foundry is an example of a Platform as a Service offering. With Cloud Foundry, you can focus on your app development and not worry about the underlying infrastructure and platform. Cloud Foundry has a container-based architecture that runs apps in almost all popular programming languages. You can deploy apps to Cloud Foundry using minimal modifications to your app, and the deployment pipeline will take care of the entire deployment process automatically. By decoupling applications from infrastructure, you can make deployment decisions about where to host workloads: on premise or on the cloud. Note that many vendors are provisioning Cloud Foundry with add-on values, such as IBM Cloud, AWS, Azure, and GCP. There are many benefits to using Cloud Foundry on the IBM Cloud. First, it provides Lite tier with no credit card required. This is convenient for developers to learn how to deploy small apps. With Access control, you can even set up computation capacity for your teams. The IBM Cloud monitors the health status of your app and automatically restarts crashed apps. With Automatic routing, publicly reachable URLs are automatically created for your applications, and you can also bind to other IBM services, such as database and AI services, automatically. There are many Cloud Foundry runtimes that are supported on IBM Cloud, including Java, node.js, Python, Go, Swift, PHP.net, Tomcat, and Ruby. In this course, we will focus on Python runtime. Another alternative for hosting your Django app is the IBM Cloud Code Engine, or “Code Engine.” Code Engine abstracts the operational burden of building, deploying, and managing workloads so that developers can focus on code development. Code Engine has many capabilities. It runs different workloads such as a Django app and any run-to-complete batch jobs. It takes care of all cluster management, including provisioning, configuring, scaling, and managing servers, so you do not need to worry about the underlying infrastructure It automatically scales your workloads up and down, it manages platform and services access permissions based on the IBM Cloud IAM, and it is fully integrated into IBM Cloud so that you can take advantage of the full catalog of IBM Cloud services In this video, you learned: How to deploy the Django app on WSGI and ASGI web servers, and how IBM Cloud Foundry and IBM Code Engine as PaaS can facilitate your app deployment.