Skip to content

Commit

Permalink
Revamp docs
Browse files Browse the repository at this point in the history
Signed-off-by: lucferbux <lferrnan@redhat.com>
  • Loading branch information
lucferbux committed Nov 8, 2024
1 parent 962d135 commit 25cd4a6
Show file tree
Hide file tree
Showing 14 changed files with 292 additions and 31 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Model registry provides a central repository for model developers to store and m
- [playground](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/kubeflow/model-registry/main/api/openapi/model-registry.yaml)
- [license scanning](https://github.com/kubeflow/model-registry/issues/323)
- [monitoring image quality](https://github.com/kubeflow/model-registry/issues/327)
8. [UI](.clients/ui/README.md)

## Pre-requisites:
- go >= 1.21
Expand Down
34 changes: 34 additions & 0 deletions clients/ui/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
CONTAINER_TOOL ?= docker
IMG ?= model-registry-bff:latest
PORT ?= 4000
MOCK_K8S_CLIENT ?= false
MOCK_MR_CLIENT ?= false
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29.0

.PHONY: all
all: build

.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: dev-bff
dev-bff:
cd bff && make run PORT=4000 MOCK_K8S_CLIENT=true MOCK_MR_CLIENT=true

.PHONY: dev-frontend
dev-frontend:
cd frontend && npm run start:dev

.PHONY: dev-start
dev-start:
make -j 2 dev-bff dev-frontend

.PHONY: docker-compose
docker-compose:
$(CONTAINER_TOOL) compose -f docker-compose.yaml up

.PHONY: kind-deployment
kind-deployment:
./scripts/deploy_kind_cluster.sh
48 changes: 48 additions & 0 deletions clients/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[frontend requirements]: ./frontend/docs/dev-setup.md#requirements
[BFF requirements]: ./bff/README.md#pre-requisites
[frontend dev setup]: ./frontend/docs/dev-setup.md#development
[BFF dev setup]: ./bff/README.md#development

# Model Registry UI

## Overview

The Model Registry UI is a standalone web app for Kubeflow Model Registry. In this repository, you will find the frontend and backend for the Model Registry UI.

## Prerequisites

* [Frontend requirements]
* [BFF requirements]

## Set Up

### Development

To run the a mocked dev environment you can either:

* Use the makefile command: `make dev-start`.

* Or follow the [frontend dev setup] and [BFF dev setup].

### Contenerization

To build the Model Registry UI container, run the following command:

```shell
make docker-compose
```

### Orquestration

For a in-depth guide on how to deploy the Model Registry UI, please refer to the [local kubernetes deployment](./bff/docs/dev-guide.md) documentation.

To quickly enable the Model Registry UI in your Kind cluster, you can use the following command:

```shell
make kind-deployment
```

## OpenAPI Specification

You can find the OpenAPI specification for the Model Registry UI in the [openapi](./api/openapi) directory.
A live version of the OpenAPI specification can be found [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/kubeflow/model-registry/main/clients/ui/api/openapi/mod-arch.yaml).
172 changes: 149 additions & 23 deletions clients/ui/api/openapi/mod-arch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersionUpdate"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersionUpdate"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -141,7 +147,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModelCreate"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModelCreate"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -186,7 +198,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModelUpdate"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModelUpdate"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -244,7 +262,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Artifact"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/Artifact"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -305,7 +329,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersion"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersion"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -972,99 +1002,195 @@ components:
content:
application/json:
schema:
$ref: "#/components/schemas/Config"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/Config"
description: A response containing a list of ModelArtifact entities.
ModelRegistryRespone:
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ModelRegistry"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
type: array
items:
$ref: "#/components/schemas/ModelRegistry"
description: A response containing a list of ModelArtifact entities.
ModelArtifactListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelArtifactList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelArtifactList"
description: A response containing a list of ModelArtifact entities.
ModelArtifactResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelArtifact"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelArtifact"
description: A response containing a `ModelArtifact` entity.
ModelVersionListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersionList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersionList"
description: A response containing a list of `ModelVersion` entities.
ModelVersionResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersion"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersion"
description: A response containing a `ModelVersion` entity.
RegisteredModelListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModelList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModelList"
description: A response containing a list of `RegisteredModel` entities.
RegisteredModelResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModel"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModel"
description: A response containing a `RegisteredModel` entity.
ArtifactResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/Artifact"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/Artifact"
description: A response containing an `Artifact` entity.
ArtifactListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ArtifactList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ArtifactList"
description: A response containing a list of `Artifact` entities.
ServingEnvironmentListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServingEnvironmentList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServingEnvironmentList"
description: A response containing a list of `ServingEnvironment` entities.
ServingEnvironmentResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServingEnvironment"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServingEnvironment"
description: A response containing a `ServingEnvironment` entity.
InferenceServiceListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/InferenceServiceList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/InferenceServiceList"
description: A response containing a list of `InferenceService` entities.
InferenceServiceResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/InferenceService"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/InferenceService"
description: A response containing a `InferenceService` entity.
ServeModelListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServeModelList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServeModelList"
description: A response containing a list of `ServeModel` entities.
ServeModelResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServeModel"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServeModel"
description: A response containing a `ServeModel` entity.
parameters:
modelRegistryName:
Expand Down
3 changes: 2 additions & 1 deletion clients/ui/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
ports:
- 8080:8080
environment:
API_URL: http://model-registry-bff:4001
API_URL: http://model-registry-bff:4000
networks:
- model_registry
depends_on:
Expand All @@ -15,6 +15,7 @@ services:
container_name: model-registry-bff
command:
- "--mock-k8s-client=true"
- "--mock-mr-client=true"
networks:
- model_registry

Expand Down
Loading

0 comments on commit 25cd4a6

Please sign in to comment.