@@ -1209,6 +1209,7 @@ def _odcr_azs(vpc_stack):
1209
1209
def scaling_odcr_stack (
1210
1210
request ,
1211
1211
region ,
1212
+ os ,
1212
1213
cfn_stacks_factory ,
1213
1214
vpc_stack : CfnVpcStack ,
1214
1215
):
@@ -1229,20 +1230,21 @@ def _scaling_odcr_stack(instances_count: int):
1229
1230
odcr_template .set_description ("ODCR stack to test scaling with special cases" )
1230
1231
default_public_az , availability_zone_1 , availability_zone_2 = _odcr_azs (vpc_stack ).values ()
1231
1232
1233
+ instance_platform = "Red Hat Enterprise Linux" if "rhel" in os else "Linux/UNIX"
1232
1234
first_odcr_instances_count = int (instances_count // 2 )
1233
1235
scaling_odcr_a = ec2 .CapacityReservation (
1234
1236
"integTestsScalingOdcrA" ,
1235
1237
AvailabilityZone = default_public_az ,
1236
1238
InstanceCount = first_odcr_instances_count ,
1237
- InstancePlatform = "Linux/UNIX" ,
1239
+ InstancePlatform = instance_platform ,
1238
1240
InstanceType = "c5.large" ,
1239
1241
InstanceMatchCriteria = "targeted" ,
1240
1242
)
1241
1243
scaling_odcr_b = ec2 .CapacityReservation (
1242
1244
"integTestsScalingOdcrB" ,
1243
1245
AvailabilityZone = default_public_az ,
1244
1246
InstanceCount = instances_count - first_odcr_instances_count ,
1245
- InstancePlatform = "Linux/UNIX" ,
1247
+ InstancePlatform = instance_platform ,
1246
1248
InstanceType = "c5.large" ,
1247
1249
InstanceMatchCriteria = "targeted" ,
1248
1250
)
@@ -1302,6 +1304,7 @@ def _scaling_odcr_stack(instances_count: int):
1302
1304
def odcr_stack (
1303
1305
request ,
1304
1306
region ,
1307
+ os ,
1305
1308
placement_group_stack ,
1306
1309
cfn_stacks_factory ,
1307
1310
vpc_stack : CfnVpcStack ,
@@ -1314,18 +1317,20 @@ def odcr_stack(
1314
1317
odcr_template .set_description ("ODCR stack to test open, targeted, and PG ODCRs" )
1315
1318
default_public_az , availability_zone_1 , availability_zone_2 = _odcr_azs (vpc_stack ).values ()
1316
1319
1320
+ instance_platform = "Red Hat Enterprise Linux" if "rhel" in os else "Linux/UNIX"
1321
+
1317
1322
open_odcr = ec2 .CapacityReservation (
1318
1323
"integTestsOpenOdcr" ,
1319
1324
AvailabilityZone = default_public_az ,
1320
1325
InstanceCount = 6 ,
1321
- InstancePlatform = "Linux/UNIX" ,
1326
+ InstancePlatform = instance_platform ,
1322
1327
InstanceType = "m5.2xlarge" ,
1323
1328
)
1324
1329
target_odcr = ec2 .CapacityReservation (
1325
1330
"integTestsTargetOdcr" ,
1326
1331
AvailabilityZone = default_public_az ,
1327
1332
InstanceCount = 6 ,
1328
- InstancePlatform = "Linux/UNIX" ,
1333
+ InstancePlatform = instance_platform ,
1329
1334
InstanceType = "r5.xlarge" ,
1330
1335
InstanceMatchCriteria = "targeted" ,
1331
1336
)
@@ -1334,7 +1339,7 @@ def odcr_stack(
1334
1339
"integTestsPgOdcr" ,
1335
1340
AvailabilityZone = default_public_az ,
1336
1341
InstanceCount = 3 ,
1337
- InstancePlatform = "Linux/UNIX" ,
1342
+ InstancePlatform = instance_platform ,
1338
1343
InstanceType = "m5.xlarge" ,
1339
1344
InstanceMatchCriteria = "targeted" ,
1340
1345
PlacementGroupArn = boto3 .resource ("ec2" ).PlacementGroup (pg_name ).group_arn ,
@@ -1383,15 +1388,15 @@ def odcr_stack(
1383
1388
"az1Odcr" ,
1384
1389
AvailabilityZone = availability_zone_1 ,
1385
1390
InstanceCount = 2 ,
1386
- InstancePlatform = "Linux/UNIX" ,
1391
+ InstancePlatform = instance_platform ,
1387
1392
InstanceMatchCriteria = "targeted" ,
1388
1393
InstanceType = "c5.xlarge" ,
1389
1394
)
1390
1395
az2_odcr = ec2 .CapacityReservation (
1391
1396
"az2Odcr" ,
1392
1397
AvailabilityZone = availability_zone_2 ,
1393
1398
InstanceCount = 2 ,
1394
- InstancePlatform = "Linux/UNIX" ,
1399
+ InstancePlatform = instance_platform ,
1395
1400
InstanceMatchCriteria = "targeted" ,
1396
1401
InstanceType = "c5.xlarge" ,
1397
1402
)
0 commit comments