Skip to content

A minimal hybrid Go/Python MLOps implementation demonstrating

License

Notifications You must be signed in to change notification settings

nickemma/mlops-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLOps Starter Kit

A minimal hybrid Go/Python MLOps implementation demonstrating:

  • Python model training with MLflow
  • Go API gateway
  • Kubernetes deployment
  • Basic CI/CD workflow

Project Structure

Getting Started

chmod +x scripts/setup_mlflow.sh ./scripts/setup_mlflow.sh

Prerequisites

  • Go 1.21+
  • Python 3.9+
  • Docker
  • Kubernetes cluster (Minikube recommended)
  • MLflow tracking server

Quick Start

  1. Train model:
make train
  1. Build and run Go API:
make build-go && ./bin/mlops-api
  1. Test API: Test End-to-End
curl -X POST http://localhost:8080/predict \
  -H "Content-Type: application/json" \
  -d '{"features": [2.0, 3.0]}'
  1. Deploy to Kubernetes:
make docker-build deploy

CI/CD Pipeline

GitHub Actions workflow included for:

# cd.yml
if: ${{ env.DEPLOY_ENABLED == 'true' }}
  • Automated testing
  • Docker image building
  • Kubernetes deployment

Multi-Environment Support

strategy:
  matrix:
    environment: [staging, production]
  • Development: Local development environment
  • Staging: Kubernetes cluster with staging namespace
  • Production: Kubernetes cluster with production namespace

Monitoring

Basic Prometheus/Grafana monitoring setup included in /deployments/monitoring


Verification Workflow

  1. Train Model
# Start MLflow server
mlflow server --host 0.0.0.0 --port 5000

# In another terminal
make train
  1. 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}
  1. Deploy to Kubernetes
# Build Docker images
make docker-build

# Deploy
kubectl apply -f deployments/

# Check status
kubectl get pods
  1. CI/CD Pipeline
# Automated testing
# Docker image building
# Kubernetes deployment
  1. Monitoring
# Prometheus/Grafana monitoring

License

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

No releases published

Packages

No packages published