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

Add multi-AZ and multi-region support #36

Merged
merged 2 commits into from
Jul 9, 2022

Conversation

cartalla
Copy link
Contributor

@cartalla cartalla commented Jul 7, 2022

Add Regions and AZs to the InstanceConfig

The code has been updated support multiple regions.
The instance types that are available and the pricing varies by region so
all instance type info must be maintained by region.

Spot pricing additionally varies by instance type and by AZ and this
commit adds an updated EC2InstanceTypeInfoPkg package that looks up
the spot pricing for each instance type in each AZ and region.

The Region/AZ configuration is added to the InstanceConfig section of the config
file.
The region requires the VpcId, CIDR, and SshKeyPair.
The AZ requires the subnet ID and priority.

The slurm node configuration has been updated to add the AZ id to all compute nodes
and add the AZ name to all partitions.

Users can specify multiple partitions with sbatch if they want jobs to
be spread across multiple AZs.
The modulefile has been updated to set the partition to the list of
all regional/az partitions so that all nodes are available to the jobs
in the priority configured in the config file.

Create compute node security groups for other regions using a custom resource.
Save regional security group ids in ssm parameter store.

Update multi-region route53 hosted zone

Fix IAM permissions to handle multiple regions

Decode iam permissions messsages

Update security groups with remote region cidrs

Create slurmfs ARecord for use in other regions.
This required adding a lambda to do DNS lookups.

Add custom resource to add regional VPCs to the Route53 hosted zone.
This is required for now because of a CDK bug:

aws/aws-cdk#20496

The PR for the above bug is:

aws/aws-cdk#20530

Update github-pages to use mkdocs
Add github-docs target to Makefile

Update to cdk@2.28.1

Create AZ and interactive partitions, set default partitions

Resolves FEATURE #22: Support mutiple availability zones and regions

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add Regions and AZs to the InstanceConfig

The code has been updated support multiple regions.
The instance types that are available and the pricing varies by region so
all instance type info must be maintained by region.

Spot pricing additionally varies by instance type and by AZ and this
commit adds an updated EC2InstanceTypeInfoPkg package that looks up
the spot pricing for each instance type in each AZ and region.

The Region/AZ configuration is added to the InstanceConfig section of the config
file.
The region requires the VpcId, CIDR, and SshKeyPair.
The AZ requires the subnet ID and priority.

The slurm node configuration has been updated to add the AZ id to all compute nodes
and add the AZ name to all partitions.

Users can specify multiple partitions with sbatch if they want jobs to
be spread across multiple AZs.
The modulefile has been updated to set the partition to the list of
all regional/az partitions so that all nodes are available to the jobs
in the priority configured in the config file.

Create compute node security groups for other regions using a custom resource.
Save regional security group ids in ssm parameter store.

Update multi-region route53 hosted zone

Fix IAM permissions to handle multiple regions

Decode iam permissions messsages

Update security groups with remote region cidrs

Create slurmfs ARecord for use in other regions.
This required adding a lambda to do DNS lookups.

Add custom resource to add regional VPCs to the Route53 hosted zone.
This is required for now because of a CDK bug:

aws/aws-cdk#20496

The PR for the above bug is:

aws/aws-cdk#20530

Update github-pages to use mkdocs
Add github-docs target to Makefile

Update to cdk@2.28.1

Create AZ and interactive partitions, set default partitions

Resolves [FEATURE #22: Support mutiple availability zones and regions](#2)
@cartalla cartalla linked an issue Jul 7, 2022 that may be closed by this pull request
@cartalla cartalla self-assigned this Jul 7, 2022
.gitignore Outdated Show resolved Hide resolved
docs/multi-region.md Show resolved Hide resolved
source/app.py Outdated Show resolved Hide resolved
source/cdk/cdk_slurm_stack.py Outdated Show resolved Hide resolved
source/cdk/cdk_slurm_stack.py Outdated Show resolved Hide resolved
@@ -0,0 +1,19 @@
#!/usr/bin/env python3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add tests that cover all OS distributions and all instance types.

Wait for cluster to be available and then run tests on the clusters to make sure that it worked.

@cartalla cartalla force-pushed the 2-support-mutiple-availability-zones-and-regions branch from 8b3b89c to eb5df97 Compare July 9, 2022 23:01
@cartalla cartalla merged commit fa4b0fa into main Jul 9, 2022
@cartalla cartalla deleted the 2-support-mutiple-availability-zones-and-regions branch September 6, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Support mutiple availability zones and regions
1 participant