Skip to content

Commit 133ea4c

Browse files
committed
Migrate integration cluster provisioning to OpenShift CI (#2784)
EaaS is deprecated and being replaced by OpenShift-CI. Increase AWS instance size to avoid InsufficientMemory errors when deploying test resources. Assisted-by: Codex GPT-5.6 Signed-off-by: amisstea <amisstea@redhat.com> (cherry picked from commit 267a24f) Signed-off-by: amisstea <amisstea@redhat.com>
1 parent ec85f5f commit 133ea4c

2 files changed

Lines changed: 79 additions & 147 deletions

File tree

‎.tekton/integration-tests/pipeline/lightspeed-stack-integration-test.yaml‎

Lines changed: 40 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ metadata:
66
spec:
77
description: |
88
This pipeline automates the process of running end-to-end tests for Lightspeed Stack
9-
using a ROSA (Red Hat OpenShift Service on AWS cluster. The pipeline provisions
10-
the ROSA cluster, installs the Lightspeed Stack, runs the tests, collects artifacts,
11-
and finally deprovisions the ROSA cluster.
9+
using an OpenShift CI HyperShift cluster. The pipeline provisions the cluster,
10+
installs the Lightspeed Stack, runs the tests, and collects artifacts.
1211
params:
1312
- name: SNAPSHOT
1413
description: 'The JSON string representing the snapshot of the application under test (includes lightspeed-stack image).'
@@ -24,62 +23,45 @@ spec:
2423
- name: namespace
2524
description: 'Namespace to run tests in'
2625
default: 'lightspeed-stack'
26+
- name: ocp-version
27+
description: 'OpenShift minor version for the ephemeral HyperShift cluster.'
28+
default: '4.19'
29+
type: string
30+
- name: compute-node-type
31+
description: 'AWS instance type for the ephemeral HyperShift compute nodes.'
32+
default: 'm5.xlarge'
33+
type: string
34+
- name: hosted-management-cluster
35+
description: 'Hosted management cluster used to provision the ephemeral cluster.'
36+
default: 'hosted-mgmt2'
37+
type: string
2738
tasks:
28-
- name: eaas-provision-space
39+
- name: provision-cluster
2940
taskRef:
3041
resolver: git
3142
params:
3243
- name: url
33-
value: https://github.com/konflux-ci/build-definitions.git
44+
value: https://github.com/openshift/konflux-tasks
3445
- name: revision
3546
value: main
3647
- name: pathInRepo
37-
value: task/eaas-provision-space/0.1/eaas-provision-space.yaml
48+
value: tasks/provision-ephemeral-cluster/0.1/provision-ephemeral-cluster.yaml
3849
params:
39-
- name: ownerKind
40-
value: PipelineRun
4150
- name: ownerName
4251
value: $(context.pipelineRun.name)
4352
- name: ownerUid
4453
value: $(context.pipelineRun.uid)
45-
- name: provision-cluster
46-
runAfter:
47-
- eaas-provision-space
48-
taskSpec:
49-
results:
50-
- name: clusterName
51-
value: "$(steps.create-cluster.results.clusterName)"
52-
steps:
53-
- name: pick-version
54-
ref:
55-
resolver: git
56-
params:
57-
- name: url
58-
value: https://github.com/konflux-ci/build-definitions.git
59-
- name: revision
60-
value: main
61-
- name: pathInRepo
62-
value: stepactions/eaas-get-latest-openshift-version-by-prefix/0.1/eaas-get-latest-openshift-version-by-prefix.yaml
63-
params:
64-
- name: prefix
65-
value: "4.19."
66-
- name: create-cluster
67-
ref:
68-
resolver: git
69-
params:
70-
- name: url
71-
value: https://github.com/konflux-ci/build-definitions.git
72-
- name: revision
73-
value: main
74-
- name: pathInRepo
75-
value: stepactions/eaas-create-ephemeral-cluster-hypershift-aws/0.1/eaas-create-ephemeral-cluster-hypershift-aws.yaml
76-
params:
77-
- name: eaasSpaceSecretRef
78-
value: $(tasks.eaas-provision-space.results.secretRef)
79-
- name: version
80-
value: "$(steps.pick-version.results.version)"
81-
- name: instanceType
82-
value: "m5.large"
54+
- name: workflow
55+
value: hypershift-hostedcluster-workflow
56+
- name: clusterProfile
57+
value: aws-konflux-prod
58+
- name: timeout
59+
value: 1h
60+
- name: releases
61+
value: >-
62+
{"latest":{"release":{"channel":"stable","version":"$(params.ocp-version)","architecture":"multi"}}}
63+
- name: env
64+
value: '{"COMPUTE_NODE_TYPE":"$(params.compute-node-type)","HOSTED_MANAGEMENT_CLUSTER":"$(params.hosted-management-cluster)"}'
8365
- name: get-stack-images
8466
description: Extract lightspeed-stack image and commit from SNAPSHOT (OGX runs from source in-pod)
8567
runAfter:
@@ -180,10 +162,10 @@ spec:
180162
value: $(tasks.get-stack-images.results.commit)
181163
- name: namespace
182164
value: "$(params.namespace)"
183-
- name: spaceRequestSecretName
184-
value: $(tasks.eaas-provision-space.results.secretRef)
185-
- name: clusterName
186-
value: $(tasks.provision-cluster.results.clusterName)
165+
- name: clusterCredentialsSecretRef
166+
value: $(tasks.provision-cluster.results.secretRef)
167+
- name: ocp-version
168+
value: $(params.ocp-version)
187169
runAfter:
188170
- echo-integration-params
189171
taskSpec:
@@ -194,9 +176,9 @@ spec:
194176
- name: commit
195177
- name: namespace
196178
type: string
197-
- name: spaceRequestSecretName
179+
- name: clusterCredentialsSecretRef
198180
type: string
199-
- name: clusterName
181+
- name: ocp-version
200182
type: string
201183
results:
202184
- name: TEST_OUTPUT
@@ -217,25 +199,9 @@ spec:
217199
secret:
218200
secretName: redhat-registry-io-pull-secret
219201
- name: credentials
220-
emptyDir: {}
202+
secret:
203+
secretName: $(params.clusterCredentialsSecretRef)
221204
steps:
222-
- name: get-kubeconfig
223-
ref:
224-
resolver: git
225-
params:
226-
- name: url
227-
value: https://github.com/konflux-ci/build-definitions.git
228-
- name: revision
229-
value: main
230-
- name: pathInRepo
231-
value: stepactions/eaas-get-ephemeral-cluster-credentials/0.1/eaas-get-ephemeral-cluster-credentials.yaml
232-
params:
233-
- name: eaasSpaceSecretRef
234-
value: $(params.spaceRequestSecretName)
235-
- name: clusterName
236-
value: "$(params.clusterName)"
237-
- name: credentials
238-
value: credentials
239205
- name: run-e2e-tests
240206
#onError: continue
241207
# Do not use onError: continue here unless a later step like
@@ -262,7 +228,7 @@ spec:
262228
mountPath: /credentials
263229
env:
264230
- name: KUBECONFIG
265-
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
231+
value: "/credentials/kubeconfig"
266232
- name: ARTIFACT_DIR
267233
value: "/workspace/artifacts"
268234
- name: SUITE_ID
@@ -288,7 +254,7 @@ spec:
288254
echo "[e2e] 2/8 Installing deps (git, tar, jq, curl-minimal, python3, gettext for envsubst)..."
289255
microdnf -y install git tar jq curl-minimal python3 gettext
290256
echo "[e2e] 3/8 Downloading oc client..."
291-
curl -sL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.19/openshift-client-linux-amd64-rhel9.tar.gz
257+
curl -sL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-$(params.ocp-version)/openshift-client-linux-amd64-rhel9.tar.gz
292258
tar -xzf oc.tar.gz && chmod +x kubectl oc && mv oc kubectl /usr/local/bin/
293259
echo "[e2e] 4/8 SNAPSHOT (length ${#SNAPSHOT} chars; clone URL fixed — SNAPSHOT is main/upstream, not fork)..."
294260
# Fixed fork + branch: Konflux SNAPSHOT points at main repo/rev, not the PR/fork under test.
@@ -319,7 +285,7 @@ spec:
319285
# - name: credentials
320286
# value: "credentials"
321287
# - name: kubeconfig
322-
# value: "$(steps.get-kubeconfig.results.kubeconfig)"
288+
# value: "kubeconfig"
323289
# - name: artifact-dir
324290
# value: "/workspace/konflux-artifacts"
325291
# # validate that the cluster resources are available in another tekton step
@@ -359,4 +325,4 @@ spec:
359325
# - name: revision
360326
# value: main
361327
# - name: pathInRepo
362-
# value: stepactions/fail-if-any-step-failed/0.1/fail-if-any-step-failed.yaml
328+
# value: stepactions/fail-if-any-step-failed/0.1/fail-if-any-step-failed.yaml

‎.tekton/integration-tests/pipeline/lightspeed-stack-rhelai-test.yaml‎

Lines changed: 39 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
spec:
77
description: |
88
This pipeline provisions a RHEL AI instance on AWS (vLLM), an ephemeral
9-
OpenShift cluster, deploys lightspeed-stack configured to use the RHEL AI
10-
vLLM as inference provider, and runs the full e2e test suite.
9+
OpenShift CI HyperShift cluster, deploys lightspeed-stack configured to use
10+
the RHEL AI vLLM as inference provider, and runs the full e2e test suite.
1111
params:
1212
- name: SNAPSHOT
1313
description: 'The JSON string representing the snapshot of the application under test.'
@@ -39,6 +39,18 @@ spec:
3939
description: 'Enable debug output.'
4040
default: 'false'
4141
type: string
42+
- name: ocp-version
43+
description: 'OpenShift minor version for the ephemeral HyperShift cluster.'
44+
default: '4.19'
45+
type: string
46+
- name: compute-node-type
47+
description: 'AWS instance type for the ephemeral HyperShift compute nodes.'
48+
default: 'm5.xlarge'
49+
type: string
50+
- name: hosted-management-cluster
51+
description: 'Hosted management cluster used to provision the ephemeral cluster.'
52+
default: 'hosted-mgmt2'
53+
type: string
4254
tasks:
4355
# ── RHEL AI provisioning (MAPT) ──
4456
- name: provision-rhelai
@@ -199,63 +211,33 @@ spec:
199211
- name: spot
200212
value: "$(params.spot)"
201213

202-
# ── OpenShift cluster provisioning (same as existing e2e pipeline) ──
203-
- name: eaas-provision-space
214+
# ── OpenShift CI HyperShift cluster provisioning ──
215+
- name: provision-cluster
204216
taskRef:
205217
resolver: git
206218
params:
207219
- name: url
208-
value: https://github.com/konflux-ci/build-definitions.git
220+
value: https://github.com/openshift/konflux-tasks
209221
- name: revision
210222
value: main
211223
- name: pathInRepo
212-
value: task/eaas-provision-space/0.1/eaas-provision-space.yaml
224+
value: tasks/provision-ephemeral-cluster/0.1/provision-ephemeral-cluster.yaml
213225
params:
214-
- name: ownerKind
215-
value: PipelineRun
216226
- name: ownerName
217227
value: $(context.pipelineRun.name)
218228
- name: ownerUid
219229
value: $(context.pipelineRun.uid)
220-
221-
- name: provision-cluster
222-
runAfter:
223-
- eaas-provision-space
224-
taskSpec:
225-
results:
226-
- name: clusterName
227-
value: "$(steps.create-cluster.results.clusterName)"
228-
steps:
229-
- name: pick-version
230-
ref:
231-
resolver: git
232-
params:
233-
- name: url
234-
value: https://github.com/konflux-ci/build-definitions.git
235-
- name: revision
236-
value: main
237-
- name: pathInRepo
238-
value: stepactions/eaas-get-latest-openshift-version-by-prefix/0.1/eaas-get-latest-openshift-version-by-prefix.yaml
239-
params:
240-
- name: prefix
241-
value: "4.19."
242-
- name: create-cluster
243-
ref:
244-
resolver: git
245-
params:
246-
- name: url
247-
value: https://github.com/konflux-ci/build-definitions.git
248-
- name: revision
249-
value: main
250-
- name: pathInRepo
251-
value: stepactions/eaas-create-ephemeral-cluster-hypershift-aws/0.1/eaas-create-ephemeral-cluster-hypershift-aws.yaml
252-
params:
253-
- name: eaasSpaceSecretRef
254-
value: $(tasks.eaas-provision-space.results.secretRef)
255-
- name: version
256-
value: "$(steps.pick-version.results.version)"
257-
- name: instanceType
258-
value: "m5.large"
230+
- name: workflow
231+
value: hypershift-hostedcluster-workflow
232+
- name: clusterProfile
233+
value: aws-konflux-prod
234+
- name: timeout
235+
value: 1h
236+
- name: releases
237+
value: >-
238+
{"latest":{"release":{"channel":"stable","version":"$(params.ocp-version)","architecture":"multi"}}}
239+
- name: env
240+
value: '{"COMPUTE_NODE_TYPE":"$(params.compute-node-type)","HOSTED_MANAGEMENT_CLUSTER":"$(params.hosted-management-cluster)"}'
259241

260242
- name: get-stack-images
261243
description: Extract lightspeed-stack image and commit from SNAPSHOT
@@ -304,10 +286,10 @@ spec:
304286
value: $(tasks.get-stack-images.results.commit)
305287
- name: namespace
306288
value: "$(params.namespace)"
307-
- name: spaceRequestSecretName
308-
value: $(tasks.eaas-provision-space.results.secretRef)
309-
- name: clusterName
310-
value: $(tasks.provision-cluster.results.clusterName)
289+
- name: clusterCredentialsSecretRef
290+
value: $(tasks.provision-cluster.results.secretRef)
291+
- name: ocp-version
292+
value: $(params.ocp-version)
311293
- name: vllm-host
312294
value: "$(tasks.provision-rhelai.results.host)"
313295
- name: vllm-api-key
@@ -321,9 +303,9 @@ spec:
321303
- name: commit
322304
- name: namespace
323305
type: string
324-
- name: spaceRequestSecretName
306+
- name: clusterCredentialsSecretRef
325307
type: string
326-
- name: clusterName
308+
- name: ocp-version
327309
type: string
328310
- name: vllm-host
329311
type: string
@@ -342,25 +324,9 @@ spec:
342324
secret:
343325
secretName: quay-aipcc-password
344326
- name: credentials
345-
emptyDir: {}
327+
secret:
328+
secretName: $(params.clusterCredentialsSecretRef)
346329
steps:
347-
- name: get-kubeconfig
348-
ref:
349-
resolver: git
350-
params:
351-
- name: url
352-
value: https://github.com/konflux-ci/build-definitions.git
353-
- name: revision
354-
value: main
355-
- name: pathInRepo
356-
value: stepactions/eaas-get-ephemeral-cluster-credentials/0.1/eaas-get-ephemeral-cluster-credentials.yaml
357-
params:
358-
- name: eaasSpaceSecretRef
359-
value: $(params.spaceRequestSecretName)
360-
- name: clusterName
361-
value: "$(params.clusterName)"
362-
- name: credentials
363-
value: credentials
364330
- name: run-e2e-tests
365331
resources:
366332
requests:
@@ -379,7 +345,7 @@ spec:
379345
mountPath: /credentials
380346
env:
381347
- name: KUBECONFIG
382-
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
348+
value: "/credentials/kubeconfig"
383349
- name: ARTIFACT_DIR
384350
value: "/workspace/artifacts"
385351
- name: KONFLUX_BOOL
@@ -407,7 +373,7 @@ spec:
407373
echo "[e2e] 2/8 Installing deps..."
408374
microdnf -y install git tar jq curl-minimal python3 gettext
409375
echo "[e2e] 3/8 Downloading oc client..."
410-
curl -sL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.19/openshift-client-linux-amd64-rhel9.tar.gz
376+
curl -sL -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-$(params.ocp-version)/openshift-client-linux-amd64-rhel9.tar.gz
411377
tar -xzf oc.tar.gz && chmod +x kubectl oc && mv oc kubectl /usr/local/bin/
412378
echo "[e2e] 4/8 VLLM_URL=$VLLM_URL"
413379
REPO_URL=$(jq -r '.components[] | select(.name == "lightspeed-stack-0-7") | .source.git.url // "https://github.com/lightspeed-core/lightspeed-stack.git"' <<< "$SNAPSHOT")

0 commit comments

Comments
 (0)