Skip to content

Commit

Permalink
refactor to allow a more modular installation with different componen…
Browse files Browse the repository at this point in the history
…t combination options
  • Loading branch information
JoaquinRivesGambin committed Apr 15, 2024
1 parent ce5c4bc commit 483579d
Show file tree
Hide file tree
Showing 42 changed files with 590 additions and 161 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ tutorials/openstack/secure.yaml
# Others
old/
istio*
temp/
temp/
.platform/
4 changes: 1 addition & 3 deletions config.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
HOST_IP="127.0.0.1"
CLUSTER_NAME="kind-ep"
INSTALL_LOCAL_REGISTRY="true"
INSTALL_RAY="false"
CLUSTER_NAME="mlops-platform"
14 changes: 13 additions & 1 deletion deployment/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
## Deploy the stack

Choose the deployment option that best fits your needs:
1. `kubeflow-monitoring`: Full Kubeflow deployment with all components.
2. `kubeflow`: Full Kubeflow deployment without monitoring components (prometheus, grafana).
3. `standalone-kfp-monitoring`: Standalone KFP deployment.
4. `standalone-kfp`: Standalone KFP deployment without monitoring components (prometheus, grafana).
5. `standalone-kfp-kserve-monitoring`: Standalone KFP and Kserve deployment.
6. `standalone-kfp-kserve`: Standalone KFP and Kserve deployment without monitoring components (prometheus, grafana).

```bash
export DEPLOYMENT_OPTION=kubeflow-monitoring
```

Deploy to your kubernetes cluster with the following command:

```bash
while ! kustomize build deployment | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
while ! kustomize build "deployment/envs/$DEPLOYMENT_OPTION" | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: Secret
metadata:
name: mysecret
namespace: kubeflow-user-example-com
annotations:
serving.kserve.io/s3-endpoint: mlflow-minio-service.mlflow.svc.cluster.local:9000
serving.kserve.io/s3-usehttps: "0"
Expand All @@ -15,6 +14,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: kserve-sa
namespace: kubeflow-user-example-com
secrets:
- name: mysecret
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- aws-secret.yaml
- kserve-sa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kubeflow-user-example-com

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: kserve-inference
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kserve-inference

resources:
- ../../base
- kserve-inference-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: v1
kind: Secret
metadata:
name: aws-secret
namespace: kubeflow-user-example-com
type: Opaque
data:
# your BASE64 encoded AWS_ACCESS_KEY_ID
Expand Down
5 changes: 5 additions & 0 deletions deployment/custom/kubeflow-custom/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- aws-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kubeflow-user-example-com

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Required for deploy model to have the necessery permissions to create inference services

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kserve-deployer
rules:
- verbs:
- '*'
apiGroups:
- ''
resources:
- secrets
- serviceaccounts
- verbs:
- get
- watch
- list
apiGroups:
- ''
resources:
- configmaps
- verbs:
- '*'
apiGroups:
- ''
resources:
- persistentvolumes
- persistentvolumeclaims
- verbs:
- create
- delete
- get
apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots
- verbs:
- get
- list
- watch
- update
- patch
apiGroups:
- argoproj.io
resources:
- workflows
- verbs:
- '*'
apiGroups:
- ''
resources:
- pods
- pods/exec
- pods/log
- services
- verbs:
- '*'
apiGroups:
- ''
- apps
- extensions
resources:
- deployments
- replicasets
- verbs:
- '*'
apiGroups:
- kubeflow.org
resources:
- '*'
- verbs:
- '*'
apiGroups:
- batch
resources:
- jobs
- verbs:
- '*'
apiGroups:
- machinelearning.seldon.io
resources:
- seldondeployments
- verbs:
- '*'
apiGroups:
- serving.kserve.io
resources:
- '*'
- verbs:
- '*'
apiGroups:
- networking.istio.io
resources:
- '*'
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pipeline-runner-binding-cluster
labels:
application-crd-id: kubeflow-pipelines
subjects:
- kind: ServiceAccount
name: pipeline-runner
namespace: kubeflow
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kserve-deployer
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kubeflow

resources:
- ../../base
- kserve-deployer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: kubeflow

resources:
- ../../base
9 changes: 9 additions & 0 deletions deployment/envs/kubeflow-monitoring/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../kubeflow/manifests/in-cluster-setup/kubeflow
- ../../custom/kubeflow-custom/env/kubeflow
- ../../custom/kserve-custom/env/kubeflow
- ../../mlflow/env/local
- ../../monitoring
8 changes: 8 additions & 0 deletions deployment/envs/kubeflow/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../kubeflow/manifests/in-cluster-setup/kubeflow
- ../../custom/kubeflow-custom/env/kubeflow
- ../../custom/kserve-custom/env/kubeflow
- ../../mlflow/env/local
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../kubeflow/manifests/in-cluster-setup/standalone-kfp-kserve
- ../../custom/kubeflow-custom/env/standalone-kfp
- ../../custom/kserve-custom/env/standalone-kfp
- ../../mlflow/env/local
- ../../monitoring
8 changes: 8 additions & 0 deletions deployment/envs/standalone-kfp-kserve/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../kubeflow/manifests/in-cluster-setup/standalone-kfp-kserve
- ../../custom/kubeflow-custom/env/standalone-kfp
- ../../custom/kserve-custom/env/standalone-kfp
- ../../mlflow/env/local
8 changes: 8 additions & 0 deletions deployment/envs/standalone-kfp-monitoring/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../kubeflow/manifests/in-cluster-setup/standalone-kfp
- ../../custom/kubeflow-custom/env/standalone-kfp
- ../../mlflow/env/local
- ../../monitoring
7 changes: 7 additions & 0 deletions deployment/envs/standalone-kfp/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../kubeflow/manifests/in-cluster-setup/standalone-kfp
- ../../custom/kubeflow-custom/env/standalone-kfp
- ../../mlflow/env/local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

sortOptions:
order: legacy
legacySortOptions:
orderFirst:
- Namespace
- ResourceQuota
- StorageClass
- CustomResourceDefinition
- MutatingWebhookConfiguration
- ServiceAccount
- PodSecurityPolicy
- Role
- ClusterRole
- RoleBinding
- ClusterRoleBinding
- ConfigMap
- Secret
- Endpoints
- Service
- LimitRange
- PriorityClass
- PersistentVolume
- PersistentVolumeClaim
- Deployment
- StatefulSet
- CronJob
- PodDisruptionBudget
orderLast:
- ValidatingWebhookConfiguration

resources:
# Cert-Manager
- ../../common/cert-manager/cert-manager/base
- ../../common/cert-manager/kubeflow-issuer/base
# Istio
- ../../common/istio-1-17/istio-crds/base
- ../../common/istio-1-17/istio-namespace/base
- ../../common/istio-1-17/istio-install/base
# OIDC Authservice
- ../../common/oidc-client/oidc-authservice/base
# Dex
- ../../common/dex/overlays/istio
# KNative
- ../../common/knative/knative-serving/overlays/gateways
- ../../common/knative/knative-eventing/base
- ../../common/istio-1-17/cluster-local-gateway/base
# Kubeflow namespace
- ../../common/kubeflow-namespace/base
# Kubeflow Roles
- ../../common/kubeflow-roles/base
# Kubeflow Istio Resources
- ../../common/istio-1-17/kubeflow-istio-resources/base


# Kubeflow Pipelines
- ../../apps/pipeline/upstream/env/cert-manager/platform-agnostic-multi-user
# Katib
- ../../apps/katib/upstream/installs/katib-with-kubeflow
# Central Dashboard
- ../../apps/centraldashboard/upstream/overlays/kserve
# Admission Webhook
- ../../apps/admission-webhook/upstream/overlays/cert-manager
# Jupyter Web App
- ../../apps/jupyter/jupyter-web-app/upstream/overlays/istio
# Notebook Controller
- ../../apps/jupyter/notebook-controller/upstream/overlays/kubeflow
# Profiles + KFAM
- ../../apps/profiles/upstream/overlays/kubeflow
# PVC Viewer
- ../../apps/pvcviewer-controller/upstream/base/
# Volumes Web App
- ../../apps/volumes-web-app/upstream/overlays/istio
# Tensorboards Controller
- ../../apps/tensorboard/tensorboard-controller/upstream/overlays/kubeflow
# Tensorboard Web App
- ../../apps/tensorboard/tensorboards-web-app/upstream/overlays/istio
# Training Operator
- ../../apps/training-operator/upstream/overlays/kubeflow
# User namespace
- ../../common/user-namespace/base

# KServe
- ../../contrib/kserve/kserve
- ../../contrib/kserve/models-web-app/overlays/kubeflow
Loading

0 comments on commit 483579d

Please sign in to comment.