This application will act as a live exercise for gauging technical compentency as well as collaboration skills of Mitchell Phillips.
- Clone repository from literate-spork
- Install Python version 3.10 or greater
- MacOs:
brew install python@3.10
- Windows:
choco install python
- Linux (Ubuntu)
sudo apt-get update && sudo apt-get install python
- MacOs:
- Install Pip
- MacOs/Linux:
python -m pip install --upgrade pip
- Windows:
py -m pip install --upgrade pip
- MacOs/Linux:
- Install Python Modules
pip install -r requirements.txt
- Install Docker
- MacOs:
brew install docker
- Windows:
choco install docker-desktop
- MacOs:
- Utilize pytest plugin for visual studio code or intellij for unit testing or
- Execute
pytest
command from terminal
- Execute
docker build -f Dockerfile -t mlphilli/literate-spork:latest .
- Execute
docker run -p 5001:5000 mlphilli/literate-spork:latest
- Validate localhost:5001 is up and serving requests
- Execute
docker push mlphilli/literate-spork:latest
- Install minikube following the minikube install guide
- Start up minikube using
minikube start
- Deploy your app to local cluster using the following:
- Modify deployment.yaml to include correct image:version in deployment section
- Navigate to project root directory
- Deploy to cluster using
kubectl apply -f ./kubernetes/deployment.yaml
- Enable external IP using
minikube tunnel
in new terminal - Validate app via kubectl commands and/or localhost
- Ctrl+C to stop minikube tunnel
- Execute
minikube stop
Option 1 - Deploy from Branch
- Ensure latest code is checked in and image is set to #{BUILD_SOURCEVERSION}#
- From ADO Pipeline
- Press Run in top right of page
- Select Branch to run against
- Press Run bottom right of page
- Ensure "Validate App Endpoints" in Validate stage completed and returned responses
Option 2 - Run via Pull Request to Main
- Raise a PR for literate-spork to main
- PR build will run tests and build image prior to approval
- PR will automatically deploy upon completion/merge of code
- Ensure "Validate App Endpoints" in Validate stage completed and returned responses