Skip to content

Commit

Permalink
Use direct helm chart archive url to install kserve and knative-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kromanow94 committed Jul 14, 2024
1 parent 544adee commit fa6089f
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 215 deletions.
8 changes: 8 additions & 0 deletions example/helm/destroy.argocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ kubectl -n argocd delete app profile-kubeflow-user-example-com
# Kubeflow Instance #
kubectl -n argocd delete app kubeflow

# KServe #
kubectl -n argocd delete app kserve
kubectl -n argocd delete app kserve-crd

# Knative #
kubectl -n argocd delete app knative-operator
kubectl -n argocd delete app knative-namespaces

# Argo WF #
kubectl -n argocd delete app argo-workflows

Expand Down
19 changes: 14 additions & 5 deletions example/helm/destroy.helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,31 @@ helm -n oauth2-proxy uninstall oauth2-proxy --wait=true
kubectl delete profile kubeflow-user-example-com
kubectl wait --for=delete namespace/kubeflow-user-example-com --timeout=120s

# Kubeflow Instance #
# Kubeflow #
helm -n kubeflow uninstall kubeflow --wait

# Argo WF #
# KServe #
helm -n kubeflow uninstall kserve
helm -n kubeflow uninstall kserve-crd

# Knative #
helm -n knative uninstall knative-operator
kubectl delete ns knative-serving
kubectl delete ns knative-eventing

# Argo Workflows #
helm -n kubeflow uninstall argo-workflows --wait

# Metacontroller #
helm -n metacontroller uninstall metacontroller --wait

# istio-ingressgateway #
# Istio Ingress Gateway #
helm -n istio-ingress uninstall istio-ingressgateway --wait

# istiod #
# Istio Discovery #
helm -n istio-system uninstall istiod --wait

# istio-base #
# Istio Base #
helm -n istio-system uninstall istio-base --wait

# Dex #
Expand Down
34 changes: 17 additions & 17 deletions example/helm/quickstart.argocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ else
fi

set -x
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kubeflow-secrets.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.mysql.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.minio.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.cert-manager.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.dex.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.istio-base.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.istiod.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.metacontroller.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.knative-namespaces.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.knative-operator.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kserve-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kserve.yaml
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kubeflow-secrets.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.mysql.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.minio.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.cert-manager.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.dex.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.istio-base.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.istiod.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.metacontroller.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.knative-namespaces.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.knative-operator.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kserve-crd.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kserve.yaml"
set +x

# Wait until pods are created. This is not required since ArgoCD will be
Expand All @@ -48,9 +48,9 @@ sleep 30
kubectl wait pods --all -n kubeflow --for=condition=Ready --timeout 300s

set -x
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.argo-workflows.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.istio-ingressgateway.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kubeflow.yaml
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.argo-workflows.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.istio-ingressgateway.yaml"
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.kubeflow.yaml"
set +x

# Wait until pods are created. This is not required since ArgoCD will be
Expand All @@ -60,15 +60,15 @@ sleep 30
kubectl wait pods --all --namespace kubeflow --for=condition=Ready --timeout 300s

set -x
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.profile-kubeflow-user-example-com.yaml
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.profile-kubeflow-user-example-com.yaml"
set +x

# When deployed with in-cluster self-signed OIDC Issuer (kind, vcluster,
# minikube and so on), oauth2-proxy has to wait for CRB allowing accessing OIDC
# Discovery endpoint from anonymous user. This is condifured by kubeflow helm
# chart.
set -x
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.oauth2-proxy.yaml
kubectl apply -f "https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/app.oauth2-proxy.yaml"
set +x

# Wait until pods are created. This is not required since ArgoCD will be
Expand Down
91 changes: 30 additions & 61 deletions example/helm/quickstart.helm.eks.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
#!/bin/bash
set -e

KUBEFLOW_QUICKSTART_TMP_DIR="${KUBEFLOW_QUICKSTART_TMP_DIR:-/tmp/kubeflow.quickstart.cache}"
KNATIVE_OPERATOR_VERSION="${KNATIVE_OPERATOR_VERSION:-1.11.12}"
KNATIVE_OPERATOR_HELM_CHART_ARCHIVE_URL="${KNATIVE_OPERATOR_HELM_CHART_ARCHIVE_URL:-https://github.com/knative/operator/releases/download/knative-v${KNATIVE_OPERATOR_VERSION}/knative-operator-${KNATIVE_OPERATOR_VERSION}.tgz}"

KSERVE_VERSION="${KSERVE_VERSION:-v0.11.2}"

KSERVE_HELM_CHART_ARCHIVE_URL="${KSERVE_HELM_CHART_ARCHIVE_URL:-https://github.com/kserve/kserve/releases/download/${KSERVE_VERSION}/helm-chart-kserve-${KSERVE_VERSION}.tgz}"
KSERVE_HELM_CHART_TGZ_PATH="${KUBEFLOW_QUICKSTART_TMP_DIR}/kserve.${KSERVE_VERSION}.tgz"
KSERVE_HELM_CHART_PATH="${KUBEFLOW_QUICKSTART_TMP_DIR}/kserve.${KSERVE_VERSION}"

KSERVE_CRD_HELM_CHART_ARCHIVE_URL="${KSERVE_CRD_HELM_CHART_ARCHIVE_URL:-https://github.com/kserve/kserve/releases/download/${KSERVE_VERSION}/helm-chart-kserve-crd-${KSERVE_VERSION}.tgz}"
KSERVE_CRD_HELM_CHART_TGZ_PATH="${KUBEFLOW_QUICKSTART_TMP_DIR}/kserve-crd.${KSERVE_VERSION}.tgz"
KSERVE_CRD_HELM_CHART_PATH="${KUBEFLOW_QUICKSTART_TMP_DIR}/kserve-crd.${KSERVE_VERSION}"

mkdir -p "${KUBEFLOW_QUICKSTART_TMP_DIR}"

cat <<EOF
WARNING: This script is for reference only and will not work out of the box.
Expand Down Expand Up @@ -45,8 +38,9 @@ Press 'Ctrl'+'C' to cancel.
Waiting 10 seconds...
EOF
sleep 10

set -x

# Kubeflow Namespace #
kubectl apply -f - <<EOF
apiVersion: v1
kind: Namespace
Expand All @@ -56,9 +50,6 @@ metadata:
name: kubeflow
EOF

kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/namespace.knative-serving.yaml
kubectl apply -f https://raw.githubusercontent.com/kromanow94/kubeflow-manifests/${TARGET_REVISION}/example/helm/namespace.knative-eventing.yaml

# Create secret with database credentials for KFP and MySQL
export DB_CONFIG_SECRET_NAME=db-credentials
kubectl apply -f "secret.${DB_CONFIG_SECRET_NAME}.yaml"
Expand All @@ -67,20 +58,23 @@ kubectl apply -f "secret.${DB_CONFIG_SECRET_NAME}.yaml"
export OBJECTSTORE_CONFIG_SECRET_NAME=mlpipeline-minio-artifact
kubectl apply -f "secret.${OBJECTSTORE_CONFIG_SECRET_NAME}.yaml"

# MySQL #
helm upgrade --install mysql mysql \
--namespace kubeflow \
--repo https://charts.bitnami.com/bitnami \
--version 9.21.2 \
--values values.mysql.yaml \
--wait

# MinIO #
helm upgrade --install minio minio \
--namespace kubeflow \
--repo https://charts.bitnami.com/bitnami \
--version 13.7.0 \
--values values.minio.yaml \
--wait

# cert-manager #
helm upgrade --install cert-manager cert-manager \
--namespace cert-manager \
--create-namespace \
Expand All @@ -89,6 +83,7 @@ helm upgrade --install cert-manager cert-manager \
--values values.cert-manager.yaml \
--wait

# Dex #
helm upgrade --install dex dex \
--namespace dex \
--create-namespace \
Expand All @@ -97,20 +92,23 @@ helm upgrade --install dex dex \
--values values.dex.yaml \
--wait

# Istio Base #
helm upgrade --install istio-base base \
--namespace istio-system \
--create-namespace \
--repo https://istio-release.storage.googleapis.com/charts \
--version 1.20.2 \
--wait

# Istio Discovery #
helm upgrade --install istiod istiod \
--namespace istio-system \
--repo https://istio-release.storage.googleapis.com/charts \
--version 1.20.2 \
--values values.istiod.yaml \
--wait

# Istio Ingress Gateway #
helm upgrade --install istio-ingressgateway gateway \
--namespace istio-ingress \
--create-namespace \
Expand All @@ -119,13 +117,15 @@ helm upgrade --install istio-ingressgateway gateway \
--values values.istio-ingressgateway.yaml \
--wait

# Metacontroller #
helm upgrade --install metacontroller oci://ghcr.io/metacontroller/metacontroller-helm \
--namespace metacontroller \
--create-namespace \
--version v2.6.1 \
--values values.metacontroller.yaml \
--wait

# Argo Workflows #
helm upgrade --install argo-workflows argo-workflows \
--namespace kubeflow \
--repo https://argoproj.github.io/argo-helm \
Expand All @@ -134,71 +134,40 @@ helm upgrade --install argo-workflows argo-workflows \
--wait


# KNative Operator installation.
# Using the latest v1.13.0 operator version, results in a compatibility error
# with underlying Kubernetes installation: "minKubernetesVersion >= 1.26"
kubectl apply -f \
https://github.com/knative/operator/releases/download/knative-v1.11.0/operator.yaml

# Download kserve-crd Helm Chart from GitHub Release.
# kserve-crd is available at Helm Chart Repository only from version v0.12.0.
# https://github.com/kserve/kserve/pkgs/container/charts%2Fkserve-crd
if [ ! -e "${KSERVE_CRD_HELM_CHART_TGZ_PATH}" ]; then
wget \
--no-clobber \
"${KSERVE_CRD_HELM_CHART_ARCHIVE_URL}" \
-O "${KSERVE_CRD_HELM_CHART_TGZ_PATH}"
fi
if [ ! -e "${KSERVE_CRD_HELM_CHART_PATH}" ]; then
mkdir -p "${KSERVE_CRD_HELM_CHART_PATH}"
tar \
-xf "${KSERVE_CRD_HELM_CHART_TGZ_PATH}" \
-C "${KSERVE_CRD_HELM_CHART_PATH}" \
--strip-components=1
fi

# Download kserve Helm Chart from GitHub Release.
# kserve is available at Helm Chart Repository only from version v0.12.0.
# https://github.com/kserve/kserve/pkgs/container/charts%2Fkserve
if [ ! -e "${KSERVE_HELM_CHART_TGZ_PATH}" ]; then
wget \
--no-clobber \
"${KSERVE_HELM_CHART_ARCHIVE_URL}" \
-O "${KSERVE_HELM_CHART_TGZ_PATH}"
fi
if [ ! -e "${KSERVE_HELM_CHART_PATH}" ]; then
mkdir -p "${KSERVE_HELM_CHART_PATH}"
tar \
-xf "${KSERVE_HELM_CHART_TGZ_PATH}" \
-C "${KSERVE_HELM_CHART_PATH}" \
--strip-components=1
fi

helm upgrade --install kserve-crd "${KSERVE_CRD_HELM_CHART_PATH}" \
--namespace kserve \
# KNative Operator #
kubectl apply -f namespace.knative-serving.yaml
kubectl apply -f namespace.knative-eventing.yaml
helm upgrade --install knative-operator "${KNATIVE_OPERATOR_HELM_CHART_ARCHIVE_URL}" \
--namespace knative \
--create-namespace \
--wait

helm upgrade --install kserve "${KSERVE_HELM_CHART_PATH}" \
--namespace kserve \
# KServe CRDs #
helm upgrade --install kserve-crd "${KSERVE_CRD_HELM_CHART_ARCHIVE_URL}" \
--namespace kubeflow \
--create-namespace \
--values values.kserve.yaml \
--wait

# TODO: # NOTE(romanok1): is this still valid?
# - add remaining knative/kserve integrations (AuthorizationPolicies, any user-profile annotations etc)
# KServe #
helm upgrade --install kserve "${KSERVE_HELM_CHART_ARCHIVE_URL}" \
--namespace kubeflow \
--create-namespace \
--values values.kserve.yaml \
--wait

# Kubeflow fatchart
# Kubeflow #
helm upgrade --install kubeflow ../../charts/kubeflow \
--namespace kubeflow \
--values values.kubeflow.eks.yaml \
--wait

# Kubeflow Profile #
# Create kubeflow-user-example-com profile for tests.
# Default password for user user@example.com:
# 12341234
kubectl apply -f profile.kubeflow-user-example-com.yaml

# oauth2-proxy #
# When k8s is deployed with in-cluster self-signed OIDC Issuer (kind, vcluster,
# minikube and so on), oauth2-proxy has to wait for CRB allowing access to OIDC
# Discovery endpoint from anonymous user. This CRB is deployed by kubeflow helm
Expand Down
Loading

0 comments on commit fa6089f

Please sign in to comment.