Skip to content

Commit ae30bf6

Browse files
committed
NP-1102: Support for Ansible playbook for offline migration
This commit runs migration to change CNI from OpenShiftSDN to OVNKubernetes using ipi-aws-ovn workflow. It also runs rollback to change CNI from OVNKubernetes to OpenShiftSDN using ipi-aws-sdn worflow. This commit also creates a new workflow called ipi-aws-sdn to test the rollback. OWNERS and OWNERS_ALIASES file has been added in config and jobs folder present under ci-operator folder for merge process of the PR.
1 parent 8c9558d commit ae30bf6

File tree

9 files changed

+415
-0
lines changed

9 files changed

+415
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
reviewers:
2+
- core-reviewers
3+
approvers:
4+
- core-approvers
5+
6+
component: Networking
7+
subcomponent: cluster-network-operator
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
aliases:
2+
core-approvers:
3+
- abhat
4+
- danwinship
5+
- dougbtv
6+
- JacobTanenbaum
7+
- jcaamano
8+
- knobunc
9+
- kyrtapz
10+
- miheer
11+
- trozet
12+
core-reviewers:
13+
- abhat
14+
- danwinship
15+
- dougbtv
16+
- JacobTanenbaum
17+
- jcaamano
18+
- kyrtapz
19+
- miheer
20+
- trozet
21+
- tssurya
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
base_images:
2+
ocp_4.19_cli:
3+
name: "4.19"
4+
namespace: ocp
5+
tag: cli
6+
ocp_builder_rhel-9-golang-1.23-openshift-4.19:
7+
name: builder
8+
namespace: ocp
9+
tag: rhel-9-golang-1.23-openshift-4.19
10+
build_root:
11+
from_repository: true
12+
images:
13+
- dockerfile_path: ci/Dockerfile
14+
inputs:
15+
ocp_4.19_cli:
16+
as:
17+
- registry.ci.openshift.org/ocp/4.19:cli
18+
ocp_builder_rhel-9-golang-1.23-openshift-4.19:
19+
as:
20+
- registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19
21+
to: ansible-test-runner
22+
promotion:
23+
to:
24+
- name: "4.19"
25+
namespace: ocp
26+
releases:
27+
initial:
28+
integration:
29+
name: "4.19"
30+
namespace: ocp
31+
latest:
32+
integration:
33+
include_built_images: true
34+
name: "4.19"
35+
namespace: ocp
36+
resources:
37+
'*':
38+
requests:
39+
cpu: 100m
40+
memory: 200Mi
41+
tests:
42+
- as: migration
43+
steps:
44+
cluster_profile: aws
45+
test:
46+
- as: test-migration
47+
cli: latest
48+
commands: sh ci/test-integration.sh
49+
dependencies:
50+
- env: ANSIBLE_TEST_IMAGE
51+
name: ansible-test-runner
52+
from: src
53+
resources:
54+
requests:
55+
cpu: 100m
56+
workflow: ipi-aws-sdn
57+
- as: rollback
58+
steps:
59+
cluster_profile: aws
60+
test:
61+
- as: test-rollback
62+
cli: latest
63+
commands: sh ci/test-integration.sh
64+
dependencies:
65+
- env: ANSIBLE_TEST_IMAGE
66+
name: ansible-test-runner
67+
from: src
68+
resources:
69+
requests:
70+
cpu: 100m
71+
workflow: ipi-aws-ovn
72+
zz_generated_metadata:
73+
branch: main
74+
org: openshift
75+
repo: ansible-ocp-networking-migration-rollback
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
reviewers:
2+
- core-reviewers
3+
approvers:
4+
- core-approvers
5+
6+
component: Networking
7+
subcomponent: cluster-network-operator
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
aliases:
2+
core-approvers:
3+
- abhat
4+
- danwinship
5+
- dougbtv
6+
- JacobTanenbaum
7+
- jcaamano
8+
- knobunc
9+
- kyrtapz
10+
- miheer
11+
- trozet
12+
core-reviewers:
13+
- abhat
14+
- danwinship
15+
- dougbtv
16+
- JacobTanenbaum
17+
- jcaamano
18+
- kyrtapz
19+
- miheer
20+
- trozet
21+
- tssurya
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
postsubmits:
2+
openshift/ansible-ocp-networking-migration-rollback:
3+
- agent: kubernetes
4+
always_run: true
5+
branches:
6+
- ^main$
7+
cluster: build03
8+
decorate: true
9+
labels:
10+
ci-operator.openshift.io/is-promotion: "true"
11+
ci.openshift.io/generator: prowgen
12+
max_concurrency: 1
13+
name: branch-ci-openshift-ansible-ocp-networking-migration-rollback-main-images
14+
spec:
15+
containers:
16+
- args:
17+
- --gcs-upload-secret=/secrets/gcs/service-account.json
18+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
19+
- --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson
20+
- --promote
21+
- --report-credentials-file=/etc/report/credentials
22+
- --target=[images]
23+
command:
24+
- ci-operator
25+
image: ci-operator:latest
26+
imagePullPolicy: Always
27+
name: ""
28+
resources:
29+
requests:
30+
cpu: 10m
31+
volumeMounts:
32+
- mountPath: /secrets/gcs
33+
name: gcs-credentials
34+
readOnly: true
35+
- mountPath: /secrets/manifest-tool
36+
name: manifest-tool-local-pusher
37+
readOnly: true
38+
- mountPath: /etc/pull-secret
39+
name: pull-secret
40+
readOnly: true
41+
- mountPath: /etc/push-secret
42+
name: push-secret
43+
readOnly: true
44+
- mountPath: /etc/report
45+
name: result-aggregator
46+
readOnly: true
47+
serviceAccountName: ci-operator
48+
volumes:
49+
- name: manifest-tool-local-pusher
50+
secret:
51+
secretName: manifest-tool-local-pusher
52+
- name: pull-secret
53+
secret:
54+
secretName: registry-pull-credentials
55+
- name: push-secret
56+
secret:
57+
secretName: registry-push-credentials-ci-central
58+
- name: result-aggregator
59+
secret:
60+
secretName: result-aggregator
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
presubmits:
2+
openshift/ansible-ocp-networking-migration-rollback:
3+
- agent: kubernetes
4+
always_run: true
5+
branches:
6+
- ^main$
7+
- ^main-
8+
cluster: build03
9+
context: ci/prow/images
10+
decorate: true
11+
labels:
12+
ci.openshift.io/generator: prowgen
13+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
14+
name: pull-ci-openshift-ansible-ocp-networking-migration-rollback-main-images
15+
rerun_command: /test images
16+
spec:
17+
containers:
18+
- args:
19+
- --gcs-upload-secret=/secrets/gcs/service-account.json
20+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
21+
- --report-credentials-file=/etc/report/credentials
22+
- --target=[images]
23+
- --target=[release:latest]
24+
command:
25+
- ci-operator
26+
image: ci-operator:latest
27+
imagePullPolicy: Always
28+
name: ""
29+
resources:
30+
requests:
31+
cpu: 10m
32+
volumeMounts:
33+
- mountPath: /secrets/gcs
34+
name: gcs-credentials
35+
readOnly: true
36+
- mountPath: /secrets/manifest-tool
37+
name: manifest-tool-local-pusher
38+
readOnly: true
39+
- mountPath: /etc/pull-secret
40+
name: pull-secret
41+
readOnly: true
42+
- mountPath: /etc/report
43+
name: result-aggregator
44+
readOnly: true
45+
serviceAccountName: ci-operator
46+
volumes:
47+
- name: manifest-tool-local-pusher
48+
secret:
49+
secretName: manifest-tool-local-pusher
50+
- name: pull-secret
51+
secret:
52+
secretName: registry-pull-credentials
53+
- name: result-aggregator
54+
secret:
55+
secretName: result-aggregator
56+
trigger: (?m)^/test( | .* )images,?($|\s.*)
57+
- agent: kubernetes
58+
always_run: true
59+
branches:
60+
- ^main$
61+
- ^main-
62+
cluster: build05
63+
context: ci/prow/migration
64+
decorate: true
65+
labels:
66+
ci-operator.openshift.io/cloud: aws
67+
ci-operator.openshift.io/cloud-cluster-profile: aws
68+
ci.openshift.io/generator: prowgen
69+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
70+
name: pull-ci-openshift-ansible-ocp-networking-migration-rollback-main-migration
71+
rerun_command: /test migration
72+
spec:
73+
containers:
74+
- args:
75+
- --gcs-upload-secret=/secrets/gcs/service-account.json
76+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
77+
- --lease-server-credentials-file=/etc/boskos/credentials
78+
- --report-credentials-file=/etc/report/credentials
79+
- --secret-dir=/secrets/ci-pull-credentials
80+
- --target=migration
81+
command:
82+
- ci-operator
83+
image: ci-operator:latest
84+
imagePullPolicy: Always
85+
name: ""
86+
resources:
87+
requests:
88+
cpu: 10m
89+
volumeMounts:
90+
- mountPath: /etc/boskos
91+
name: boskos
92+
readOnly: true
93+
- mountPath: /secrets/ci-pull-credentials
94+
name: ci-pull-credentials
95+
readOnly: true
96+
- mountPath: /secrets/gcs
97+
name: gcs-credentials
98+
readOnly: true
99+
- mountPath: /secrets/manifest-tool
100+
name: manifest-tool-local-pusher
101+
readOnly: true
102+
- mountPath: /etc/pull-secret
103+
name: pull-secret
104+
readOnly: true
105+
- mountPath: /etc/report
106+
name: result-aggregator
107+
readOnly: true
108+
serviceAccountName: ci-operator
109+
volumes:
110+
- name: boskos
111+
secret:
112+
items:
113+
- key: credentials
114+
path: credentials
115+
secretName: boskos-credentials
116+
- name: ci-pull-credentials
117+
secret:
118+
secretName: ci-pull-credentials
119+
- name: manifest-tool-local-pusher
120+
secret:
121+
secretName: manifest-tool-local-pusher
122+
- name: pull-secret
123+
secret:
124+
secretName: registry-pull-credentials
125+
- name: result-aggregator
126+
secret:
127+
secretName: result-aggregator
128+
trigger: (?m)^/test( | .* )migration,?($|\s.*)
129+
- agent: kubernetes
130+
always_run: true
131+
branches:
132+
- ^main$
133+
- ^main-
134+
cluster: build05
135+
context: ci/prow/rollback
136+
decorate: true
137+
labels:
138+
ci-operator.openshift.io/cloud: aws
139+
ci-operator.openshift.io/cloud-cluster-profile: aws
140+
ci.openshift.io/generator: prowgen
141+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
142+
name: pull-ci-openshift-ansible-ocp-networking-migration-rollback-main-rollback
143+
rerun_command: /test rollback
144+
spec:
145+
containers:
146+
- args:
147+
- --gcs-upload-secret=/secrets/gcs/service-account.json
148+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
149+
- --lease-server-credentials-file=/etc/boskos/credentials
150+
- --report-credentials-file=/etc/report/credentials
151+
- --secret-dir=/secrets/ci-pull-credentials
152+
- --target=rollback
153+
command:
154+
- ci-operator
155+
image: ci-operator:latest
156+
imagePullPolicy: Always
157+
name: ""
158+
resources:
159+
requests:
160+
cpu: 10m
161+
volumeMounts:
162+
- mountPath: /etc/boskos
163+
name: boskos
164+
readOnly: true
165+
- mountPath: /secrets/ci-pull-credentials
166+
name: ci-pull-credentials
167+
readOnly: true
168+
- mountPath: /secrets/gcs
169+
name: gcs-credentials
170+
readOnly: true
171+
- mountPath: /secrets/manifest-tool
172+
name: manifest-tool-local-pusher
173+
readOnly: true
174+
- mountPath: /etc/pull-secret
175+
name: pull-secret
176+
readOnly: true
177+
- mountPath: /etc/report
178+
name: result-aggregator
179+
readOnly: true
180+
serviceAccountName: ci-operator
181+
volumes:
182+
- name: boskos
183+
secret:
184+
items:
185+
- key: credentials
186+
path: credentials
187+
secretName: boskos-credentials
188+
- name: ci-pull-credentials
189+
secret:
190+
secretName: ci-pull-credentials
191+
- name: manifest-tool-local-pusher
192+
secret:
193+
secretName: manifest-tool-local-pusher
194+
- name: pull-secret
195+
secret:
196+
secretName: registry-pull-credentials
197+
- name: result-aggregator
198+
secret:
199+
secretName: result-aggregator
200+
trigger: (?m)^/test( | .* )rollback,?($|\s.*)

0 commit comments

Comments
 (0)