Skip to content

Commit

Permalink
Merge pull request #6833 from wking/aws-region-sharding
Browse files Browse the repository at this point in the history
ci-operator/templates/openshift/installer/cluster-launch-installer-*: Random AWS regions for IPI
  • Loading branch information
openshift-merge-robot committed Jan 23, 2020
2 parents d7e496f + b717933 commit 7ce78ce
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 7ce78ce

Please sign in to comment.