forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from tonyxrmdavidson/openshiftCIModelRegistryD…
…eploy This commit will deploy model-registry to the openshift-ci deployment
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
openshift-ci/resources/model-registry-DSCInitialization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
38
openshift-ci/resources/model-registry-data-science-cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
ray: | ||
managementState: Removed | ||
trustyai: | ||
managementState: Managed | ||
workbenches: | ||
managementState: Managed |
11 changes: 11 additions & 0 deletions
11
openshift-ci/resources/model-registry-operator-deploy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |