Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This commit will deploy model-registry to the openshift-ci deployment #10

Merged
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
21 changes: 21 additions & 0 deletions openshift-ci/resources/model-registry-DSCInitialization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: dscinitialization.opendatahub.io/v1
kind: DSCInitialization
metadata:
name: model-registry-dsci
labels:
app.kubernetes.io/created-by: opendatahub-operator
app.kubernetes.io/instance: default
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: dscinitialization
app.kubernetes.io/part-of: opendatahub-operator
spec:
applicationsNamespace: opendatahub
monitoring:
namespace: opendatahub
managementState: Managed
serviceMesh:
controlPlane:
metricsCollection: Istio
name: data-science-smcp
namespace: istio-system
managementState: Managed
38 changes: 38 additions & 0 deletions openshift-ci/resources/model-registry-data-science-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
kind: DataScienceCluster
apiVersion: datasciencecluster.opendatahub.io/v1
metadata:
labels:
app.kubernetes.io/created-by: opendatahub-operator
app.kubernetes.io/instance: default
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: datasciencecluster
app.kubernetes.io/part-of: opendatahub-operator
name: default-dsc
spec:
components:
codeflare:
managementState: Removed
dashboard:
managementState: Managed
datasciencepipelines:
managementState: Managed
kserve:
managementState: Managed
serving:
ingressGateway:
certificate:
type: SelfSigned
managementState: Managed
name: knative-serving
kueue:
managementState: Removed
modelmeshserving:
managementState: Managed
modelregistry:
managementState: Managed
Comment on lines +31 to +32
Copy link
Member

Choose a reason for hiding this comment

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

/lgtm

ray:
managementState: Removed
trustyai:
managementState: Managed
workbenches:
managementState: Managed
11 changes: 11 additions & 0 deletions openshift-ci/resources/model-registry-operator-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: opendatahub-operator
namespace: openshift-operators
spec:
channel: fast
installPlanApproval: Automatic
name: opendatahub-operator
source: community-operators
sourceNamespace: openshift-marketplace
40 changes: 40 additions & 0 deletions openshift-ci/scripts/oci-model-registry-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# Define variables
MODEL_REGISTRY_DEPLOY_MANIFEST="model-registry-operator-deploy.yaml"
DSC_INITIALIZATION_MANIFEST="model-registry-DSCInitialization.yaml"
DATA_SCIENCE_CLUSTER_MANIFEST="model-registry-data-science-cluster.yaml"
TIMEOUT=${DEPLOY_TIMEOUT:-300s} # Default timeout is 300 seconds, can be overridden by setting DEPLOY_TIMEOUT environment variable

# Function to deploy and wait for deployment
deploy_and_wait() {
local manifest=$1
local resource_name=$(basename -s .yaml $manifest)

echo "Deploying $resource_name from $manifest..."
oc apply -f $manifest

echo "Waiting for $resource_name to be ready with timeout $TIMEOUT..."
if ! oc wait --for=condition=Available deployment/$resource_name --timeout=$TIMEOUT; then
echo "Error: $resource_name deployment failed or timed out."
exit 1
fi

echo "$resource_name deployed successfully!"
}

# Deploy resource and wait for readiness
deploy_resource() {
local manifest=$1
deploy_and_wait $manifest
}

# Main function for orchestrating deployments
main() {
deploy_resource $MODEL_REGISTRY_DEPLOY_MANIFEST
deploy_resource $DSC_INITIALIZATION_MANIFEST
deploy_resource $DATA_SCIENCE_CLUSTER_MANIFEST
}

# Execute main function
main
Loading