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

Openshift-ci model-registry deployment configuration and testing #26

Conversation

tonyxrmdavidson
Copy link

This pull request will:

merge the script and files needed to deploy and test model-registry as part of a rhods deployment using an odh nightly image.

@tonyxrmdavidson
Copy link
Author

Output from successful local run.

`Tony@WorkMac: ~/model-registry/openshift-ci/scripts (openshiftCIModelRegistryDeployNightly) $ ./oci-model-registry-deploy.sh
Deploying opendatahub-catalogue-source from ../resources/opendatahub-catalogue-source.yaml...
catalogsource.operators.coreos.com/model-registry-test-source configured
Deployment of opendatahub-catalogue-source succeeded.

../resources/opendatahub-operator-deploy.yaml deploying
Deploying opendatahub-operator-deploy from ../resources/opendatahub-operator-deploy.yaml...
subscription.operators.coreos.com/rhods-operator unchanged
Deployment of opendatahub-operator-deploy succeeded.

../resources/opendatahub-data-science-cluster.yaml deploying
Deploying opendatahub-data-science-cluster from ../resources/opendatahub-data-science-cluster.yaml...
Warning: oc apply should be used on resource created by either oc create --save-config or oc apply
datasciencecluster.datasciencecluster.opendatahub.io/default-dsc configured
Deployment of opendatahub-data-science-cluster succeeded.
Cloning into 'temp_repo'...
remote: Enumerating objects: 385, done.
remote: Counting objects: 100% (139/139), done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 385 (delta 90), reused 62 (delta 60), pack-reused 246
Receiving objects: 100% (385/385), 166.03 KiB | 1.93 MiB/s, done.
Resolving deltas: 100% (196/196), done.
✔ Success: Deployment model-registry-db is available
✔ Success: Deployment modelregistry-sample is available
! Info: Pod model-registry-db-56598d7869-hcz6v is not running or does not have 1 containers ready
! Info: Pod model-registry-db-56598d7869-hcz6v is not running or does not have 1 containers ready
! Info: Pod model-registry-db-56598d7869-hcz6v is not running or does not have 1 containers ready
! Info: Pod model-registry-db-56598d7869-hcz6v is not running or does not have 1 containers ready
✔ Success: Pod model-registry-db-56598d7869-hcz6v is running and 1 out of 1 containers are ready
! Info: Pod modelregistry-sample-75789476d8-thfl4 is not running or does not have 2 containers ready
! Info: Pod modelregistry-sample-75789476d8-thfl4 is not running or does not have 2 containers ready
! Info: Pod modelregistry-sample-75789476d8-thfl4 is not running or does not have 2 containers ready
! Info: Pod modelregistry-sample-75789476d8-thfl4 is not running or does not have 2 containers ready
✔ Success: Pod modelregistry-sample-75789476d8-thfl4 is running and 2 out of 2 containers are ready
✔ Success: Route 'modelregistry-sample-http' exists in namespace 'default'
✔ Success: Route server is reachable. Status code: 200 OK`

Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

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

Thank you for the PR Tony!

Overall looks good to me, but I have couple doubts marked below.

openshift-ci/resources/opendatahub-catalogue-source.yaml Outdated Show resolved Hide resolved
openshift-ci/resources/opendatahub-operator-deploy.yaml Outdated Show resolved Hide resolved
run_deployment_tests() {
check_deployment_availability default model-registry-db
check_deployment_availability default modelregistry-sample
check_pod_status default model-registry 1
Copy link
Member

Choose a reason for hiding this comment

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

isn't this pod called model-registry-db ? 🤔

Copy link
Author

@tonyxrmdavidson tonyxrmdavidson Mar 14, 2024

Choose a reason for hiding this comment

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

Are you referring to line 160? In line 87 the function takes the unique partial name of the pod(s) and returns a list of matching pods. I was just trying to build in a little bit of redundancy and not be too specific.

Copy link
Member

Choose a reason for hiding this comment

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

Are you referring to line 160?

yes.

In line 87 the function takes the unique partial name of the pod(s) and returns a list of matching pods. I was just trying to build in a little bit of redundancy and not be too specific.

okay thank for clarification. I believe there are k8s functions that instead of grepping for the name prefix, you can query pod for app=modelregistry-sample or component=model-registry or the likes, I believe it would make this test logic more robust than grep-ping, but up to you.

Thanks again for the clarification

Copy link
Author

Choose a reason for hiding this comment

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

I have changed this to use selectors instead of grep

openshift-ci/scripts/oci-model-registry-deploy.sh Outdated Show resolved Hide resolved
Copy link
Member

@tarilabs tarilabs left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

with caveat of: (see below)

thanks @tonyxrmdavidson

fi

# Test if the route is live
local response=$(curl -s -o /dev/null -w "%{http_code}" "$route_url/api/model_registry/v1alpha2/registered_models")
Copy link
Member

Choose a reason for hiding this comment

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

the v1alpha2 will likely iterate further, so eventually we might need to externalize the way the route is checked for liveliness.

Copy link

openshift-ci bot commented Mar 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tarilabs, tonyxrmdavidson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [tarilabs,tonyxrmdavidson]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit ffa5c3f into opendatahub-io:main Mar 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants