Katana ML Skipper Logger
Logger service, logging runs in the background, without blocking API endpoint.
File Structure
.
- logger.py
- models.py
- router.json
- endpoint.py
- Dockerfile
- README.md
- logger-pod.yaml
- requirements.txt
api
Instructions
To run all services, check instructions in Getting Started
Run the service without Docker
- Install libraries
- Start FastAPI
- Logger FastAPI endpoints
- Monitor logs
pip install -r requirements.txt
uvicorn endpoint:app --port=5001 --reload
http://127.0.0.1:5001/docs
docker logs --follow skipper-logger
Build and run individual container
- Build container
- Run container
- Logger FastAPI endpoints
- Monitor logs
docker build --tag katanaml/skipper-logger .
docker run -it -d --name skipper-logger -p 5001:5001 katanaml/skipper-logger:latest
http://127.0.0.1:5001/docs
docker logs --follow skipper-logger
Build and run Kubernetes Pod
- Create namespace
- Create Pod
- Check Pod status
- Describe Pod
- Open Pod port for testing purposes
- Open Pod logs
- Test URL
- Check Pod service
- Delete Deployment
- Delete all resources
kubectl create ns katana-skipper
kubectl apply -n katana-skipper -f logger-pod.yaml
kubectl get -n katana-skipper pods
kubectl describe -n katana-skipper pods skipper-logger
kubectl port-forward -n katana-skipper deploy/skipper-logger 5001:5001
kubectl logs -n katana-skipper -f -l app=skipper-logger
http://localhost:5001/docs
kubectl get -n katana-skipper svc skipper-logger
kubectl delete -n katana-skipper -f logger-pod.yaml
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.