Skip to content

Commit fcd8d87

Browse files
committed
add release pipeline for mlflow
fix app slug fix helm setup action fix helm version add ct.yaml bump upload-artifact version fix kubeconfig retrieval bump chart testing version fix typo ci improvements and adding kots install remove conditional from create release pass license file as content pass license as content modify app slug for unstable channel fix slug move some steps to make targets add replicated helm install to pipeline fix chart testing setup fix makefile debug ci debug ci fix ci fix ci use jq to parse customer json debug ci try getting oci working with chart testing fix ct install kubeconfig offset channel name by run number in case of re-runs add more distros revert adding distros cleanup add test for mlflow fix mlflow test domain fix chart file path fix helm install stop using chart-testing fix helm install enable application tests debug remove make make sure helm dependencies get updated fix helm install bump timeout on test script and increase cluster size use kubectl port forward to access app fix port forward wait before port-forward fix authentication in test script fix test add application testing for kots install improve wait for mlfow service before starting test moving to taskfile moving to taskfile commit taskfile fix taskfile remove check deps fix get licenseid fix get licenseid fix get licenseid fix get licenseid fix get licenseid fix port forward fix port forward add missing dependency for tests refactor taskfile polish readme
1 parent 8b3d469 commit fcd8d87

File tree

8 files changed

+1852
-91
lines changed

8 files changed

+1852
-91
lines changed

.github/workflows/mlflow-ci.yml

+571
Large diffs are not rendered by default.

applications/mlflow/Makefile

-57
This file was deleted.

applications/mlflow/README.md

+165-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,170 @@
1-
# Mlflow
1+
# MLflow
22

3-
## Get Started
3+
MLflow is an open-source platform for managing the machine learning lifecycle, including experimentation, reproducibility, deployment, and a central model registry. This application provides a Helm-based deployment of MLflow with support for Replicated distribution.
44

5-
## Helm installs
5+
## Development
66

7-
## KOTS Existing Cluster
7+
The MLflow application includes a Taskfile.yml that provides tasks for developing, testing, and publishing the application.
88

9-
## Embedded Cluster
9+
### Prerequisites
1010

11-
## Running the Mlflow Quickstart Example
11+
- [Task](https://taskfile.dev/#/installation) command line tool
12+
- Kubernetes cluster configured in your current context
13+
- kubectl, helm, and python3 installed
14+
15+
### Development Workflow
16+
17+
Follow this workflow for development:
18+
19+
1. Add required Helm repositories and update dependencies:
20+
```bash
21+
task add:repos:helm
22+
task update:deps:helm
23+
```
24+
25+
2. Lint charts to check for issues:
26+
```bash
27+
task lint
28+
```
29+
30+
3. Template charts to verify the rendered manifests:
31+
```bash
32+
task template
33+
```
34+
35+
4. Install charts for development:
36+
```bash
37+
# Installs with Replicated SDK disabled
38+
task install:helm:local
39+
40+
# Optionally specify a custom values file
41+
MLFLOW_VALUES=./my-values.yaml task install:helm:local
42+
```
43+
44+
> **Note:** For local development, the Replicated SDK is explicitly disabled (`replicated.enabled=false`). This allows development without requiring access to the Replicated platform.
45+
>
46+
> This task automatically sets up port forwarding from localhost:5000 to the MLflow service in the cluster, making the application available for testing.
47+
48+
5. Run application tests:
49+
```bash
50+
task run:tests:app
51+
```
52+
53+
6. Make changes to your charts and repeat steps 2-5 as needed
54+
55+
This workflow allows rapid iteration without needing to publish to the Replicated registry.
56+
57+
### Task Reference
58+
59+
Tasks follow a `verb:resource[:subresource]` naming convention for clarity:
60+
61+
```bash
62+
# Validation and verification
63+
task lint # Lint Helm charts
64+
task template # Render templates to stdout (SDK disabled)
65+
task check:versions # Verify Chart.yaml and KOTS manifest versions match
66+
67+
# Repository and dependency management
68+
task add:repos:helm # Add required Helm repositories
69+
task update:deps:helm # Update Helm chart dependencies
70+
71+
# Packaging and versioning
72+
task update:versions:chart # Update chart version refs in KOTS manifests
73+
task package:charts # Package Helm charts for distribution
74+
task extract:version:chart # Extract current MLflow chart version
75+
76+
# Installation
77+
task install:helm:local # Install charts for local development (SDK disabled)
78+
79+
# Testing
80+
task test:install:helm # Test with charts from Replicated registry
81+
task test:install:kots # Test KOTS installation
82+
task run:tests:app # Run application tests against running MLflow
83+
task run:tests:all # Run all tests (Helm install + app tests)
84+
85+
# Release management
86+
task create:release # Create a Replicated release
87+
88+
# Cleanup
89+
task clean:files:charts # Clean packaged chart files
90+
task clean:all # Clean all generated files
91+
```
92+
93+
### Publishing Replicated Releases
94+
95+
When you're ready to publish your changes to the Replicated platform:
96+
97+
1. Set up the required environment variables:
98+
```bash
99+
# Replicated API token for authentication
100+
export REPLICATED_API_TOKEN=your_api_token
101+
102+
# App and channel to publish to
103+
export REPLICATED_APP=app_slug
104+
export REPLICATED_CHANNEL=channel_name
105+
```
106+
107+
2. Package the charts and update version references:
108+
```bash
109+
# This updates KOTS manifests with the current chart versions
110+
# and packages the charts as .tgz files
111+
task package:charts
112+
```
113+
114+
3. Create a release in Replicated:
115+
```bash
116+
# This uploads the packaged charts and creates a new release
117+
task create:release
118+
```
119+
120+
4. Verify the release was created successfully in the Replicated vendor portal
121+
122+
### Testing Replicated Releases
123+
124+
This workflow tests the full Replicated release and distribution process:
125+
126+
1. After publishing a release, login to the registry with a license ID:
127+
```bash
128+
# Set license ID for registry authentication
129+
export REPLICATED_LICENSE_ID=your_license_id
130+
export REPLICATED_APP=app_slug
131+
export REPLICATED_CHANNEL=channel_name
132+
133+
# Login to the registry
134+
task login:registry
135+
```
136+
137+
2. Test the Helm installation from the Replicated registry:
138+
```bash
139+
# This pulls charts from the Replicated registry with SDK enabled
140+
task test:install:helm
141+
```
142+
143+
3. Verify the installation with application tests:
144+
```bash
145+
task run:tests:app
146+
```
147+
148+
This workflow validates the entire release pipeline from publishing to installation, ensuring that your charts work correctly when distributed through the Replicated platform.
149+
150+
## CI/CD Pipeline
151+
152+
This application includes a CI/CD pipeline implemented with GitHub Actions. The pipeline handles:
153+
154+
- Linting and validating Helm chart templates
155+
- Creating releases in Replicated
156+
- Testing Helm installation with charts from the Replicated registry
157+
- Installing the application via KOTS
158+
159+
The pipeline workflow:
160+
1. `lint-and-template`: Validates chart syntax and templates (SDK disabled)
161+
2. `create-release`: Packages charts and creates a release in Replicated
162+
3. `helm-install-test`: Tests Helm installation with charts from Replicated registry (SDK enabled)
163+
4. `kots-install-test`: Tests KOTS installation
164+
5. `cleanup-test-release`: Cleans up test resources
165+
166+
The pipeline is triggered on:
167+
- Pull requests affecting the MLflow application
168+
- Pushes to the main branch
169+
170+
For more details, see the workflow definition in [.github/workflows/mlflow-ci.yml](../../.github/workflows/mlflow-ci.yml).

0 commit comments

Comments
 (0)