The goal of this project is to demonstrate the usage of a CI/CD pipeline for an Azure deployment, demonstrating code testing and automation. For a working demo we use the application flask-sklearn.
To make this project work we have to do the follwing steps
First step is to create a resource group in Azure for our resources. I named it udacity-project-2.
Next step is the creation of an Azure AppService. The CD pipeline will deploy the python application (flask-sklearn) into this AppService. I named it udacity-devops-2.
To test the application later we clone our Github repo into Microsoft Azure CloudShell.
cd ~
git clone git@github.com:daniel-mersch/udacity-devops-2.git
cd udacity-devops-2To run a python app in CloudShell we have to first install a virtual environment and all dependencies. This is done by executing our Makefile.
make allNow we run a test of our code.
make testWith each push to the Github repo the CI pipeline runs.
A successful run of the CI pipeline triggers a run of the CD pipeline in Azure.
The Webapp can be accessed via webbrowser: https://udacity-devops-2.azurewebsites.net/
We have a little shell script called make_predict_azure_app.sh, which makes a test call to our WebApp.
./make_predict_azure_app.shLast step is to verify, that our Webapp is running like expected. Therefore we take a look at the streamed log.
For the future we should update the application to a current python version. The used version 3.5 is no longer supported, neither by Github Actions nor by Azure AppService, therefore we need to update the requirements.
Python 3.5 throws deprecated error.












