[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

workflow

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Katana ML Skipper Workflow

Returns queue name, based on task ID. This allows to route event to the correct queue, without hardcoding logic in the Web API.

Author

Katana ML, Andrej Baranovskij

Instructions

To run all services, check instructions in main README

Run the service without Docker

  1. Install libraries
pip install -r requirements.txt
  1. Start FastAPI
uvicorn endpoint:app --port=5000 --reload
  1. Workflow FastAPI endpoints
http://127.0.0.1:5000/docs

Build and run individual container

  1. Build container
docker build --tag katanaml/skipper-workflow .
  1. Run container
docker run -it -d --name skipper-workflow -p 5000:5000  katanaml/skipper-workflow:latest
  1. Workflow FastAPI endpoints
http://127.0.0.1:5000/docs

Build and run Kubernetes Pod

  1. Create namespace
kubectl create ns katana-skipper
  1. Create Pod
kubectl apply -n katana-skipper -f workflow-pod.yaml
  1. Check Pod status
kubectl get -n katana-skipper pods
  1. Describe Pod
kubectl describe -n katana-skipper pods skipper-workflow
  1. Open Pod port for testing purposes
kubectl port-forward -n katana-skipper deploy/skipper-workflow 5000:5000
  1. Open Pod logs
kubectl logs -n katana-skipper -f -l app=skipper-workflow
  1. Test URL
http://127.0.0.1:5000/docs
  1. Check Pod service
kubectl get -n katana-skipper svc skipper-workflow
  1. Delete Deployment
kubectl delete -n katana-skipper -f workflow-pod.yaml
  1. Delete all resources
kubectl delete all --all -n katana-skipper

Structure

.
├── api 
│   ├── models.py
│   ├── router.py
│   ├── workflow.json
│   └── workflow.py
├── endpoint.py
├── Dockerfile
├── README.md
├── workflow-pod.yaml
└── requirements.txt

License

Licensed under the Apache License, Version 2.0. Copyright 2020-2021 Katana ML, Andrej Baranovskij. Copy of the license.