Getting started with Continuous Delivery and Azure

Published Feb 24 2021 01:21 PM 1,060 Views
Microsoft

MalcolmSmithFraser.jpg

Guest post by Malcolm Smith Fraser, MS Candidate at Duke University | Race and the Professions Fellow at The Kenan Institute of Ethics. Malcolm is an Interdisciplinary Data Science master’s student at Duke University. He is interested in data science, machine learning engineering, and cloud computing. Away from the computer screen his passions revolve around music, fitness, and good food.


Continuous Delivery

In short, continuous delivery (and its younger sibling continuous integration) is a way to ensure that any code you write is always in a functioning state. While continuous integration automates the process of testing our code every time it is checked into a repository, continuous delivery adds the extra step of also updating any applications running on that code. This could be a single step such as updating a static website, or multiple steps – like updating a container that lives in a container registry, then initiating a redeployment of an application that runs on that container image.

 

The functionality behind continuous delivery lies in the build server. Some build servers are their own standalone services and others are integrated with the various cloud providers. Services like Jenkins, Travis, GitHub Actions and Azure DevOps are all examples of build servers. I will not go into too much depth on these in this post, but they are pretty cool.

 

In this post I am going to focus on continuous delivery for a Flask-based web application that runs on Azure App Service. However, most of the things I will show are applicable to other applications. I will be showing continuous delivery with Azure DevOps and GitHub Actions which both have very nice integrations with Azure App Service. All code for this application can be found in my GitHub repository here. [malcolmsfraser/AzureFlask-CD (github.com)]

 

 


When working properly with Azure DevOps, the continuous delivery workflow looks like this:

Deployed web application.

 

FlaskCD.png

 

HelloParty.png

Make a change and push it to my repository.

 

Gitchanges.jpg

Push triggers an app build and new deployment.

 

Azuredevops.png


Updated web app!

 updatedparty.png

 

 

 

Cool right!?

 

The main component you need when setting up continuous delivery for any service is a .yml build file. This is what the build server uses to execute commands when activated. Thankfully, the sleek integrations that Azure has with the two build servers I am using means that you do not need to concern yourself with all the syntax needed to write the file yourself.

 

Azure DevOps

Once you have an application up and running on Azure App Service. Navigate to the Azure DevOps home screen [https://azure.microsoft.com/en-us/services/devops] and create a free account. Follow the prompts to create a new project.

 

DevOps2.png

 

Next you need to create a service connection between your Azure DevOps project and the resource group under which your App Services application is deployed.

*Please note that if you are part of an organization that limits your permissions in making changes to the Active Directory, you might not be able to make this connection. I had to switch to a non duke.edu Microsoft account to create the service connection.

 

Navigate to project settings, and then select service connections.

 

Projectsettings.JPG

 

Create a new service connection to the Resource group containing the web application.

 

Flaskapp.JPG

 

Now that you have successfully connected to the resource deploying your application, it is time to setup the continuous delivery pipeline.

Click Pipelines à New pipeline. You will then be prompted connect to where your code is hosted (I chose GitHub, but it could be on any of the supported options) and then specify the specific repository where the code lives.

 

devop3.png

 

Whereiscode.JPG

           

The following page is where you can select the type of pipeline you will be deploying. Since I am working with a Python web application I selected “Python to Linux Web App on Azure”. However, if you click “Show more” you can see how you can easily configure a pipeline do various things – like build and push a Docker image to Azure Container Registry, which could even be followed by a Kubernetes deployment… lots of options to fit your needs.

 

configurepipeline.JPG

 

reviewyaml.png

 

Once you select the appropriate pipeline configuration, you will be prompted to connect it to the specific resource you are creating it for. Again, since I am working with a web application, I select the name of the appropriate Azure App Service resource in the group I connected to earlier. On the next screen I can hit “Save and run” and a file named azure-pipelines.yml will be pushed to my repository by Azure DevOps. Now every time I make a push to this repository, it will trigger Azure DevOps to redeploy the web application with any new changes.

 

GitHub Actions

I also could have set up CD with GitHub Actions, which is separate from the Azure DevOps workflow. To initialize you need to navigate to your Azure App Service resource and select “Deployment Center” from the menu on the right.

 

managemonitor.png

 

From there, navigate to the settings tab and create a new CI/CD integration, connect to your repository, select the runtime, and click save.

If you are using GitHub, this will create a file in your repository named .github/workflows/master_{app-name}.yml. Like the Azure DevOps workflow, now whenever you push you your repo GitHub Actions will kick start a deployment to Azure App Service.

 

deployment.png

 

Adding other steps to continuous delivery

Up until now the continuous delivery us only deploying your application. Better practice would be to also lint and test the application before it gets deployed (I am just linting here but adding a test would be the same idea). Simply insert these steps to the .yml file after the python environment has built. I use a Makefile to simplify these commands (make lint), but you could run them explicitly.

 

Azure DevOps (azure-pipelines.yml) on left and GitHub Actions (master_FlaskApp-CD.yml) on right:

 

Yaml.JPG

 

Both options for continuous delivery are very straightforward. That being said, it is very easy to see how Azure DevOps could quickly be used to continuously deliver a wide range of applications by changing just a single step in the process, while the current workflow for GitHub Actions that I used is more specific to the Python/Linux web app use case. I suspect that the integration for GitHub Actions is probably just as seamless across other Azure services, but I have not tried it yet.

 

Next, I want to try this with a containerized deployment…because containers are cool.

Additional Learning Resources
 
DevOps Learning Pathways 

Evolve your DevOps practices learning path - Learn | Microsoft Docs
Deploy applications with Azure DevOps learning path - Learn | Microsoft Docs
Build applications with Azure DevOps learning path - Learn | Microsoft Docs

Container and DevOps
Introduction to Azure Kubernetes Service - Learn | Microsoft Docs
Introduction to Kubernetes - Learn | Microsoft Docs
Automate multi-container Kubernetes deployments with Azure Pipelines - Learn | Microsoft Docs
Automate Docker container deployments with Azure Pipelines - Learn | Microsoft Docs

%3CLINGO-SUB%20id%3D%22lingo-sub-2163760%22%20slang%3D%22en-US%22%3EGetting%20started%20with%20Continuous%20Delivery%20and%20Azure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2163760%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MalcolmSmithFraser.jpg%22%20style%3D%22width%3A%20128px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257537i82AD5695F946DC70%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22MalcolmSmithFraser.jpg%22%20alt%3D%22MalcolmSmithFraser.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EGuest%20post%20by%20%3CA%20href%3D%22https%3A%2F%2Fwww.linkedin.com%2Fin%2Fmalcolmsfraser%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EMalcolm%20Smith%20Fraser%3C%2FA%3E%2C%26nbsp%3BMS%20Candidate%20at%20Duke%20University%20%7C%20Race%20and%20the%20Professions%20Fellow%20at%20The%20Kenan%20Institute%20of%20Ethics.%20Malcolm%20is%20an%20Interdisciplinary%20Data%20Science%20master%E2%80%99s%20student%20at%20Duke%20University.%20He%20is%20interested%20in%20data%20science%2C%20machine%20learning%20engineering%2C%20and%20cloud%20computing.%20Away%20from%20the%20computer%20screen%20his%20passions%20revolve%20around%20music%2C%20fitness%2C%20and%20good%20food.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CBR%20%2F%3EContinuous%20Delivery%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIn%20short%2C%20continuous%20delivery%20(and%20its%20younger%20sibling%20continuous%20integration)%20is%20a%20way%20to%20ensure%20that%20any%20code%20you%20write%20is%20always%20in%20a%20functioning%20state.%20While%20continuous%20integration%20automates%20the%20process%20of%20testing%20our%20code%20every%20time%20it%20is%20checked%20into%20a%20repository%2C%20continuous%20delivery%20adds%20the%20extra%20step%20of%20also%20updating%20any%20applications%20running%20on%20that%20code.%20This%20could%20be%20a%20single%20step%20such%20as%20updating%20a%20static%20website%2C%20or%20multiple%20steps%20%E2%80%93%20like%20updating%20a%20container%20that%20lives%20in%20a%20container%20registry%2C%20then%20initiating%20a%20redeployment%20of%20an%20application%20that%20runs%20on%20that%20container%20image.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20functionality%20behind%20continuous%20delivery%20lies%20in%20the%20build%20server.%20Some%20build%20servers%20are%20their%20own%20standalone%20services%20and%20others%20are%20integrated%20with%20the%20various%20cloud%20providers.%20Services%20like%20Jenkins%2C%20Travis%2C%20GitHub%20Actions%20and%20Azure%20DevOps%20are%20all%20examples%20of%20build%20servers.%20I%20will%20not%20go%20into%20too%20much%20depth%20on%20these%20in%20this%20post%2C%20but%20they%20are%20pretty%20cool.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20post%20I%20am%20going%20to%20focus%20on%20continuous%20delivery%20for%20a%20Flask-based%20web%20application%20that%20runs%20on%20Azure%20App%20Service.%20However%2C%20most%20of%20the%20things%20I%20will%20show%20are%20applicable%20to%20other%20applications.%20I%20will%20be%20showing%20continuous%20delivery%20with%20Azure%20DevOps%20and%20GitHub%20Actions%20which%20both%20have%20very%20nice%20integrations%20with%20Azure%20App%20Service.%20All%20code%20for%20this%20application%20can%20be%20found%20in%20my%20GitHub%20repository%20here.%20%5B%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmalcolmsfraser%2FAzureFlask-CD%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Emalcolmsfraser%2FAzureFlask-CD%20(github.com)%3C%2FA%3E%3C%2FSPAN%3E%5D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_22%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3C%2FP%3E%3CDIV%20class%3D%22video-embed-center%20video-embed%22%3E%3CIFRAME%20class%3D%22embedly-embed%22%20src%3D%22https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FzVzHAiKvWHA%253Ffeature%253Doembed%26amp%3Bdisplay_name%3DYouTube%26amp%3Burl%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DzVzHAiKvWHA%26amp%3Bimage%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252FzVzHAiKvWHA%252Fhqdefault.jpg%26amp%3Bkey%3Db0d40caa4f094c68be7c29880b16f56e%26amp%3Btype%3Dtext%252Fhtml%26amp%3Bschema%3Dyoutube%22%20width%3D%22600%22%20height%3D%22337%22%20scrolling%3D%22no%22%20title%3D%22YouTube%20embed%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%22%20allowfullscreen%3D%22true%22%3E%3C%2FIFRAME%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EWhen%20working%20properly%20with%20Azure%20DevOps%2C%20the%20continuous%20delivery%20workflow%20looks%20like%20this%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EDeployed%20web%20application.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FlaskCD.png%22%20style%3D%22width%3A%20934px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257515iAF035BADD3C5AB4B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22FlaskCD.png%22%20alt%3D%22FlaskCD.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22HelloParty.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257516iFB752BDF546D86DC%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22HelloParty.png%22%20alt%3D%22HelloParty.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EMake%20a%20change%20and%20push%20it%20to%20my%20repository.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Gitchanges.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257541i32CCF87E7C75711B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Gitchanges.jpg%22%20alt%3D%22Gitchanges.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPush%20triggers%20an%20app%20build%20and%20new%20deployment.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Azuredevops.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257518i2ADB7C4328F6630B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Azuredevops.png%22%20alt%3D%22Azuredevops.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CBR%20%2F%3EUpdated%20web%20app!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22updatedparty.png%22%20style%3D%22width%3A%20553px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257519i7BEA97E9688E4C41%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22updatedparty.png%22%20alt%3D%22updatedparty.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECool%20right!%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20main%20component%20you%20need%20when%20setting%20up%20continuous%20delivery%20for%20any%20service%20is%20a%20.yml%20build%20file.%20This%20is%20what%20the%20build%20server%20uses%20to%20execute%20commands%20when%20activated.%20Thankfully%2C%20the%20sleek%20integrations%20that%20Azure%20has%20with%20the%20two%20build%20servers%20I%20am%20using%20means%20that%20you%20do%20not%20need%20to%20concern%20yourself%20with%20all%20the%20syntax%20needed%20to%20write%20the%20file%20yourself.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EAzure%20DevOps%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20an%20application%20up%20and%20running%20on%20Azure%20App%20Service.%20Navigate%20to%20the%20Azure%20DevOps%20home%20screen%20%5B%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fdevops%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fservices%2Fdevops%3C%2FA%3E%3C%2FSPAN%3E%5D%20and%20create%20a%20free%20account.%20Follow%20the%20prompts%20to%20create%20a%20new%20project.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_5%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22DevOps2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257520iCBE4C4C568CC4B62%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22DevOps2.png%22%20alt%3D%22DevOps2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%20you%20need%20to%20create%20a%20service%20connection%20between%20your%20Azure%20DevOps%20project%20and%20the%20resource%20group%20under%20which%20your%20App%20Services%20application%20is%20deployed.%3C%2FP%3E%0A%3CP%3E%3CEM%3E*Please%20note%20that%20if%20you%20are%20part%20of%20an%20organization%20that%20limits%20your%20permissions%20in%20making%20changes%20to%20the%20Active%20Directory%2C%20you%20might%20not%20be%20able%20to%20make%20this%20connection.%20I%20had%20to%20switch%20to%20a%20non%20duke.edu%20Microsoft%20account%20to%20create%20the%20service%20connection.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENavigate%20to%20project%20settings%2C%20and%20then%20select%20service%20connections.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_6%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Projectsettings.JPG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257545iD08A6FB138A5C085%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Projectsettings.JPG%22%20alt%3D%22Projectsettings.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECreate%20a%20new%20service%20connection%20to%20the%20Resource%20group%20containing%20the%20web%20application.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Flaskapp.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257522i2AC4F0F21B858EDB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Flaskapp.JPG%22%20alt%3D%22Flaskapp.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20that%20you%20have%20successfully%20connected%20to%20the%20resource%20deploying%20your%20application%2C%20it%20is%20time%20to%20setup%20the%20continuous%20delivery%20pipeline.%3C%2FP%3E%0A%3CP%3EClick%20%3CEM%3EPipelines%3C%2FEM%3E%20%C3%A0%20%3CEM%3ENew%20pipeline%3C%2FEM%3E.%20You%20will%20then%20be%20prompted%20connect%20to%20where%20your%20code%20is%20hosted%20(I%20chose%20GitHub%2C%20but%20it%20could%20be%20on%20any%20of%20the%20supported%20options)%20and%20then%20specify%20the%20specific%20repository%20where%20the%20code%20lives.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_12%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22devop3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257523i6F1D7067DCCCEA0E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22devop3.png%22%20alt%3D%22devop3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_13%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Whereiscode.JPG%22%20style%3D%22width%3A%20860px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257524i979E5ADF955D4EEE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Whereiscode.JPG%22%20alt%3D%22Whereiscode.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20following%20page%20is%20where%20you%20can%20select%20the%20type%20of%20pipeline%20you%20will%20be%20deploying.%20Since%20I%20am%20working%20with%20a%20Python%20web%20application%20I%20selected%20%E2%80%9CPython%20to%20Linux%20Web%20App%20on%20Azure%E2%80%9D.%20However%2C%20if%20you%20click%20%E2%80%9CShow%20more%E2%80%9D%20you%20can%20see%20how%20you%20can%20easily%20configure%20a%20pipeline%20do%20various%20things%20%E2%80%93%20like%20build%20and%20push%20a%20Docker%20image%20to%20Azure%20Container%20Registry%2C%20which%20could%20even%20be%20followed%20by%20a%20Kubernetes%20deployment%E2%80%A6%20lots%20of%20options%20to%20fit%20your%20needs.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_15%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22configurepipeline.JPG%22%20style%3D%22width%3A%20894px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257525i35724F938C0BA404%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22configurepipeline.JPG%22%20alt%3D%22configurepipeline.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reviewyaml.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257526i742A2AEEC8C283CF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22reviewyaml.png%22%20alt%3D%22reviewyaml.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20select%20the%20appropriate%20pipeline%20configuration%2C%20you%20will%20be%20prompted%20to%20connect%20it%20to%20the%20specific%20resource%20you%20are%20creating%20it%20for.%20Again%2C%20since%20I%20am%20working%20with%20a%20web%20application%2C%20I%20select%20the%20name%20of%20the%20appropriate%20Azure%20App%20Service%20resource%20in%20the%20group%20I%20connected%20to%20earlier.%20On%20the%20next%20screen%20I%20can%20hit%20%E2%80%9CSave%20and%20run%E2%80%9D%20and%20a%20file%20named%20azure-pipelines.yml%20will%20be%20pushed%20to%20my%20repository%20by%20Azure%20DevOps.%20Now%20every%20time%20I%20make%20a%20push%20to%20this%20repository%2C%20it%20will%20trigger%20Azure%20DevOps%20to%20redeploy%20the%20web%20application%20with%20any%20new%20changes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EGitHub%20Actions%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EI%20also%20could%20have%20set%20up%20CD%20with%20GitHub%20Actions%2C%20which%20is%20separate%20from%20the%20Azure%20DevOps%20workflow.%20To%20initialize%20you%20need%20to%20navigate%20to%20your%20Azure%20App%20Service%20resource%20and%20select%20%E2%80%9CDeployment%20Center%E2%80%9D%20from%20the%20menu%20on%20the%20right.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_18%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22managemonitor.png%22%20style%3D%22width%3A%20341px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257527i2BA205586FF3B774%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22managemonitor.png%22%20alt%3D%22managemonitor.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20there%2C%20navigate%20to%20the%20settings%20tab%20and%20create%20a%20new%20CI%2FCD%20integration%2C%20connect%20to%20your%20repository%2C%20select%20the%20runtime%2C%20and%20click%20save.%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20using%20GitHub%2C%20this%20will%20create%20a%20file%20in%20your%20repository%20named%20.github%2Fworkflows%2Fmaster_%7Bapp-name%7D.yml.%20Like%20the%20Azure%20DevOps%20workflow%2C%20now%20whenever%20you%20push%20you%20your%20repo%20GitHub%20Actions%20will%20kick%20start%20a%20deployment%20to%20Azure%20App%20Service.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_19%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22deployment.png%22%20style%3D%22width%3A%20811px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257528i3B375831ADD789CD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22deployment.png%22%20alt%3D%22deployment.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EAdding%20other%20steps%20to%20continuous%20delivery%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EUp%20until%20now%20the%20continuous%20delivery%20us%20only%20deploying%20your%20application.%20Better%20practice%20would%20be%20to%20also%20lint%20and%20test%20the%20application%20before%20it%20gets%20deployed%20(I%20am%20just%20linting%20here%20but%20adding%20a%20test%20would%20be%20the%20same%20idea).%20Simply%20insert%20these%20steps%20to%20the%20.yml%20file%20after%20the%20python%20environment%20has%20built.%20I%20use%20a%20Makefile%20to%20simplify%20these%20commands%20(make%20lint)%2C%20but%20you%20could%20run%20them%20explicitly.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EAzure%20DevOps%20(azure-pipelines.yml)%20on%20left%20and%20GitHub%20Actions%20(master_FlaskApp-CD.yml)%20on%20right%3A%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Yaml.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F257529i756C937C4E65F10E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Yaml.JPG%22%20alt%3D%22Yaml.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_20%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EBoth%20options%20for%20continuous%20delivery%20are%20very%20straightforward.%20That%20being%20said%2C%20it%20is%20very%20easy%20to%20see%20how%20Azure%20DevOps%20could%20quickly%20be%20used%20to%20continuously%20deliver%20a%20wide%20range%20of%20applications%20by%20changing%20just%20a%20single%20step%20in%20the%20process%2C%20while%20the%20current%20workflow%20for%20GitHub%20Actions%20that%20I%20used%20is%20more%20specific%20to%20the%20Python%2FLinux%20web%20app%20use%20case.%20I%20suspect%20that%20the%20integration%20for%20GitHub%20Actions%20is%20probably%20just%20as%20seamless%20across%20other%20Azure%20services%2C%20but%20I%20have%20not%20tried%20it%20yet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENext%2C%20I%20want%20to%20try%20this%20with%20a%20containerized%20deployment%E2%80%A6because%20containers%20are%20cool.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EAdditional%20Learning%20Resources%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EDevOps%20Learning%20Pathways%26nbsp%3B%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fpaths%2Fevolve-your-devops-practices%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EEvolve%20your%20DevOps%20practices%20learning%20path%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fpaths%2Fdeploy-applications-with-azure-devops%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDeploy%20applications%20with%20Azure%20DevOps%20learning%20path%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fpaths%2Fbuild-applications-with-azure-devops%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBuild%20applications%20with%20Azure%20DevOps%20learning%20path%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3EContainer%20and%20DevOps%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fmodules%2Fintro-to-azure-kubernetes-service%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIntroduction%20to%20Azure%20Kubernetes%20Service%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fmodules%2Fintro-to-kubernetes%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIntroduction%20to%20Kubernetes%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fmodules%2Fdeploy-kubernetes%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAutomate%20multi-container%20Kubernetes%20deployments%20with%20Azure%20Pipelines%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fmodules%2Fdeploy-docker%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAutomate%20Docker%20container%20deployments%20with%20Azure%20Pipelines%20-%20Learn%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2163760%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EContinuous%20Delivery%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIn%20short%2C%20continuous%20delivery%20(and%20its%20younger%20sibling%20continuous%20integration)%20is%20a%20way%20to%20ensure%20that%20any%20code%20you%20write%20is%20always%20in%20a%20functioning%20state.%20While%20continuous%20integration%20automates%20the%20process%20of%20testing%20our%20code%20every%20time%20it%20is%20checked%20into%20a%20repository%2C%20continuous%20delivery%20adds%20the%20extra%20step%20of%20also%20updating%20any%20applications%20running%20on%20that%20code.%20This%20could%20be%20a%20single%20step%20such%20as%20updating%20a%20static%20website%2C%20or%20multiple%20steps%20%E2%80%93%20like%20updating%20a%20container%20that%20lives%20in%20a%20container%20registry%2C%20then%20initiating%20a%20redeployment%20of%20an%20application%20that%20runs%20on%20that%20container%20image.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Feb 24 2021 01:29 PM
Updated by: