Skip to content

Commit

Permalink
Add preview updates (#282)
Browse files Browse the repository at this point in the history
* Add Dev Preview Doc

(cherry picked from commit ba351d3)

* Update Operator CSV

(cherry picked from commit c32c8d7)

* Bring enum into other APIs that interact with it

(cherry picked from commit 0e8e78a)

* Implement enum for DSC Profile

(cherry picked from commit 0cc11d4)

* Update Bundle

---------

Co-authored-by: James Harmison <[email protected]>
  • Loading branch information
VaishnaviHire and jharmison-redhat authored Jul 7, 2023
1 parent 77ae72e commit 7c4a95d
Show file tree
Hide file tree
Showing 11 changed files with 152 additions and 34 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ IMAGE_BUILDER ?= podman
OPERATOR_NAMESPACE ?= opendatahub-operator-system
MANIFEST_REPO ?= opendatahub-io
MANIFEST_RELEASE ?= master
CHANNELS="stable,rolling"
DEFAULT_CHANNEL="rolling"
CHANNELS="fast"
DEFAULT_CHANNEL="fast"

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ This operator is the primary operator for Open Data Hub. It is responsible for e
Jupyter Notebooks, Modelmesh serving, Datascience pipelines etc. The operator makes use of `DataScienceCluster` CRD to deploy
and configure these applications.

## Dev Preview

Developer Preview of the new Open Data Hub operator codebase is now avaible.
Refer [Dev-Preview.md](./docs/Dev-Preview.md) for testing preview features.

## Usage

### Installation
Expand Down Expand Up @@ -74,3 +79,4 @@ and installed from source manually, see the Developer guide for further instruct
```commandline
operator-sdk run bundle quay.io/<username>/opendatahub-operator-bundle:<VERSION> --namespace $OPERATOR_NAMESPACE
```

16 changes: 10 additions & 6 deletions apis/datasciencecluster/v1alpha1/datasciencecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,21 @@ import (
type DataScienceClusterSpec struct {
// A profile sets the default components and configuration to install for a given
// use case. The profile configuration can still be overriden by the user on a per
// component basis. If not defined, the 'full' profile is used. Valid values are:
// - core: all core components are installed
// - serving: only serving components are installed
// - training: only training components are installed
// - workbench: only workbench components are installed
Profile string `json:"profile,omitempty"`
// component basis. If not defined, the 'core' profile is used.
Profile ProfileValue `json:"profile,omitempty"`

// Components are used to override and fine tune specific component configurations.
Components Components `json:"components,omitempty"`
}

// Valid values for the Profile in the DataScienceCluster are as follows:
// - core: all core components are installed
// - serving: only serving components are installed
// - training: only training components are installed
// - workbench: only workbench components are installed
// +kubebuilder:validation:Enum=core;serving;training;workbench
type ProfileValue string

type Components struct {
// Dashboard component configuration
Dashboard dashboard.Dashboard `json:"dashboard,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=opendatahub-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable,rolling
LABEL operators.operatorframework.io.bundle.channel.default.v1=rolling
LABEL operators.operatorframework.io.bundle.channels.v1=fast
LABEL operators.operatorframework.io.bundle.channel.default.v1=fast
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.24.1
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,15 @@ spec:
type: object
type: object
profile:
description: 'A profile sets the default components and configuration
description: A profile sets the default components and configuration
to install for a given use case. The profile configuration can still
be overriden by the user on a per component basis. If not defined,
the ''core'' profile is used. Valid values are: - core: all core
components are installed - serving: only serving components are
installed - training: only training components are installed - workbench:
only workbench components are installed'
the 'core' profile is used.
enum:
- core
- serving
- training
- workbench
type: string
type: object
status:
Expand Down
28 changes: 26 additions & 2 deletions bundle/manifests/opendatahub-operator.clusterserviceversion.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ annotations:
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: opendatahub-operator
operators.operatorframework.io.bundle.channels.v1: stable,rolling
operators.operatorframework.io.bundle.channel.default.v1: rolling
operators.operatorframework.io.bundle.channels.v1: fast
operators.operatorframework.io.bundle.channel.default.v1: fast
operators.operatorframework.io.metrics.builder: operator-sdk-v1.24.1
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
Expand Down
14 changes: 7 additions & 7 deletions components/profiles/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import (
)

const (
ProfileCore = "core"
ProfileServing = "serving"
ProfileTraining = "training"
ProfileWorkbench = "workbench"
ProfileCore dsc.ProfileValue = "core"
ProfileServing dsc.ProfileValue = "serving"
ProfileTraining dsc.ProfileValue = "training"
ProfileWorkbench dsc.ProfileValue = "workbench"
)

type ProfileConfig struct {
ComponentDefaults map[string]bool
}

var ProfileConfigs = make(map[string]ProfileConfig)
var ProfileConfigs = make(map[dsc.ProfileValue]ProfileConfig)

func SetDefaultProfiles() map[string]ProfileConfig {
ProfileConfigs = map[string]ProfileConfig{
func SetDefaultProfiles() map[dsc.ProfileValue]ProfileConfig {
ProfileConfigs = map[dsc.ProfileValue]ProfileConfig{
ProfileServing: {
ComponentDefaults: map[string]bool{
modelmeshserving.ComponentName: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ spec:
type: object
type: object
profile:
description: 'A profile sets the default components and configuration
description: A profile sets the default components and configuration
to install for a given use case. The profile configuration can still
be overriden by the user on a per component basis. If not defined,
the ''full'' profile is used. Valid values are: - core: all core
components are installed - serving: only serving components are
installed - training: only training components are installed - workbench:
only workbench components are installed'
the 'core' profile is used.
enum:
- core
- serving
- training
- workbench
type: string
type: object
status:
Expand Down

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions docs/Dev-Preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Open Data Hub Operator : Dev Preview

ODH Operator is introducing new CRD called DataScienceCluster. The new feature set will be
released in phases and will be made available before release in the form of a `custom` Operator catalog

## Deploying Custom Catalog

1. ODH Operator team will provide new catalogsource image with tag corresponding to latest `pre-release` in ODH [releases](https://github.com/opendatahub-io/opendatahub-operator/releases).

Alternatively, you can directly get the preview version -
```console
export RELEASE_TAG=$( curl https://api.github.com/repos/opendatahub-io/opendatahub-operator/releases | jq -r 'map(select(.prerelease)) | first | .tag_name')
```
2. Deploy CatalogSource

```console
$ cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: opendatahub-dev-catalog
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/opendatahub/opendatahub-operator-catalog:$RELEASE_TAG
displayName: Open Data Hub Operator (Preview)
publisher: ODH
EOF

```
3. Subscribe to the ODH custom catalog
```console
$ cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: opendatahub-operator
namespace: openshift-operators
spec:
channel: rolling
name: opendatahub-operator
source: opendatahub-dev-catalog
sourceNamespace: openshift-marketplace
EOF
```

## Usage

1. When Operator is installed it creates a namespace called `opendatahub`.
2. Users need to create required `DataScienceCluster` resource by going to the `Installed Operators` tab in the OpenShift Cluster.
3. Install components by setting up `profile` field or setting individual components as `enabled`.

### Integrated Components

- Currently on integration of ODH [core](https://opendatahub.io/docs/tiered-components/) components is available with the Operator.
- Tier 1 and Tier 2 components can be deployed manually using [kustomize build](https://kubectl.docs.kubernetes.io/references/kustomize/cmd/build/)

0 comments on commit 7c4a95d

Please sign in to comment.