|
32 | 32 | "AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
|
33 | 33 | "Type" : "String"
|
34 | 34 | },
|
| 35 | + "MyAvailabilityZone" : { |
| 36 | + "Description" : "My availability zone, e.g. us-east-1d", |
| 37 | + "AllowedPattern": "[a-z]+-[a-z]+-[1-9]{1}[a-z]{1}", |
| 38 | + "Type" : "String" |
| 39 | + }, |
35 | 40 | "PublicSubnetCIDR" : {
|
36 | 41 | "Default": "192.168.0.0/27",
|
37 | 42 | "Description" : "Public Subnet CIDR in MyVpcCIDR",
|
|
69 | 74 | "InstanceType" : {
|
70 | 75 | "Description" : "The EC2 instance type for workers. For latest GPUs choose p3.xx",
|
71 | 76 | "Type" : "String",
|
72 |
| - "Default" : "p3.16xlarge", |
| 77 | + "Default" : "p3dn.24xlarge", |
73 | 78 | "AllowedValues" : [
|
74 | 79 | "p2.16xlarge",
|
75 | 80 | "p2.8xlarge",
|
76 | 81 | "p2.xlarge",
|
77 | 82 | "p3.2xlarge",
|
78 | 83 | "p3.8xlarge",
|
79 | 84 | "p3.16xlarge",
|
| 85 | + "p3dn.24xlarge", |
80 | 86 | "g2.8xlarge",
|
81 | 87 | "g2.2xlarge",
|
82 | 88 | "t2.small",
|
|
236 | 242 | }
|
237 | 243 | },
|
238 | 244 | "Resources" : {
|
| 245 | + "ResourcePlacementGroup": { |
| 246 | + "Type" : "AWS::EC2::PlacementGroup", |
| 247 | + "Properties" : { |
| 248 | + "Strategy" : "cluster" |
| 249 | + } |
| 250 | + }, |
239 | 251 | "ResourceMetadataLambdaFunction": {
|
240 | 252 | "Type": "AWS::Lambda::Function",
|
241 | 253 | "DependsOn" : ["MasterQueue"],
|
|
851 | 863 | "DesiredCapacity" : "1",
|
852 | 864 | "MinSize" : "1",
|
853 | 865 | "MaxSize" : "1",
|
| 866 | + "PlacementGroup": { |
| 867 | + "Ref": "ResourcePlacementGroup" |
| 868 | + }, |
854 | 869 | "LaunchConfigurationName" : { "Ref" : "MasterLaunchConfig"},
|
855 | 870 | "VPCZoneIdentifier" : [{ "Ref" : "PublicSubnet"}],
|
856 | 871 | "NotificationConfiguration" : {
|
|
884 | 899 | "Properties" : {
|
885 | 900 | "MinSize" : "0",
|
886 | 901 | "MaxSize" : { "Ref" : "WorkerCount" },
|
| 902 | + "PlacementGroup": { |
| 903 | + "Ref": "ResourcePlacementGroup" |
| 904 | + }, |
887 | 905 | "DesiredCapacity" : { "Ref" : "WorkerCount" },
|
888 | 906 | "LaunchConfigurationName" : {
|
889 | 907 | "Ref" : "WorkerLaunchConfig"
|
|
1002 | 1020 | "Properties" : {
|
1003 | 1021 | "VpcId" : { "Ref" : "Vpc" },
|
1004 | 1022 | "CidrBlock" : { "Ref" : "PrivateSubnetCIDR"},
|
| 1023 | + "AvailabilityZone": { "Ref": "MyAvailabilityZone"}, |
1005 | 1024 | "Tags" : [
|
1006 | 1025 | { "Key" : "Network", "Value" : "Private" },
|
1007 | 1026 | { "Key" : "Name", "Value" : { "Ref" : "AWS::StackName" }}
|
|
0 commit comments