<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Piyush Chandel</title>
    <description>The latest articles on DEV Community by Piyush Chandel (@piyushchandel).</description>
    <link>https://dev.to/piyushchandel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F522187%2Fb1a2335e-b38b-4a43-922f-002fbff973a3.jpeg</url>
      <title>DEV Community: Piyush Chandel</title>
      <link>https://dev.to/piyushchandel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/piyushchandel"/>
    <language>en</language>
    <item>
      <title>Create And Deploy Python-based Web Apps from GitHub to Azure</title>
      <dc:creator>Piyush Chandel</dc:creator>
      <pubDate>Fri, 26 Mar 2021 09:30:35 +0000</pubDate>
      <link>https://dev.to/piyushchandel/create-and-deploy-python-based-web-apps-from-github-to-azure-1hh7</link>
      <guid>https://dev.to/piyushchandel/create-and-deploy-python-based-web-apps-from-github-to-azure-1hh7</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5k8uNnPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iry54h9jvuox1iodnku4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5k8uNnPb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iry54h9jvuox1iodnku4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Today, we are going to a look at deploying a Python-based Web App from GitHub to Azure.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xkxR7on6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cmerc1cthh1xzl1qfo1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xkxR7on6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cmerc1cthh1xzl1qfo1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;:&lt;/p&gt;

&lt;h4&gt;
  
  
  An Azure Account with eligible access to create resources,
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Familiarity with Web Apps,
&lt;/h4&gt;

&lt;h4&gt;
  
  
  GitHub Account with at least one Python-based Web-App (Django/Flask/Bottle) repo,
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Basic Knowledge of Git.
&lt;/h4&gt;

&lt;h3&gt;
  
  
  Step 1: Create an app service on Azure
&lt;/h3&gt;

&lt;p&gt;Go to portal.azure.com and sign in(or signup if you don’t have one). Click on “Create a resource” from the left sidebar.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--suDLAySH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzlgtfg4fpqmvluyyeoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--suDLAySH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzlgtfg4fpqmvluyyeoj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Microsoft Azure Homepage&lt;br&gt;
Search for “Web App” and click on it.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YrkiJ-4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmrgfbwdf9ybte50iowt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YrkiJ-4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmrgfbwdf9ybte50iowt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And fill out the details as shown below and as per your account settings ( Note: You might get charged for some of the resources you create while replicating this tutorial).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YrkiJ-4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmrgfbwdf9ybte50iowt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YrkiJ-4O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmrgfbwdf9ybte50iowt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Azure App Service Creation Widget Menu&lt;/p&gt;

&lt;p&gt;Subscription: Existing Subscription name(in my case it’s ”Pay-As-You-Go”).&lt;/p&gt;

&lt;p&gt;Resource Group: Create new and name it (in my case it’s ”TestRG” &lt;br&gt;
which is already an existing resource group).&lt;/p&gt;

&lt;p&gt;Name: App Name of your choice (in my case it’s ”AzureKonfHub”).&lt;/p&gt;

&lt;p&gt;Publish: Choose ‘Code’.&lt;/p&gt;

&lt;p&gt;Runtime stack: Pick ‘Python 3.8'.&lt;/p&gt;

&lt;p&gt;Operating System: Pick ‘Linux’&lt;/p&gt;

&lt;p&gt;Region: Pick ‘Central US’ or any other region where the F1 App Service Plan tier is available.&lt;/p&gt;

&lt;p&gt;App Service Plan::&lt;br&gt;
Linux Plan(Central US): Create a new plan (in my case it’s already existing/you might have to create a new one.)&lt;/p&gt;

&lt;p&gt;SKU and size: Free F1 (1 GB memory) [Pick this size]&lt;br&gt;
Hit Review and Create and after the validation, hit Create button. It might take a while to deploy the needed resources by Azure.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Configuring Deployment settings of App Service
&lt;/h4&gt;

&lt;p&gt;Once the deployment process is complete, you could see the previously created App Service in your Azure Dashboards All Resources tab.&lt;br&gt;
Click on that resource and go to the deployment center in resource sidebar.&lt;br&gt;
Select Github as the Source Control Provider. If you haven’t Authorized Github from Azure, it will open up a new window by asking you to authorize.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CunGj6qR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8jilc04f4z0np6hjha4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CunGj6qR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8jilc04f4z0np6hjha4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Azure — GitHub CI/CD Authorization&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ojlOENFY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6czlfhbd6njyw3fovc5t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ojlOENFY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6czlfhbd6njyw3fovc5t.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
GitHub Authorization by Azure App Service&lt;br&gt;
Hit Authorize by providing your Github Credentials and hit ‘Authorize/Approve’.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AqDCu1Dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5tut3fnw82dyyqqex8st.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AqDCu1Dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5tut3fnw82dyyqqex8st.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Azure CI/CD- GitHub&lt;br&gt;
Upon closing of GitHub Authorization, you can see the ‘Continue’ option in Azure like in the above image. After that, you will be taken to select Build Provider widget.&lt;br&gt;
Select ‘Kudu’ as your build provider and hit ‘Continue’ again.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Azure App Service Build Provider&lt;br&gt;
You will be taken to Configure Tab to select the respective repo in your GitHub account that you want to publish to Azure App Service.&lt;/p&gt;

&lt;h5&gt;
  
  
  Note: If you don’t have a Python-based Web App in your GitHub, fork it from here. And then, use that to deploy into Azure App Service.
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Configuring the GitHub Repo in Azure App Service&lt;br&gt;
And click ‘Continue’ and you will be taken to the final step of deployment configuration which is reviewing the Summary. You can see which repository is going to pushed to App Service in here.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Azure App Service Deployment Summary&lt;br&gt;
Once, you’re okay with this, click on ‘Finish’ button. And within a few minutes, you can see your GitHub hosted Web App up and running in Azure App Service.&lt;br&gt;
Check it at the URL given under App Service Resource like in the image below. It will be like “https://.azurewebsites.net”&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Azure App Service Info&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BB6jWQBO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cvmdvr7xtoc410yq7ke.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Access deployed Web-App on Azure App Service&lt;br&gt;
The best part of this is you can, even more, optimize App Service Plans in Azure to make sure there are multiple deployment slots for different purposes. For example, there could be a production deployment slot and a staging deployment slot in the same App Service if configured effectively.&lt;br&gt;
That’s how we can configure and deploy a python based web app from GitHub Repos to Azure within no time.&lt;/p&gt;

&lt;p&gt;If you like this article, consider sharing it or gimme a clap or follow me for more such stuff!!!&lt;/p&gt;

</description>
      <category>azure</category>
    </item>
  </channel>
</rss>
