Skip to content

Commit

Permalink
Prepare kubeflow manifest for release
Browse files Browse the repository at this point in the history
Signed-off-by: lucferbux <[email protected]>
  • Loading branch information
lucferbux committed Feb 12, 2025
1 parent e8d2db3 commit 4741844
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-and-push-ui-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
build-image:
runs-on: ubuntu-latest
steps:
# Assign context variable for various action contexts (tag, main, CI)
- name: Assigning tag context
if: github.head_ref == '' && startsWith(github.ref, 'refs/tags/v')
run: echo "BUILD_CONTEXT=tag" >> $GITHUB_ENV
# Assign context variable for various action contexts (main, CI)
- name: Assigning main context
if: github.head_ref == '' && github.ref == 'refs/heads/main'
Expand All @@ -30,6 +34,10 @@ jobs:
commit_sha=${{ github.event.after }}
tag=main-${commit_sha:0:7}
echo "VERSION=${tag}" >> $GITHUB_ENV
- name: Set tag environment
if: env.BUILD_CONTEXT == 'tag'
run: |
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Build and Push UI Image
shell: bash
env:
Expand Down
4 changes: 4 additions & 0 deletions clients/ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ docker-push-standalone:
kind-deployment:
./scripts/deploy_kind_cluster.sh

.PHONY: kubeflow-deployment
kubeflow-deployment:
./scripts/deploy_kubeflow_cluster.sh

############ Build ############
.PHONY: frontend-build
frontend-build:
Expand Down
26 changes: 26 additions & 0 deletions clients/ui/scripts/deploy_kubeflow_cluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

# Check for required tools
command -v docker >/dev/null 2>&1 || { echo >&2 "Docker is required but it's not installed. Aborting."; exit 1; }
command -v kubectl >/dev/null 2>&1 || { echo >&2 "kubectl is required but it's not installed. Aborting."; exit 1; }
command -v kind >/dev/null 2>&1 || { echo >&2 "kind is required but it's not installed. Aborting."; exit 1; }

echo -e "\033[33mWARNING: You must have access to a cluster with kubeflow installed.\033[0m"

# Step 1: Deploy Model Registry UI to cluster
pushd ../../manifests/kustomize/options/ui/overlays/istio
echo -e "\033[32mDeploying Model Registry UI...\033[0m"
kubectl apply -n kubeflow -k .

# Step 2: Edit the centraldashboard-config ConfigMap
echo -e "\033[32mEditing centraldashboard-config ConfigMap...\033[0m"
kubectl get configmap centraldashboard-config -n kubeflow -o json | jq '.data.links |= (fromjson | .menuLinks += [{"icon": "assignment", "link": "/model-registry/", "text": "Model Registry", "type": "item"}] | tojson)' | kubectl apply -f -

# Wait for deployment to be available
echo -e "\033[32mWaiting Model Registry UI to be available...\033[0m"
kubectl wait --for=condition=available -n kubeflow deployment/model-registry-ui --timeout=1m

# Step 5: Port-forward the service
echo "\033[32mPort-forwarding Kubeflow Central Dashboard...\033[0m"
echo -e "\033[32mDashboard available in http://localhost:8080\033[0m"
kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80
35 changes: 29 additions & 6 deletions manifests/kustomize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,45 @@ curl -sX 'GET' \

There are two main ways to deploy the Model Registry UI:

1. Standalone mode - Use this if you are using Model Registry without the Kubeflow Platform
1. Standalone mode - Use this if you are using Model Registry without the Kubeflow Platform (**Note: You will need a custom standalone image**)

2. Integrated mode - Use this if you are deploying Model Registry in Kubeflow

For a standalone install run the following command:
For a standalone install, we recommend following the [Model Registry UI standalone deployment documentation](../../clients/ui/docs/local-deployment-guide-ui.md).

For an integrated install use the kubeflow UI overlay:

```bash
kubectl apply -k options/ui/overlays/standalone -n kubeflow
kubectl apply -k options/ui/overlays/istio -n kubeflow
```

For an integrated install use the istio UI overlay:
To make Model Registry UI accessible from the Kubeflow UI, you need to add the following to your Kubeflow UI configmap:

```bash
kubectl apply -k options/ui/overlays/istio -n kubeflow
kubectl edit configmap -n kubeflow centraldashboard-config
```

```yaml
apiVersion: v1
data:
links: |-
{
"menuLinks": [
{
"icon": "assignment",
"link": "/model-registry/",
"text": "Model Registry",
"type": "item"
},
...
```
Or you can add it in one line with:
```bash
kubectl get configmap centraldashboard-config -n kubeflow -o json | jq '.data.links |= (fromjson | .menuLinks += [{"icon": "assignment", "link": "/model-registry/", "text": "Model Registry", "type": "item"}] | tojson)' | kubectl apply -f - -n kubeflow
````

## Usage

For a basic usage of the Kubeflow Model Registry, follow the [Kubeflow Model Registry getting started documentation](https://www.kubeflow.org/docs/components/model-registry/getting-started/)
Expand All @@ -74,4 +97,4 @@ kubectl delete -k options/istio
# Delete model registry db and deployment
kubectl delete -k overlays/db
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ patches:
version: v1
kind: Service
name: model-registry-ui-service

namespace: kubeflow

0 comments on commit 4741844

Please sign in to comment.