Skip to content
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

ci-operator/templates/openshift/installer/cluster-launch-installer-*: Random AWS regions for IPI #6833

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we doing this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems premature, but ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems premature, but ok.

It is premature, but I wanted folks to be able to see the pattern without having to dig through commit/PR logs. See "I have nothing against the other us-east-1 zones at the moment..." in the PR topic and commit message ;).

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