Skip to content

Commit b717933

Browse files
committed
ci-operator/templates/openshift/installer/cluster-launch-installer-*: Random AWS regions for IPI
I'm leaving the UPI templates and such alone for now, because they mention regions in more places and I don't care as much about them ;). The approach mirrors what we did for Azure with 4d08a9d (ci-operator/templates/openshift/installer/cluster-launch-installer-*: Random Azure regions, 2019-09-18, #5081). This should reduce resource contention (both for limits and for API throttling) in CI. We could theoretically raise our Boskos caps as well, but I'm leaving that off for now because we're getting hammered by AMI-copy issues [1]. I've also added ZONE_* variables in case we need to dodge broken zones like we have in the past with e8921c3 (ci-operator/templates/openshift: Get e2e-aws out of us-east-1b, 2019-03-22, #3204). I have nothing against the other us-east-1 zones at the moment, the current ZONE_* overrides there are just to demonstrate the idea in case folks need to pivot later. Without explicit ZONE_* choices, we'll fall back to using zones a and b within the chosen region. The DevProductivity Platform (DPP) folks bumped our quotas in the new regions back in 2019-11 [2]. We should be good for up to 25% of our current us-east-1 capacity in those regions. Increases beyond that, or sharding into additional regions, will require additional DPP <-> AWS work to get limits raised. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1752370#c3 [2]: https://issues.redhat.com/browse/DPP-3108
1 parent 10bfd99 commit b717933

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@ objects:
347347
env:
348348
- name: AWS_SHARED_CREDENTIALS_FILE
349349
value: /etc/openshift-installer/.awscred
350-
- name: AWS_REGION
351-
value: us-east-1
352350
- name: AZURE_AUTH_LOCATION
353351
value: /etc/openshift-installer/osServicePrincipal.json
354352
- name: GCP_REGION
@@ -442,6 +440,16 @@ objects:
442440
elif has_variant "large"; then
443441
master_type=m5.4xlarge
444442
fi
443+
case $((RANDOM % 4)) in
444+
0) AWS_REGION=us-east-1
445+
ZONE_1=us-east-1b
446+
ZONE_2=us-east-1c;;
447+
1) AWS_REGION=us-east-2;;
448+
2) AWS_REGION=us-west-1;;
449+
3) AWS_REGION=us-west-2;;
450+
*) echo >&2 "invalid AWS region index"; exit 1;;
451+
esac
452+
echo "AWS region: ${AWS_REGION} (zones: ${ZONE_1:-${AWS_REGION}a} ${ZONE_2:-${AWS_REGION}b})"
445453
subnets="[]"
446454
if has_variant "shared-vpc"; then
447455
case $((RANDOM % 4)) in
@@ -465,20 +473,20 @@ objects:
465473
aws:
466474
type: ${master_type}
467475
zones:
468-
- us-east-1a
469-
- us-east-1b
476+
- ${ZONE_1:-${AWS_REGION}a}
477+
- ${ZONE_2:-${AWS_REGION}b}
470478
compute:
471479
- name: worker
472480
replicas: ${workers}
473481
platform:
474482
aws:
475483
type: m4.xlarge
476484
zones:
477-
- us-east-1a
478-
- us-east-1b
485+
- ${ZONE_1:-${AWS_REGION}a}
486+
- ${ZONE_2:-${AWS_REGION}b}
479487
platform:
480488
aws:
481-
region: ${AWS_REGION}
489+
region: ${AWS_REGION}
482490
userTags:
483491
expirationDate: ${EXPIRATION_DATE}
484492
subnets: ${subnets}

ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ objects:
205205
env:
206206
- name: AWS_SHARED_CREDENTIALS_FILE
207207
value: /etc/openshift-installer/.awscred
208-
- name: AWS_REGION
209-
value: us-east-1
210208
- name: AZURE_AUTH_LOCATION
211209
value: /etc/openshift-installer/osServicePrincipal.json
212210
- name: GCP_REGION
@@ -292,6 +290,16 @@ objects:
292290
elif [[ "${CLUSTER_VARIANT}" =~ "large" ]]; then
293291
master_type=m5.4xlarge
294292
fi
293+
case $((RANDOM % 4)) in
294+
0) AWS_REGION=us-east-1
295+
ZONE_1=us-east-1b
296+
ZONE_2=us-east-1c;;
297+
1) AWS_REGION=us-east-2;;
298+
2) AWS_REGION=us-west-1;;
299+
3) AWS_REGION=us-west-2;;
300+
*) echo >&2 "invalid AWS region index"; exit 1;;
301+
esac
302+
echo "AWS region: ${AWS_REGION} (zones: ${ZONE_1:-${AWS_REGION}a} ${ZONE_2:-${AWS_REGION}b})"
295303
subnets="[]"
296304
if [[ "${CLUSTER_VARIANT}" =~ "shared-vpc" ]]; then
297305
case $((RANDOM % 4)) in
@@ -315,20 +323,20 @@ objects:
315323
aws:
316324
type: ${master_type}
317325
zones:
318-
- us-east-1a
319-
- us-east-1b
326+
- ${ZONE_1:-${AWS_REGION}a}
327+
- ${ZONE_2:-${AWS_REGION}b}
320328
compute:
321329
- name: worker
322330
replicas: ${workers}
323331
platform:
324332
aws:
325333
type: m4.xlarge
326334
zones:
327-
- us-east-1a
328-
- us-east-1b
335+
- ${ZONE_1:-${AWS_REGION}a}
336+
- ${ZONE_2:-${AWS_REGION}b}
329337
platform:
330338
aws:
331-
region: ${AWS_REGION}
339+
region: ${AWS_REGION}
332340
userTags:
333341
expirationDate: ${EXPIRATION_DATE}
334342
subnets: ${subnets}

0 commit comments

Comments
 (0)