A minimal hybrid Go/Python MLOps implementation demonstrating:
- Python model training with MLflow
- Go API gateway
- Kubernetes deployment
- Basic CI/CD workflow
chmod +x scripts/setup_mlflow.sh ./scripts/setup_mlflow.sh
- Go 1.21+
- Python 3.9+
- Docker
- Kubernetes cluster (Minikube recommended)
- MLflow tracking server
- Train model:
make train
- Build and run Go API:
make build-go && ./bin/mlops-api
- Test API: Test End-to-End
curl -X POST http://localhost:8080/predict \
-H "Content-Type: application/json" \
-d '{"features": [2.0, 3.0]}'
- Deploy to Kubernetes:
make docker-build deploy
GitHub Actions workflow included for:
# cd.yml
if: ${{ env.DEPLOY_ENABLED == 'true' }}
- Automated testing
- Docker image building
- Kubernetes deployment
strategy:
matrix:
environment: [staging, production]
- Development: Local development environment
- Staging: Kubernetes cluster with staging namespace
- Production: Kubernetes cluster with production namespace
Basic Prometheus/Grafana monitoring setup included in /deployments/monitoring
- Train Model
# Start MLflow server
mlflow server --host 0.0.0.0 --port 5000
# In another terminal
make train
- Test Go API
# Build and run Go API
make build-go
./bin/mlops-api
# Test endpoint
curl -X POST http://localhost:8080/predict \
-H "Content-Type: application/json" \
-d '{"features": [2.0, 3.0]}'
# Output: {"prediction": 5}
- Deploy to Kubernetes
# Build Docker images
make docker-build
# Deploy
kubectl apply -f deployments/
# Check status
kubectl get pods
- CI/CD Pipeline
# Automated testing
# Docker image building
# Kubernetes deployment
- Monitoring
# Prometheus/Grafana monitoring
This project is licensed under the MIT License - see the LICENSE file for details.