forked from red-hat-data-services/ods-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First round of automation for new serving stack (red-hat-data-service…
…s#867) * add checks for kserve deployment ootb Signed-off-by: bdattoma <[email protected]> * fix docs Signed-off-by: bdattoma <[email protected]> * set default ns Signed-off-by: bdattoma <[email protected]> * add operator install test 1 Signed-off-by: bdattoma <[email protected]> * rename test suite Signed-off-by: bdattoma <[email protected]> * add suite documentation Signed-off-by: bdattoma <[email protected]> * remove unused line from kserve checks Signed-off-by: bdattoma <[email protected]> * add kw to track ns under service mesh Signed-off-by: bdattoma <[email protected]> * star service mesh and serveless cr deployment Signed-off-by: bdattoma <[email protected]> * replace NS with sed Signed-off-by: bdattoma <[email protected]> * improve operators group creation Signed-off-by: bdattoma <[email protected]> * first working draft of deployment check Signed-off-by: bdattoma <[email protected]> * remove hardcoded ns from istio configs Signed-off-by: bdattoma <[email protected]> * add wait for pods using oc wait Signed-off-by: bdattoma <[email protected]> * add peer auth yaml Signed-off-by: bdattoma <[email protected]> * add knative gateways creation Signed-off-by: bdattoma <[email protected]> * set test project and caikit runtime + docs Signed-off-by: bdattoma <[email protected]> * add missing serveless CR yaml Signed-off-by: bdattoma <[email protected]> * add sleeps + kiali check + improve pod wait Signed-off-by: bdattoma <[email protected]> * fix test ns creation Signed-off-by: bdattoma <[email protected]> * label selector fixes for serverless Signed-off-by: bdattoma <[email protected]> * improve wait for pods Signed-off-by: bdattoma <[email protected]> --------- Signed-off-by: bdattoma <[email protected]>
- Loading branch information
Showing
14 changed files
with
510 additions
and
14 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
ods_ci/tests/Resources/Files/llm/caikit_servingruntime.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,30 @@ | ||
apiVersion: serving.kserve.io/v1alpha1 | ||
kind: ServingRuntime | ||
metadata: | ||
name: caikit-runtime | ||
spec: | ||
containers: | ||
- env: | ||
- name: RUNTIME_LOCAL_MODELS_DIR | ||
value: /mnt/models | ||
# Use this to enable CPU-only inferencing | ||
- name: DTYPE_STR | ||
value: float32 | ||
# TODO: This will eventually point to the official image | ||
# Note: This is currently the latest image, this can change frequently | ||
image: quay.io/opendatahub/caikit-tgis-serving:pr-25 | ||
name: kserve-container | ||
ports: | ||
# Note, KServe only allows a single port, this is the gRPC port. Subject to change in the future | ||
- containerPort: 8085 | ||
name: h2c | ||
protocol: TCP | ||
resources: | ||
requests: | ||
cpu: 4 | ||
memory: 8Gi | ||
multiModel: false | ||
supportedModelFormats: | ||
# Note: this currently *only* supports caikit format models | ||
- autoSelect: true | ||
name: caikit |
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,51 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
experimental.istio.io/disable-gateway-port-translation: "true" | ||
name: knative-local-gateway | ||
namespace: {{SERVICEMESH_CR_NS}} | ||
spec: | ||
ports: | ||
- name: http2 | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 8081 | ||
selector: | ||
istio: ingressgateway | ||
type: ClusterIP | ||
--- | ||
apiVersion: networking.istio.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: knative-ingress-gateway | ||
namespace: {{SERVERLESS_CR_NS}} | ||
spec: | ||
selector: | ||
istio: ingressgateway | ||
servers: | ||
- hosts: | ||
- '*' | ||
port: | ||
name: https | ||
number: 443 | ||
protocol: HTTPS | ||
tls: | ||
credentialName: wildcard-certs | ||
mode: SIMPLE | ||
--- | ||
apiVersion: networking.istio.io/v1beta1 | ||
kind: Gateway | ||
metadata: | ||
name: knative-local-gateway | ||
namespace: {{SERVERLESS_CR_NS}} | ||
spec: | ||
selector: | ||
istio: ingressgateway | ||
servers: | ||
- hosts: | ||
- '*' | ||
port: | ||
name: http | ||
number: 8081 | ||
protocol: HTTP |
20 changes: 20 additions & 0 deletions
20
ods_ci/tests/Resources/Files/llm/knativeserving_istio.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,20 @@ | ||
apiVersion: operator.knative.dev/v1beta1 | ||
kind: KnativeServing | ||
metadata: | ||
name: knative-serving | ||
namespace: {{SERVERLESS_CR_NS}} | ||
annotations: | ||
serverless.openshift.io/default-enable-http2: "true" | ||
spec: | ||
deployments: | ||
- annotations: | ||
sidecar.istio.io/inject: "true" | ||
sidecar.istio.io/rewriteAppHTTPProbers: "true" | ||
name: activator | ||
- annotations: | ||
sidecar.istio.io/inject: "true" | ||
sidecar.istio.io/rewriteAppHTTPProbers: "true" | ||
name: autoscaler | ||
ingress: | ||
istio: | ||
enabled: true |
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,8 @@ | ||
apiVersion: security.istio.io/v1beta1 | ||
kind: PeerAuthentication | ||
metadata: | ||
name: default | ||
namespace: {{NAMESPACE}} | ||
spec: | ||
mtls: | ||
mode: STRICT |
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,23 @@ | ||
apiVersion: maistra.io/v2 | ||
kind: ServiceMeshControlPlane | ||
metadata: | ||
name: minimal | ||
namespace: {{SERVICEMESH_CR_NS}} | ||
spec: | ||
addons: | ||
grafana: | ||
enabled: false | ||
kiali: | ||
name: kiali | ||
enabled: true | ||
prometheus: | ||
enabled: true | ||
jaeger: | ||
name: jaeger | ||
security: | ||
dataPlane: | ||
mtls: false # otherwise inference-graph will not work. We use PeerAuthentication resources to force mTLS | ||
identity: | ||
type: ThirdParty | ||
profiles: | ||
- default |
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,7 @@ | ||
apiVersion: maistra.io/v1 | ||
kind: ServiceMeshMemberRoll | ||
metadata: | ||
name: default | ||
namespace: {{SERVICEMESH_CR_NS}} | ||
spec: | ||
members: [] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
101 changes: 101 additions & 0 deletions
101
ods_ci/tests/Tests/100__deploy/100__installation/110__model_serving_watsonx.robot
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,101 @@ | ||
*** Settings *** | ||
Documentation Post install test cases that verify OCP KServe resources and objects | ||
Library OpenShiftLibrary | ||
Resource ../../../Resources/ODS.robot | ||
Resource ../../../Resources/Page/ODH/JupyterHub/HighAvailability.robot | ||
# Resource ../../../Resources/RHOSi.resource | ||
# Suite Setup RHOSi Setup | ||
# Suite Teardown RHOSi Teardown | ||
|
||
|
||
*** Variables *** | ||
${KSERVE_NS}= kserve # will be replaced by redhat-ods-applications | ||
|
||
*** Test Cases *** | ||
Verify KServe Is Shipped | ||
[Documentation] Verify KServe Is Shipped And Enabled Within ODS | ||
[Tags] WatsonX | ||
... ODS-2325 | ||
@{kserve_pods_info} = Fetch KServe Pods | ||
@{kserve_services_info} = Fetch KServe Controller Services | ||
@{kserve_wh_services_info} = Fetch KServe Webhook Services | ||
Verify KServe Deployment | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Be Equal As Strings status.phase Running @{kserve_pods_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Be Equal As Strings status.conditions[2].status True @{kserve_pods_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Be Equal As Strings spec.ports[0].port 8443 @{kserve_services_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Be Equal As Strings spec.ports[0].protocol TCP @{kserve_services_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Be Equal As Strings spec.ports[0].port 443 @{kserve_wh_services_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Be Equal As Strings spec.ports[0].protocol TCP @{kserve_wh_services_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Match Regexp spec.clusterIP ^((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\.(?!$)|$)){4}$ | ||
... @{kserve_services_info} | ||
Run Keyword And Continue On Failure | ||
... OpenShift Resource Field Value Should Match Regexp spec.clusterIP ^((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\.(?!$)|$)){4}$ | ||
... @{kserve_wh_services_info} | ||
Wait Until Keyword Succeeds 10 times 5s Verify KServe ReplicaSets Info | ||
ServingRuntime CustomResourceDefinition Should Exist | ||
InferenceService CustomResourceDefinition Should Exist | ||
|
||
|
||
*** Keywords *** | ||
Fetch KServe Pods | ||
[Documentation] Fetches information from KServe pods | ||
... Args: | ||
... None | ||
... Returns: | ||
... kserve_pods_info(list(dict)): KServe pods selected by label and namespace | ||
@{kserve_pods_info} = Oc Get kind=Pod api_version=v1 namespace=${KSERVE_NS} | ||
... label_selector=app.kubernetes.io/part-of=kserve | ||
RETURN @{kserve_pods_info} | ||
|
||
Fetch KServe Controller Services | ||
[Documentation] Fetches information from KServe services | ||
... Args: | ||
... None | ||
... Returns: | ||
... kserve_services_info(list(dict)): KServe services selected by name and namespace | ||
@{kserve_services_info} = Oc Get kind=Service api_version=v1 label_selector=control-plane=kserve-controller-manager | ||
... namespace=${KSERVE_NS} | ||
RETURN @{kserve_services_info} | ||
|
||
Fetch KServe Webhook Services | ||
[Documentation] Fetches information from KServe services | ||
... Args: | ||
... None | ||
... Returns: | ||
... kserve_services_info(list(dict)): KServe services selected by name and namespace | ||
@{kserve_wh_services_info} = Oc Get kind=Service api_version=v1 name=kserve-webhook-server-service | ||
... namespace=${KSERVE_NS} | ||
RETURN @{kserve_wh_services_info} | ||
|
||
Verify KServe ReplicaSets Info | ||
[Documentation] Fetches and verifies information from KServe replicasets | ||
@{kserve_replicasets_info} = Oc Get kind=ReplicaSet api_version=v1 namespace=${KSERVE_NS} | ||
... label_selector=app.kubernetes.io/part-of=kserve | ||
OpenShift Resource Field Value Should Be Equal As Strings status.readyReplicas | ||
... 1 @{kserve_replicasets_info} | ||
OpenShift Resource Field Value Should Be Equal As Strings status.replicas | ||
... 1 @{kserve_replicasets_info} | ||
|
||
Verify Kserve Deployment | ||
[Documentation] Verifies RHODS KServe deployment | ||
@{kserve} = Oc Get kind=Pod namespace=${KSERVE_NS} api_version=v1 | ||
... label_selector=app.kubernetes.io/part-of=kserve | ||
${containerNames} = Create List manager | ||
Verify Deployment ${kserve} 1 1 ${containerNames} | ||
|
||
ServingRuntime CustomResourceDefinition Should Exist | ||
[Documentation] Checks that the ServingRuntime CRD is present | ||
${sr_crd}= Oc Get kind=CustomResourceDefinition field_selector=metadata.name=servingruntimes.serving.kserve.io | ||
Should Not Be Empty ${sr_crd} | ||
|
||
InferenceService CustomResourceDefinition Should Exist | ||
[Documentation] Checks that the InferenceService CRD is present | ||
${is_crd}= Oc Get kind=CustomResourceDefinition field_selector=metadata.name=inferenceservices.serving.kserve.io | ||
Should Not Be Empty ${is_crd} |
Oops, something went wrong.