-
Notifications
You must be signed in to change notification settings - Fork 500
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
New parameter to force ODCR to a single AZ #4325
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jira: GPTEINFRA-2334 New feature for the agnosticd_odcr module: force all AZs to be a single AZ. If the parameter 'all_in_one' is set to true, all the reservation will target the same AZ. All the reservations are merged into one AZ. Reservations that are the same instance_type and platform, are merged together and instance_count is updated accordingly. - Add unit tests to helper functions to regroup all the reservation into a single AZ - test with ocp4-cluster - destroy should loop over all the possible regions to build the inventory (bastion) - try multiple regions: let agnosticd_odcr find the right region and AZ. - patch install-config.yml.j2 template to actually use odcr AZs - update Readme.adoc
jkupferer
reviewed
Jan 3, 2022
jkupferer
approved these changes
Jan 3, 2022
pericnenad
pushed a commit
to migtools/agnosticd
that referenced
this pull request
Jan 18, 2022
* New parameter to force ODCR to a single AZ jira: GPTEINFRA-2334 New feature for the agnosticd_odcr module: force all AZs to be a single AZ. If the parameter 'all_in_one' is set to true, all the reservation will target the same AZ. All the reservations are merged into one AZ. Reservations that are the same instance_type and platform, are merged together and instance_count is updated accordingly. - Add unit tests to helper functions to regroup all the reservation into a single AZ - test with ocp4-cluster - destroy should loop over all the possible regions to build the inventory (bastion) - try multiple regions: let agnosticd_odcr find the right region and AZ. - patch install-config.yml.j2 template to actually use odcr AZs - update Readme.adoc * formating * Remove debug statement * Remove temporary tags * rename 'all_in_one' to 'single_zone' * Don't work with multi-region for now * Propagate the single-AZ to all virtual AZ To make it transparent for the config. * Address JK's comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
jira: GPTEINFRA-2334
New feature for the agnosticd_odcr module: force all AZs to be a single AZ.
Sometimes we want to provision all the instances into a single AZ (for saving costs for example).
In order to do that, one would have to redefine the reservations defined in the var
agnosticd_aws_capacity_reservations
to make it single-zone. Here is an example with ocp4-cluster.From:
to:
To avoid the work of redefining the reservations in all the configs depending on whether the user wants a single AZ or spread across multiple AZ, we want a simple ON|OFF flag.
This PR, if applied, adds a new parameter to the
agnosticd_odcr
module to automatically group the reservations into one or keep the default behavior. That parameter can be controlled via the global variableagnosticd_aws_capacity_reservation_single_zone
(false by default).The advantage of doing so inside the module is that it should be transparent for the config (ocp4-cluster). No logic needed there.
If the parameter
single_zone
is set to true, all the reservation will target the same AZ.All the reservations are merged into one AZ. Reservations that are the same
instance_type
andinstance_platform
are merged together andinstance_count
is incremented accordingly.The result will include availability_zone value for the virtual zones, but they will all be the same.
a single AZ
SUMMARY
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
Tested with: