Logo v1.0.0
  • GitHub
  • Katana ML
Logo v1.0.0
  • Documentation
  • Introduction
  • Skipper
  • Getting Started
  • API
  • Workflow
  • Services
  • RabbitMQ
  • Skipper Lib
  • Logger

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.

File Structure

.
    api
    • models.py
    • router.py
    • workflow.json
    • workflow.py
  • endpoint.py
  • Dockerfile
  • README.md
  • workflow-pod.yaml
  • requirements.txt

Instructions

To run all services, check instructions in Getting Started

Run the service without Docker

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

Build and run individual container

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

Build and run Kubernetes Pod

  1. Create namespace
  2. kubectl create ns katana-skipper
  3. Create Pod
  4. kubectl apply -n katana-skipper -f workflow-pod.yaml
  5. Check Pod status
  6. kubectl get -n katana-skipper pods
  7. Describe Pod
  8. kubectl describe -n katana-skipper pods skipper-workflow
  9. Open Pod port for testing purposes
  10. kubectl port-forward -n katana-skipper deploy/skipper-workflow 5000:5000
  11. Open Pod logs
  12. kubectl logs -n katana-skipper -f -l app=skipper-workflow
  13. Test URL
  14. http://localhost:5000/docs
  15. Check Pod service
  16. kubectl get -n katana-skipper svc skipper-workflow
  17. Delete Deployment
  18. kubectl delete -n katana-skipper -f workflow-pod.yaml
  19. Delete all resources
  20. kubectl delete all --all -n katana-skipper

License

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