Skip to content

Commit

Permalink
ci-operator/templates/openshift/installer/cluster-launch-installer-*:…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
wking committed Jan 23, 2020
1 parent 10bfd99 commit b717933
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,6 @@ objects:
env:
- name: AWS_SHARED_CREDENTIALS_FILE
value: /etc/openshift-installer/.awscred
- name: AWS_REGION
value: us-east-1
- name: AZURE_AUTH_LOCATION
value: /etc/openshift-installer/osServicePrincipal.json
- name: GCP_REGION
Expand Down Expand Up @@ -442,6 +440,16 @@ objects:
elif has_variant "large"; then
master_type=m5.4xlarge
fi
case $((RANDOM % 4)) in
0) AWS_REGION=us-east-1
ZONE_1=us-east-1b
ZONE_2=us-east-1c;;
1) AWS_REGION=us-east-2;;
2) AWS_REGION=us-west-1;;
3) AWS_REGION=us-west-2;;
*) echo >&2 "invalid AWS region index"; exit 1;;
esac
echo "AWS region: ${AWS_REGION} (zones: ${ZONE_1:-${AWS_REGION}a} ${ZONE_2:-${AWS_REGION}b})"
subnets="[]"
if has_variant "shared-vpc"; then
case $((RANDOM % 4)) in
Expand All @@ -465,20 +473,20 @@ objects:
aws:
type: ${master_type}
zones:
- us-east-1a
- us-east-1b
- ${ZONE_1:-${AWS_REGION}a}
- ${ZONE_2:-${AWS_REGION}b}
compute:
- name: worker
replicas: ${workers}
platform:
aws:
type: m4.xlarge
zones:
- us-east-1a
- us-east-1b
- ${ZONE_1:-${AWS_REGION}a}
- ${ZONE_2:-${AWS_REGION}b}
platform:
aws:
region: ${AWS_REGION}
region: ${AWS_REGION}
userTags:
expirationDate: ${EXPIRATION_DATE}
subnets: ${subnets}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ objects:
env:
- name: AWS_SHARED_CREDENTIALS_FILE
value: /etc/openshift-installer/.awscred
- name: AWS_REGION
value: us-east-1
- name: AZURE_AUTH_LOCATION
value: /etc/openshift-installer/osServicePrincipal.json
- name: GCP_REGION
Expand Down Expand Up @@ -292,6 +290,16 @@ objects:
elif [[ "${CLUSTER_VARIANT}" =~ "large" ]]; then
master_type=m5.4xlarge
fi
case $((RANDOM % 4)) in
0) AWS_REGION=us-east-1
ZONE_1=us-east-1b
ZONE_2=us-east-1c;;
1) AWS_REGION=us-east-2;;
2) AWS_REGION=us-west-1;;
3) AWS_REGION=us-west-2;;
*) echo >&2 "invalid AWS region index"; exit 1;;
esac
echo "AWS region: ${AWS_REGION} (zones: ${ZONE_1:-${AWS_REGION}a} ${ZONE_2:-${AWS_REGION}b})"
subnets="[]"
if [[ "${CLUSTER_VARIANT}" =~ "shared-vpc" ]]; then
case $((RANDOM % 4)) in
Expand All @@ -315,20 +323,20 @@ objects:
aws:
type: ${master_type}
zones:
- us-east-1a
- us-east-1b
- ${ZONE_1:-${AWS_REGION}a}
- ${ZONE_2:-${AWS_REGION}b}
compute:
- name: worker
replicas: ${workers}
platform:
aws:
type: m4.xlarge
zones:
- us-east-1a
- us-east-1b
- ${ZONE_1:-${AWS_REGION}a}
- ${ZONE_2:-${AWS_REGION}b}
platform:
aws:
region: ${AWS_REGION}
region: ${AWS_REGION}
userTags:
expirationDate: ${EXPIRATION_DATE}
subnets: ${subnets}
Expand Down

0 comments on commit b717933

Please sign in to comment.