This project will demonstrate Continuous Integration and Continuous Delivery (CI/CD) for a Python-based machine learning application using the Flask web framework. Automated code testing has been implemented using GitHub Actions. An Azure DevOps pipeline has been created to test and deploy to an Azure App Service.
Using this guide you will be able to perform the following:
- Use Azure Cloud Shell to run the application
- Deploy the application as an Azure App Service
- Setup an Azure Pipeline
- Load test the application using Locust
- A link to a Trello board for the project
- A link to a spreadsheet that includes the original and final project plan
Once the source code is pushed to GitHub, it triggers GitHub Action for testing. Meanwhile, Azure Pipeline is triggered to build and deploy the application to Azure App Service.
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub
- In GitHub, click on you profile, then click Settings | SSH and GPG Keys.
- Click New SSH Key
- Paste in the SSH key and give it a title.
- Click Add SSH Key
git clone [email protected]:storeagles/Building_CICD_Pipeline.git
In order to create project scaffolding you should clone your GitHub repository to the Azure CLI. Then you can create Makefile, requirements.txt, virtual environment and project script file.
Configuring SaaS build server like GitHub Actions is an essential step for any software project that wants to apply DevOps best practices. By automating build server with GitHub actions you complete the process of Continuous Integration.
This prediction script is responsible for sending some data to our application via the appropriate port. Each numerical value in here represents some feature that is important for determining the price of a house. This prediction also indicates that your application is running.
This locust test script is running a test against the deployed application.
Virtual Machine service in Azure Portal is an agent. And this agent is associated with an Self-hosted AgentPool. The association is provided by personal access token (PAT).
We can also deploy our infrastructure as code by deploying terraform infrastructure with packer template.
A link Screencast on YouTube