#48 - Add optional AWS availability zone selection#49
Open
spacepirate0001 wants to merge 1 commit into
Open
Conversation
The AWS subnet, and therefore the EC2 instance, was always placed in the first sorted availability zone that offers the requested instance type (e.g. us-west-2a). AZ offerings indicate that a zone supports an instance type, not that it has live capacity, so deployments deterministically landed in the same zone and failed with InsufficientInstanceCapacity whenever that zone was exhausted, even when other zones in the region had capacity. Add an optional availability_zone variable to the root and isaac-workstation Terraform modules and a corresponding --availability-zone/--az option on deploy-aws. The value is passed through to the subnet; when left empty the behavior is unchanged and the first offered zone is auto-selected. The CLI accepts a full zone name (us-west-2b) or a bare suffix letter (b) and validates it against the selected region. Signed-off-by: Haytham Amin <haythamelmogazy@gmail.com>
c286335 to
55c76bc
Compare
This file contains hidden or 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
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.
What
Adds an optional availability zone selection for AWS deployments so users can route around per-zone GPU capacity shortages.
Closes #48.
Why
The AWS subnet, and therefore the EC2 instance, was always placed in the first sorted availability zone that offers the requested instance type (e.g.
us-west-2a):AZ offerings indicate that a zone supports an instance type, not that it currently has capacity. As a result, deployments deterministically landed in the same zone and failed with
InsufficientInstanceCapacitywhenever that zone was exhausted, even when other zones in the region had capacity. Re-running did not help because the selection is deterministic.How
availability_zoneTerraform variable on both the rootawsmodule and theisaac-workstationmodule (default"").--availability-zone/--azoption ondeploy-aws. It accepts a full zone name (us-west-2b) or a bare suffix letter (b, combined with the chosen region), validates that the zone belongs to the selected region, and writes the value into the tfvars passed to Terraform.Backward compatibility
Leaving the prompt empty (the default) reproduces the previous behavior exactly. Existing
.tfvarsfiles without the variable are fine because the variable defaults to"".Testing
python3 -c "import ast; ast.parse(open('deploy-aws').read())"passes.terraform fmt/validateshould be run in the project container.Files changed
deploy-awssrc/terraform/aws/main.tfsrc/terraform/aws/variables.tfsrc/terraform/aws/isaac-workstation/main.tfsrc/terraform/aws/isaac-workstation/variables.tf