forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
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
openshift-merge-bot
merged 2 commits into
opendatahub-io:main
from
tonyxrmdavidson:openshiftCIModelRegistryDeploy
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm