Skip to content

step-registry: add upgrade workflows #11247

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

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ update:
$(MAKE) jobs
$(MAKE) ci-operator-config
$(MAKE) prow-config
$(MAKE) registry-metadata

release-controllers:
./hack/generators/release-controllers/generate-release-controllers.py .
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
releases:
initial:
release:
channel: stable
version: "4.4"
latest:
candidate:
product: ocp
stream: ci
version: "4.5"
resources:
'*':
requests:
cpu: 100m
memory: 200Mi
tests:
- as: e2e-44-stable-to-45-ci
cron: 0 */6 * * *
steps:
cluster_profile: aws
workflow: openshift-upgrade-aws
zz_generated_metadata:
branch: master
org: openshift
repo: release
variant: ocp-4.5-ci
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,78 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: api.ci
cron: 0 */6 * * *
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: master
org: openshift
repo: release
labels:
ci-operator.openshift.io/prowgen-controlled: "true"
ci-operator.openshift.io/variant: ocp-4.5-ci
job-release: "4.5"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-release-master-ocp-4.5-ci-e2e-44-stable-to-45-ci
spec:
containers:
- args:
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-password-file=/etc/boskos/password
- --report-password-file=/etc/report/password.txt
- --report-username=ci
- --secret-dir=/secrets/ci-pull-credentials
- --secret-dir=/usr/local/e2e-44-stable-to-45-ci-cluster-profile
- --target=e2e-44-stable-to-45-ci
- --variant=ocp-4.5-ci
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/e2e-44-stable-to-45-ci-cluster-profile
name: cluster-profile
- 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: password
path: password
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: cluster-profile
projected:
sources:
- secret:
name: cluster-secrets-aws
- name: pull-secret
secret:
secretName: regcred
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: api.ci
cron: 0 0 */2 * *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ set -o pipefail

trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM

if [[ -z "$RELEASE_IMAGE_LATEST" ]]; then
echo "RELEASE_IMAGE_LATEST is an empty string, exiting"
if [[ -z "$OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE" ]]; then
echo "OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE is an empty string, exiting"
exit 1
fi

echo "Installing from release ${OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE}"
export SSH_PRIV_KEY_PATH=${CLUSTER_PROFILE_DIR}/ssh-privatekey
export PULL_SECRET_PATH=${CLUSTER_PROFILE_DIR}/pull-secret
export OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=${RELEASE_IMAGE_LATEST}
export OPENSHIFT_INSTALL_INVOKER=openshift-internal-ci/${JOB_NAME}/${BUILD_ID}
export HOME=/tmp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ ref:
requests:
cpu: 1000m
memory: 2Gi
dependencies:
- name: "release:latest"
env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE
- name: "release:latest"
env: RELEASE_IMAGE_LATEST
documentation: |-
The IPI install step runs the OpenShift Installer in order to bring up an OpenShift cluster, using the provided cluster profile to choose a target IaaS platform. Anything that needs to be configured using manifests should generate them before this step and put them in the SHARED_DIR with the filename manifest_(manifest_name).yml so that this step can pull in the manifest in.
11 changes: 11 additions & 0 deletions ci-operator/step-registry/ipi/upgrade/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
approvers:
- smarterclayton
- wking
- stevekuznetsov
- vrutkovs
- abhinavdahiya
- deads2k
- crawford
- ewolinetz
- csrwng
- staebler
11 changes: 11 additions & 0 deletions ci-operator/step-registry/ipi/upgrade/aws/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
approvers:
- smarterclayton
- wking
- stevekuznetsov
- vrutkovs
- abhinavdahiya
- deads2k
- crawford
- ewolinetz
- csrwng
- staebler
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
workflow:
as: ipi-upgrade-aws
steps:
pre:
- chain: ipi-aws-pre
post:
- chain: ipi-aws-post
dependencies:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "release:initial"
documentation: |-
The IPI upgrade workflow provides pre- and post- steps that provision and
deprovision an OpenShift cluster with a default configuration on AWS,
allowing job authors to inject their own end-to-end test logic.

The original installation will use the initial release payload and upgrade
to the latest release payload, however the configuration defines those.

All modifications to this workflow should be done by modifying the
`ipi-aws-{pre,post}` chains to allow other workflows to mimic and extend
this base workflow without a need to backport changes.
34 changes: 34 additions & 0 deletions ci-operator/step-registry/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,23 @@
]
}
},
"ipi-upgrade-aws-workflow.yaml": {
"path": "ipi/upgrade/aws/ipi-upgrade-aws-workflow.yaml",
"owners": {
"approvers": [
"smarterclayton",
"wking",
"stevekuznetsov",
"vrutkovs",
"abhinavdahiya",
"deads2k",
"crawford",
"ewolinetz",
"csrwng",
"staebler"
]
}
},
"ipi-vsphere-post-chain.yaml": {
"path": "ipi/vsphere/post/ipi-vsphere-post-chain.yaml",
"owners": {
Expand Down Expand Up @@ -1531,6 +1548,23 @@
]
}
},
"openshift-upgrade-aws-workflow.yaml": {
"path": "openshift/upgrade/aws/openshift-upgrade-aws-workflow.yaml",
"owners": {
"approvers": [
"smarterclayton",
"wking",
"stevekuznetsov",
"vrutkovs",
"abhinavdahiya",
"deads2k",
"crawford",
"ewolinetz",
"csrwng",
"staebler"
]
}
},
"operatorhub-subscribe-ref.yaml": {
"path": "operatorhub/subscribe/operatorhub-subscribe-ref.yaml",
"owners": {
Expand Down
11 changes: 11 additions & 0 deletions ci-operator/step-registry/openshift/upgrade/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
approvers:
- smarterclayton
- wking
- stevekuznetsov
- vrutkovs
- abhinavdahiya
- deads2k
- crawford
- ewolinetz
- csrwng
- staebler
11 changes: 11 additions & 0 deletions ci-operator/step-registry/openshift/upgrade/aws/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
approvers:
Copy link
Member

Choose a reason for hiding this comment

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

Symlink to ../OWNERS? I doubt we will need flavor-specific maintainer sets here, and your current sets look like dups.

- smarterclayton
- wking
- stevekuznetsov
- vrutkovs
- abhinavdahiya
- deads2k
- crawford
- ewolinetz
- csrwng
- staebler
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
workflow:
as: openshift-upgrade-aws
steps:
pre:
- chain: ipi-aws-pre
test:
- ref: openshift-e2e-test
post:
- chain: ipi-aws-post
dependencies:
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "release:initial"
env:
TEST_COMMAND: "run-upgrade"
TEST_SUITE: "all"
documentation: |-
The Openshift E2E AWS workflow executes the upgrade end-to-end test suite on AWS with a default cluster configuration, exercising an upgrade during the process.