Tutorial Task

Goal

  • 1-month tutorial to understand test driven development with Python and deployment via Azure DevOps
  • you will be guided through the workshop. Nevertheless, it is not fully scripted on purpose. Sometimes you will encounter errors or that things behave differently than expected. use problems to read documentations, google stuff, try, fail and finally succeed. these will be the most important and rewarding moments ;)

Source:

Part 0: Getting Started

Get to now django and write first tests

  • Task: Create Git Repo in Thinkport GitHub Account

  • Task: Finish Django Tutorial

  • Task: Finish OTTD Chapter 1 and 2

    • Goals: Writing first unittest and get to know test driven development
    • Subtask
      • Setup Config for Visual Code to debug via "python manage.py test"

Part 1: TDD with Django

Develop a django app using test driven development locally

  • Goals: understand testing, familiarize with git, learn console commands, learn more about ORM, get to know rest concepts
  • Task: Finish OTTD Chapter 3 till 8
    • Subtasks
      • TDD - > unittest vs functional test
        • unittest structure: Setup, Exercise, Assert
      • how to create backend --> understanding of ORM
      • Rest API:
        • when does a API follows the rest principles?
        • understand conventions like: no trailing slash --> “action” URLs which modify the database.
      • Git:
        • get familiar with git status, git commit, git diff

Part 2: Deploy with Azure DevOps

Part 2.1: Manual deployment on a VM

Deploy Django app on a Linux Machine with Microsoft Azure

Part 2.2 Automated Deployment on VM

Deploy Django app via CICD Pipeline

Part 2.3 Automated deployment on Azure Apps

  • Task: use a azure service to replace sqlite by azure sql db or postgres
  • Task: create a azure web app and deploy the django app
  • Task: deploy django as web app via devops pipeline
  • Task: compare differences between VM and Azure Apps

Ideas for further parts:

  • Dependency management with poetry