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

Servicemesh scenario onboarding #38738

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion ci-operator/config/maistra/maistra-test-tool/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

approvers:
- maistra-approvers
- cspi-qe-ocp-lp

reviewers:
- maistra-reviewers
- maistra-reviewers
- cspi-qe-ocp-lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
base_images:
cli:
name: "4.13"
namespace: ocp
tag: cli
kiali-cypress-tests-runner:
name: kiali-cypress-tests
namespace: ci
tag: v1.57
kiali-int-tests-runner:
name: kiali-int-tests
namespace: ci
tag: v1.57
os:
name: ubi
namespace: ocp
tag: "8"
build_root:
image_stream_tag:
name: release
namespace: openshift
tag: golang-1.19
images:
- context_dir: .
dockerfile_path: Dockerfile
to: maistra-runner
releases:
latest:
candidate:
product: ocp
stream: nightly
version: "4.13"
resources:
'*':
limits:
memory: 4Gi
requests:
cpu: 100m
memory: 200Mi
tests:
- as: servicemesh-interop-aws
Simranpal marked this conversation as resolved.
Show resolved Hide resolved
cron: 0 6 * * 1
remote_api: true
steps:
cluster_profile: aws-cspi-qe
env:
BASE_DOMAIN: cspilp.interop.ccitredhat.com
OPERATORS: |
[
{"name": "elasticsearch-operator", "source": "redhat-operators", "channel": "stable", "install_namespace": "openshift-operators"},
{"name": "jaeger-product", "source": "redhat-operators", "channel": "stable", "install_namespace": "openshift-operators"},
{"name": "kiali-ossm", "source": "redhat-operators", "channel": "stable", "install_namespace": "openshift-operators"},
{"name": "servicemeshoperator", "source": "redhat-operators", "channel": "stable", "install_namespace": "openshift-operators"}
]
SMCP_VERSION: "2.3"
TEST_GROUP: interop
test:
- ref: install-operators
- ref: servicemesh-maistra-test-tool-execute
- ref: servicemesh-smcp-install
- ref: servicemesh-kiali-int-tests-execute
- ref: servicemesh-kiali-cypress-tests-execute
workflow: ipi-aws
zz_generated_metadata:
branch: maistra-2.4
org: maistra
repo: maistra-test-tool
variant: servicemesh-ocp4.13-lp-interop
4 changes: 3 additions & 1 deletion ci-operator/jobs/maistra/maistra-test-tool/OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

approvers:
- maistra-approvers
- cspi-qe-ocp-lp

reviewers:
- maistra-reviewers
- maistra-reviewers
- cspi-qe-ocp-lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
periodics:
- agent: kubernetes
cluster: build03
cron: 0 6 * * 1
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: maistra-2.4
org: maistra
repo: maistra-test-tool
labels:
ci-operator.openshift.io/cloud: aws
ci-operator.openshift.io/cloud-cluster-profile: aws-cspi-qe
ci-operator.openshift.io/variant: servicemesh-ocp4.13-lp-interop
ci.openshift.io/generator: prowgen
job-release: "4.13"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-maistra-maistra-test-tool-maistra-2.4-servicemesh-ocp4.13-lp-interop-servicemesh-interop-aws
Simranpal marked this conversation as resolved.
Show resolved Hide resolved
prowjob_defaults:
tenant_id: gangway-api
reporter_config:
slack:
channel: '#ossm-qe'
job_states_to_report:
- success
- failure
- error
report_template: '{{if eq .Status.State "success"}} :slack-green: Job *{{.Spec.Job}}*
ended with *{{.Status.State}}*. <{{.Status.URL}}|View logs> {{else}} :failed:
Job *{{.Spec.Job}}* ended with *{{.Status.State}}*. <{{.Status.URL}}|View
logs> {{end}}'
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --secret-dir=/usr/local/servicemesh-interop-aws-cluster-profile
- --target=servicemesh-interop-aws
- --variant=servicemesh-ocp4.13-lp-interop
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /usr/local/servicemesh-interop-aws-cluster-profile
name: cluster-profile
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: cluster-profile
secret:
secretName: cluster-secrets-aws-cspi-qe
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,55 @@ presubmits:
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )lint-2-4,?($|\s.*)
- agent: kubernetes
always_run: true
branches:
- ^maistra-2\.4$
- ^maistra-2\.4-
cluster: build03
context: ci/prow/servicemesh-ocp4.13-lp-interop-images
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/variant: servicemesh-ocp4.13-lp-interop
ci.openshift.io/generator: prowgen
job-release: "4.13"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-maistra-maistra-test-tool-maistra-2.4-servicemesh-ocp4.13-lp-interop-images
rerun_command: /test servicemesh-ocp4.13-lp-interop-images
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --report-credentials-file=/etc/report/credentials
- --target=[images]
- --variant=servicemesh-ocp4.13-lp-interop
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )servicemesh-ocp4.13-lp-interop-images,?($|\s.*)
1 change: 1 addition & 0 deletions ci-operator/step-registry/servicemesh/kiali/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

CONSOLE_URL=$(cat $SHARED_DIR/console.url)
OCP_API_URL="https://api.${CONSOLE_URL#"https://console-openshift-console.apps."}:6443"
OCP_CRED_USR="kubeadmin"
OCP_CRED_PSW="$(cat ${SHARED_DIR}/kubeadmin-password)"

oc login ${OCP_API_URL} --username=${OCP_CRED_USR} --password=${OCP_CRED_PSW} --insecure-skip-tls-verify=true
hack/istio/install-testing-demos.sh -c oc -in ${SMCP_NAMESPACE}
sleep 120
Simranpal marked this conversation as resolved.
Show resolved Hide resolved

KIALI_ROUTE=$(oc get route kiali -n ${SMCP_NAMESPACE} -o=jsonpath='{.spec.host}')
export CYPRESS_BASE_URL="https://${KIALI_ROUTE}"
export CYPRESS_USERNAME=${OCP_CRED_USR}
export CYPRESS_PASSWD=${OCP_CRED_PSW}
export CYPRESS_AUTH_PROVIDER="kube:admin"

yarn cypress:run:junit || true # do not fail on a exit code != 0 as it matches number of failed tests
yarn cypress:combine:reports

echo "Copying result xml to ${ARTIFACT_DIR}"
# the file name must start with 'junit'
cp cypress/results/combined-report.xml ${ARTIFACT_DIR}/junit-kiali-cypress.xml

# cleaning demo apps
hack/istio/install-testing-demos.sh -d true -c oc -in ${SMCP_NAMESPACE}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "servicemesh/kiali/cypress-tests/execute/servicemesh-kiali-cypress-tests-execute-ref.yaml",
"owners": {
"approvers": [
"maistra-approvers"
],
"reviewers": [
"maistra-reviewers"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ref:
as: servicemesh-kiali-cypress-tests-execute
from: kiali-cypress-tests-runner
commands: servicemesh-kiali-cypress-tests-execute-commands.sh
resources:
requests:
cpu: '1'
memory: 1Gi
env:
- name: SMCP_NAMESPACE
default: "istio-system"
documentation: |-
Namespace where the SMCP is installed.
documentation: |-
Executes kiali cypress tests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

CONSOLE_URL=$(cat $SHARED_DIR/console.url)
OCP_API_URL="https://api.${CONSOLE_URL#"https://console-openshift-console.apps."}:6443"
OCP_CRED_USR="kubeadmin"
OCP_CRED_PSW="$(cat ${SHARED_DIR}/kubeadmin-password)"

oc login ${OCP_API_URL} --username=${OCP_CRED_USR} --password=${OCP_CRED_PSW} --insecure-skip-tls-verify=true
hack/istio/install-bookinfo-demo.sh -c oc -n bookinfo -tg -in ${SMCP_NAMESPACE}
sleep 120
Simranpal marked this conversation as resolved.
Show resolved Hide resolved

make test-integration -e URL="https://$(oc get route -n ${SMCP_NAMESPACE} kiali -o 'jsonpath={.spec.host}')" -e TOKEN="$(oc whoami -t)"

echo "Copying result xml to ${ARTIFACT_DIR}"
# the file name must start with 'junit'
cp tests/integration/junit-rest-report.xml ${ARTIFACT_DIR}/junit-kiali-int.xml

hack/istio/install-bookinfo-demo.sh -db true -c oc -n bookinfo -in ${SMCP_NAMESPACE}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"path": "servicemesh/kiali/int-tests/execute/servicemesh-kiali-int-tests-execute-ref.yaml",
"owners": {
"approvers": [
"maistra-approvers"
],
"reviewers": [
"maistra-reviewers"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ref:
as: servicemesh-kiali-int-tests-execute
from: kiali-int-tests-runner
commands: servicemesh-kiali-int-tests-execute-commands.sh
resources:
requests:
cpu: '1'
memory: 500Mi
env:
- name: SMCP_NAMESPACE
default: "istio-system"
documentation: |-
Namespace where the SMCP is installed.
documentation: |-
Executes kiali integration tests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

CONSOLE_URL=$(cat $SHARED_DIR/console.url)
OCP_API_URL="https://api.${CONSOLE_URL#"https://console-openshift-console.apps."}:6443"
OCP_CRED_USR="kubeadmin"
OCP_CRED_PSW="$(cat ${SHARED_DIR}/kubeadmin-password)"

export OCP_API_URL
export OCP_CRED_USR
export OCP_CRED_PSW

make test

echo "Copying logs and xmls to ${ARTIFACT_DIR}"
cp -r tests/result-latest/* ${ARTIFACT_DIR}
# the junit file name must start with 'junit'
cp tests/result-latest/**/report.xml ${ARTIFACT_DIR}/junit-maistra.xml

make test-cleanup