Code Monkey home page Code Monkey logo

udacity-building-cicd-pipeline's Introduction

Build Status

Overview

In this project, you will build a Github repository from scratch and create a scaffolding that will assist you in performing both Continuous Integration and Continuous Delivery. You'll use Github Actions along with a Makefile, requirements.txt and application code to perform an initial lint, test, and install cycle. Next, you'll integrate this project with Azure Pipelines to enable Continuous Delivery to Azure App Service.

This repository contains project resources that I've created and the submissions folder contains:

  • project_plan: Contains Project Plan Excel file.
  • screenshots: Contains required screenshot files.

Project Plan

It is critical to have an effective project plan and task tracking.

Instructions

architecture diagram

Test project locally using Azure Cloud Shell

  1. Download project code into Azure Cloud Shell Go to Azure Portal and open Azure Cloud Shell then clone this repository Download project
  2. Create and Activate Python virtual environment
$ python -m venv ~/.myenv
$ source ~/.myenv/bin/activate
  1. Install and execute test locally (Make sure you have make command installed)
$ make all

Result: Make all result

Deploy the project to Azure Web App

$ az webapp up -g Azuredevops -n <Your global unique web app name>

After execute above command the app will be deployed and result is displayed as following example: deploy result

Execute test against deployed application Edit the host in file ./make_predict_azure_app.sh to your application URL after successfully deployed. Then execute below command to test.

$ ./make_predict_azure_app.sh

Result: Test Result

Setup Azure Pipelines

Please follow this instructions to set up Azure Pipeline for the project. In general, the following steps need to be done:

  1. Go to dev.azure.com and create an Azure Devops project.

  2. Create a service connection to your Azure resources.

  3. Create a pipeline with existing azure-pipeline.yaml file and change following variables:

    • azureServiceConnectionId: '[YOUR SERVICE CONNECTION ID]'
    • webAppName: '[YOUR DEPLOYED AZURE WEB APP NAME]'
    • environmentName: '[ENV NAME THAT YOU WANT]'
    • Change the Azure Pipeline agent pool name of pool: myAgentPool

The pipeline will be looked like this: pipeline Exammple of the run detail: pipeline detail

Successfull prediction after pipeline deploy the app: predict

Load test using locust

$ locust -H <YOUR WEB APP URL>

Example:

$ locust -H https://flask-ml-service-258964.azurewebsites.net/

locust result

Stream of the Log file

$ az webapp log tail

log

Enhancements

This pipeline can be enhanced as following:

  • Deploy to multiple deployment slot for Dev, Test, Prod.
  • Integrate with GitHub Action for CD.

Demo

Here is the demo video

udacity-building-cicd-pipeline's People

Contributors

trieutritam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.