Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions OpenShift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ This guide describes how to deploy Kubeflow on OpenShift clusters. There are two
## Deploy Kubeflow with Knative and KFServing

For users who want to run KFserving service along with Kubeflow on OpenShift clusters, follow the [KfServing on OpenShift](manifests/README-kfserving.md) guide to deploy.

## Multi-tenant Kubeflow on OpenShift with IBM Cloud AppID

For users who want to run KFserving service along with Multi-tenant Kubeflow on OpenShift clusters, follow the [Multi-tenant Kubeflow on OpenShift with IBM Cloud AppID](manifests/README-appid.md) guide to deploy.
67 changes: 67 additions & 0 deletions OpenShift/manifests/README-appid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## Multi-tenant Kubeflow on OpenShift with IBM Cloud AppID

This guide is based on [KfServing on OpenShift](./README-kfserving.md) with multi-tenancy feature enabled by IBM Cloud AppID.

### Prerequisites

1. Follow the [Prepare OpenShift cluster environment](./README.md#prepare-openshift-cluster-environment) to set up the cluster environment.
2. FQDN of OpenShift Route of istio ingress gateway.
3. Provisioning an AppID instance from IBM Cloud. It can start with the Lite plan, but will need the Graduated tier once you need more than 1000 authentication events per month.
4. Create an application with type reguarwebapp under the provioned AppID instance. Make sure the caope contains email and retrieve the following configuration parameters from your AppID. They will be used to configure the OIDC auth service:
* clientId
* secret
* oAuthServerUrl

### Configuration

1. Create the namespace `istio-system` if not exist:
```SHELL
kubectl create namespace istio-system
```
2. Create a secret prior to kubeflow deployment by filling parameters accordingly:
```SHELL
kubectl create secret generic appid-application-configuration -n istio-system \
--from-literal=clientId=<clientId> \
--from-literal=secret=<secret> \
--from-literal=oAuthServerUrl=<oAuthServerUrl> \
--from-literal=oidcRedirectUrl=https://istio-ingressgateway-istio-system.<ingressSubdomain>/login/oidc
```
* `<oAuthServerUrl>` - fill in the value of `oAuthServerUrl`
* `<clientId>` - fill in the value of `clientId`
* `<secret>` - fill in the value of `secret`
* `<ingressSubdomain>` - fill in the value of _Ingress Subdomain_ out of cluster
details by running command `ibmcloud ks cluster get -c <your-cluster-name>` where replace `<your-cluster-name>` with your OpenShift cluster name.

### Deploy Kubeflow with KfServing

Choose [kfctl_openshift_tekton_kfserving_appid.v1.1.0.yaml](./kfctl_openshift_tekton_kfserving_appid.v1.1.0.yaml) to deploy the required components for multi-tenant Kubeflow with Tekton backend.

```shell
export KFDEF_DIR=<path_to_kfdef>
mkdir -p ${KFDEF_DIR}
cd ${KFDEF_DIR}
wget https://raw.githubusercontent.com/IBM/KubeflowDojo/master/OpenShift/manifests/kfctl_openshift_tekton_kfserving_appid.v1.1.0.yaml
```

If you choose to leverage the pre-installed OpenShift Pipelines as the Tekton backend, please comment out these lines from the above configuration file.

```yaml
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/tektoncd
name: kubeflow-apps
```

Run following command to deploy Kubeflow:

```shell
kfctl apply -V -f kfctl_openshift_tekton_kfserving_appid.v1.1.0.yaml
```

### Secure istio ingress gateway with HTTPS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this a step inside the Deploy Kubeflow with KfServing heading? It seems that this section is required for such Kubeflow installation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would help to have another heading, something like ### Log in to Kubeflow Dashboard with AppID to provide the Kubeflow Dashboard link and the simple instructions how different users can log in to it with the AppID.


Notice that it uses HTTPS for the value of `oidcRedirectUrl` during configuration, which
requires additional steps after deploying Kubeflow:
1. enable [TLS passthrough](https://docs.openshift.com/enterprise/3.0/architecture/core_concepts/routes.html#passthrough-termination) mode for the route.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This document link is pointing to OpenShift 3.0 link. Is there an equivalent link for at least 4.5+? Or is there a different approach in the later OpenShift releases to enable TLS passthrough?
Also, which route is the the route referring to? May need to specify?

2. expose kubeflow dashboard over HTTPS by following steps of [this section](https://www.kubeflow.org/docs/ibm/deploy/authentication/#exposing-the-kubeflow-dashboard-with-dns-and-tls-termination).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link talks about setting the tls in the kubeflow-gateway, though the above enables the passthrough. It is not clear what exactly is required to set up with these two doc links.

134 changes: 134 additions & 0 deletions OpenShift/manifests/kfctl_openshift_tekton_kfserving_appid.v1.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
apiVersion: kfdef.apps.kubeflow.org/v1
kind: KfDef
metadata:
namespace: kubeflow
spec:
applications:
# openshift specific
- kustomizeConfig:
repoRef:
name: manifests
path: openshift/openshift-scc/base
name: openshift-scc
# istio related components
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/istio-stack
name: istio-stack
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/cluster-local-gateway
name: cluster-local-gateway
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/istio
name: istio
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/oidc-authservice-for-appid
name: oidc-authservice
# application
- kustomizeConfig:
repoRef:
name: manifests
path: application/v3
name: application
# cert-manager
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/cert-manager-crds
name: cert-manager-crds
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/cert-manager-kube-system-resources
name: cert-manager-kube-system-resources
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/cert-manager
name: cert-manager
# bootstrap
# - kustomizeConfig:
# repoRef:
# name: manifests
# path: stacks/openshift/application/bootstrap
# name: bootstrap
# kubeflow apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/base
name: kubeflow-apps
# - kustomizeConfig:
# repoRef:
# name: manifests
# path: stacks/openshift/components/admission-webhook
# name: kubeflow-apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/profile-control-plane
name: kubeflow-apps
# install Tekton Pipelines, if you choose to use OpenShift Pipelines
# pre-installed on your OCP cluster, comment out this component
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/tektoncd
name: kubeflow-apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/kfp-tekton
name: kubeflow-apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/metadata
name: kubeflow-apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/notebooks
name: kubeflow-apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/pytorch-job
name: kubeflow-apps
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/components/tf-job
name: kubeflow-apps
# others:
- kustomizeConfig:
repoRef:
name: manifests
path: metacontroller/base
name: metacontroller
- kustomizeConfig:
repoRef:
name: manifests
path: stacks/openshift/application/spark-operator
name: spark-operator
- kustomizeConfig:
repoRef:
name: manifests
path: knative/installs/generic
name: knative
- kustomizeConfig:
repoRef:
name: manifests
path: kfserving/installs/generic
name: kfserving
repos:
- name: manifests
uri: https://github.com/IBM/manifests/archive/master.tar.gz
version: master