This quickstart demonstrates how to use lakeFS® as an AI data control plane for Red Hat OpenShift AI® using the fraud-detection tutorial workflow.
- Overview
- See it in action
- Architecture
- Requirements
- Deploy
- Documentation
- References
- Technical details
- Tags
The purpose of this AI quickstart is to highlight the benefits of data versioning, provided by lakeFS, in an AI/ML environment. lakeFS allows the data engineer to manage the lifecycle of data using the same workflow a developer uses to manage source code, using git. This means that, like source code, data can be versioned, branched, merged and pulled from a git repository, although the data is actually stored in a backend object storage.
See a demo of lakeFS with OpenShift AI, and the value they bring together.
This quickstart intentionally separates responsibilities:
-
Data plane (object storage)
MinIO / S3 stores the bytes: datasets, models, and pipeline artifacts. -
Control plane (lakeFS)
lakeFS adds Git-like semantics (branch, commit, merge, revert) and lineage metadata on top of the data in object storage. -
Compatibility
lakeFS exposes an S3-compatible API, so OpenShift AI and S3-native tools can use it as a drop-in endpoint without code changes.
After running this quickstart you can answer questions like:
- "Which exact dataset version trained the model that's currently served?"
- "What changed between the dataset used for model v1 and v2?"
- "Can we reproduce last month's metrics exactly?"
- "Can we roll back immediately if a bad data update ships?"
- Deploy MinIO (object storage) and lakeFS (S3-compatible versioning gateway)
- Configure OpenShift AI to use lakeFS as its S3 endpoint (data connection)
- Run the fraud-detection notebooks to:
- load training data from lakeFS
- train a model
- write the model artifact back to lakeFS
- Create a lakeFS branch for a data change (e.g., updated labels / new transactions)
- Write updated training data to the branch, commit it, and retrain
- Compare results across versions, then merge the branch to promote (or revert/discard)
- (Optional) Run a pipeline that reads/writes through lakeFS so pipeline outputs are also versioned
This quickstart was developed and tested on a Red Hat OpenShift cluster with the following components and resources. This can be considered the minimum requirements.
| Node Type | Qty | vCPU | Memory (GB) |
|---|---|---|---|
| Control Plane | 3 | 8 | 16 |
| Worker | 2 | 8 | 32 |
Note
A GPU is not required for this quickstart
This quickstart was tested with the following software versions:
| Software | Version |
|---|---|
| OpenShift | 4.20.5 |
| OpenShift Service Mesh | 2.5.11-0 |
| OpenShift Serverless | 1.37.0 |
| OpenShift AI | 2.25 |
| helm | 3.17.1 |
| lakeFS | 1.73.0 |
| MinIO | latest |
The user performing this quickstart should have the ability to create a project in OpenShift and OpenShift AI. This requires the cluster role of admin.
| Chart | Required Role | Purpose |
|---|---|---|
fraud-detection-admin |
cluster-admin | Deploys Model Registry, PostgreSQL, patches DataScienceCluster, sets up RBAC |
fraud-detection |
admin (namespace-level) | Deploys lakeFS, MinIO, Jupyter notebooks, Data Science Pipeline Server |
Note
If you only need the core lakeFS demo without Model Registry, you can skip the admin chart and run make deploy alone with namespace-level admin permissions.
The deployment uses Helm charts managed through a convenient Makefile interface.
The steps assume the following pre-requisite products and components are deployed and functional with required permissions on the cluster:
- OpenShift Container Platform (or Kubernetes cluster)
- OpenShift Service Mesh
- OpenShift Serverless
- OpenShift AI
- User has
adminpermissions in the cluster - Helm 3.x installed
oc(OpenShift) orkubectl(Kubernetes) CLI installed
For Detailed Information see Deployment ReadMe
- Clone this repo
git clone https://github.com/rh-ai-quickstart/Fraud-Detection-data-versioning-with-lakeFS.git
- cd to
deploydirectory
cd Fraud-Detection-data-versioning-with-lakeFS/deploy
- Login to the OpenShift cluster:
oc login --token=<user_token> --server=https://api.<openshift_cluster_fqdn>:6443
- Deploy using the Makefile (recommended):
The deployment uses two Helm charts. Install both for the full experience:
Note
There are 2 ways to deploy based on your users permissions. If you have cluster admin access you can run anything in this repo.
If you only have user level access, you can have an admin run make deploy-admin and then as the user run make deploy.
# View all available commands and configuration
make help
# Option A: Deploy both charts at once (requires cluster-admin)
make deploy-all
# Option B: Deploy separately
# Step 1 - Admin chart: PostgreSQL + Model Registry + DSC patch (requires cluster-admin)
make deploy-admin
# Step 2 - User chart: lakeFS, MinIO, notebooks, pipelines (namespace admin)
make deploy
# Check deployment status
make get-pods
The Makefile will automatically:
- Detect if you're on OpenShift or Kubernetes
- Create the namespace (
fraud-detectionby default) - Deploy lakeFS, MinIO, PostgreSQL, Jupyter notebooks, Model Registry, and Data Science Pipeline Server
- Set up required RBAC and post-install configurations
Customize deployment (optional):
# Deploy to a custom namespace
make deploy NAMESPACE=my-lakefs-demo
# Use a longer timeout for slower clusters
make deploy TIMEOUT=15m
For detailed Makefile documentation, see deploy/Readme.md.
- Get the lakeFS route or service URL:
# For OpenShift
make get-routes
# For Kubernetes
make get-services
- Access the lakeFS browser-based UI using the route/URL:
- Update the username set to
something - Enter your email address (or a bogus email address)
- Download the
access_key_idandsecret_access_keydisplayed on the new page, as they will not be accessible later on - See values.yaml for actual values
- Go back to the login page and log in using those credentials
- Update the username set to
# View all resources
make get-all
# Check specific component logs
make logs-lakefs
make logs-minio
make logs-notebook
Remove the deployment using the Makefile:
# Undeploy the Helm release and delete the namespace
make undeploy
# Or delete everything including namespace
make clean-all
Alternatively, you can manually delete the project/namespace:
oc delete namespace fraud-detection
# or
kubectl delete namespace fraud-detection
For detailed guides on specific topics, see:
| Guide | Description |
|---|---|
| Pipelines Guide | Comprehensive guide to Data Science Pipelines setup and usage |
| Notebooks Guide | Detailed documentation for all Jupyter notebooks |
| Pipelines Quick Reference | Quick reference for pipeline files |
- lakeFS documentation v1.73
- OpenShift AI documentation v2.25
- OpenShift AI Fraud Detection example
- OpenShift AI Pipelines documentation
lakeFS exposes an S3-compatible API. In S3 terms:
-
Bucket = lakeFS repository
-
First path segment = branch
-
Object paths follow:
s3://[REPOSITORY]/[BRANCH]/PATH/TO/OBJECT
Example:
- Training data: s3://fraud/main/data/transactions.parquet
- Experiment data: s3://fraud/exp-01/data/transactions.parquet
- Model artifact: s3://fraud/exp-01/models/fraud/1/model.onnx
In real AI platforms, the point isn't just versioning—it's controlled promotion:
- Protect
mainso changes only arrive via merges - Add pre-merge hooks (Actions) to enforce data quality checks (schema, format, PII scanning)
- Merge = "publish" approved data/model artifacts to consumers
- Product: OpenShift AI
- Partner: lakeFS
- Industry: Banking and securities
- Use case: Financial fraud detection with data versioning
