Skip to content

Commit 9cf977f

Browse files
Enrico Usaisean-smith
authored andcommitted
Use optimal as default for awsbatch only and align documentation
Signed-off-by: Enrico Usai <[email protected]>
1 parent 42eabf6 commit 9cf977f

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

cli/pcluster/cfnconfig.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,9 @@ def __run_batch_validation(self, config):
524524
if config.has_option(self.__cluster_section, 'compute_instance_type'):
525525
compute_instance_type = config.get(self.__cluster_section, 'compute_instance_type')
526526
self.parameters['ComputeInstanceType'] = compute_instance_type
527+
else:
528+
# use 'optimal' as default for awsbatch
529+
self.parameters['ComputeInstanceType'] = 'optimal'
527530

528531
if config.has_option(self.__cluster_section, 'spot_bid_percentage'):
529532
spot_bid_percentage = config.get(self.__cluster_section, 'spot_bid_percentage')

cli/pcluster/examples/config

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ sanity_check = true
1111
# This is the AWS credentials section (required).
1212
# These settings apply to all clusters
1313
# replace these with your AWS keys
14-
# If not defined, boto will attempt to use a) enviornment
14+
# If not defined, boto will attempt to use a) environment
1515
# or b) EC2 IAM role.
1616
#aws_access_key_id = #your_aws_access_key_id
1717
#aws_secret_access_key = #your_secret_access_key
1818
# Uncomment to specify a different Amazon AWS region (OPTIONAL)
19-
# (Defaults to us-east-1 if not defined in enviornment or below)
19+
# (Defaults to us-east-1 if not defined in environment or below)
2020
#aws_region_name = #region
2121

2222
[aliases]
@@ -31,20 +31,20 @@ key_name = mykey
3131
# Override path to cloudformation in S3
3232
# (defaults to https://s3.amazonaws.com/<aws_region_name>-aws-parallelcluster/templates/aws-parallelcluster-<version>.cfn.json)
3333
#template_url = https://s3.amazonaws.com/<aws_region_name>-aws-parallelcluster/templates/aws-parallelcluster-<version>.cfn.json
34-
# Cluster Server EC2 instance type
35-
# (defaults to t2.micro for default template)
36-
#compute_instance_type = t2.micro
37-
# Master Server EC2 instance type
38-
# (defaults to t2.micro for default template
34+
# EC2 instance type for master node
35+
# (defaults to t2.micro)
3936
#master_instance_type = t2.micro
40-
# Inital number of EC2 instances to launch as compute nodes in the cluster for schedulers other than awsbatch.
41-
# (defaults to 2 for default template)
37+
# EC2 instance type for compute nodes
38+
# (defaults to t2.micro , 'optimal' when scheduler is awsbatch)
39+
#compute_instance_type = t2.micro
40+
# Initial number of EC2 instances to launch as compute nodes in the cluster for schedulers other than awsbatch.
41+
# (defaults to 2)
4242
#initial_queue_size = 2
4343
# Maximum number of EC2 instances that can be launched in the cluster for schedulers other than awsbatch.
44-
# (defaults to 10 for the default template)
44+
# (defaults to 10)
4545
#max_queue_size = 10
4646
# Boolean flag to set autoscaling group to maintain initial size and scale back for schedulers other than awsbatch.
47-
# (defaults to false for the default template)
47+
# (defaults to false)
4848
#maintain_initial_size = false
4949
# Minimum number of vcpus that will be running when scheduler is awsbatch.
5050
# defaults to 0
@@ -55,7 +55,7 @@ key_name = mykey
5555
# Maximum number of vcpus that can be launched when scheduler is awsbatch.
5656
#max_vcpus = 20
5757
# Cluster scheduler
58-
# (defaults to sge for the default template)
58+
# (defaults to sge)
5959
#scheduler = sge
6060
# Type of cluster to launch i.e. ondemand or spot
6161
# (defaults to ondemand for the default template)
@@ -111,7 +111,7 @@ key_name = mykey
111111
# OS type used in the cluster
112112
# (defaults to alinux in the default template)
113113
#base_os = alinux
114-
# Existing EC2 IAM role to be assosiated with the EC2 instances
114+
# Existing EC2 IAM role to be associated with the EC2 instances
115115
# (defaults to NONE in the default template)
116116
#ec2_iam_role = NONE
117117
# Extra Json to be merged with the dna.json used by Chef
@@ -164,18 +164,18 @@ master_subnet_id = subnet-
164164
# Path/mountpoint for shared EBS volume. REQUIRED when using > 1 EBS volumes. Example below mounts to /vol1
165165
#shared_dir = vol1
166166
# Id of EBS snapshot if using snapshot as source for volume
167-
# (defaults to NONE for default template)
167+
# (defaults to NONE)
168168
#ebs_snapshot_id = snap-
169169
# Type of volume to create either new or from snapshot
170-
# (defaults to gp2 for default template)
170+
# (defaults to gp2)
171171
#volume_type = io1
172172
# Size of volume to be created if not using a snapshot
173-
# (defaults to 20GB for default template)
173+
# (defaults to 20GB)
174174
#volume_size = 20
175175
# Number of IOPS for io1 type volumes
176176
#volume_iops = 200
177177
# Use encrypted volume (should not be used with snapshots)
178-
# (defaults to false for default template)
178+
# (defaults to false)
179179
#encrypted = false
180180
# Existing EBS volume to be attached to the MasterServer
181181
# (defaults to NONE in the default template)

cloudformation/aws-parallelcluster.cfn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@
682682
"ComputeInstanceType": {
683683
"Description": "ComputeFleet EC2 instance type",
684684
"Type": "String",
685-
"Default": "c4.large",
685+
"Default": "t2.micro",
686686
"ConstraintDescription": "Must be a valid EC2 instance type, with support for HVM."
687687
},
688688
"MinSize": {

docs/source/configuration.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,17 @@ compute_instance_type
105105
"""""""""""""""""""""
106106
The EC2 instance type used for the cluster compute nodes.
107107

108-
Defaults to c4.large for default template. ::
108+
If you're using awsbatch, please refer to the Compute Environments creation in the AWS Batch UI for the list of the supported instance types.
109109

110-
compute_instance_type = c4.large
110+
Defaults to t2.micro, ``optimal`` when scheduler is awsbatch ::
111+
112+
compute_instance_type = t2.micro
111113

112114
master_instance_type
113115
""""""""""""""""""""
114116
The EC2 instance type use for the master node.
115117

116-
This defaults to t2.micro for default template. ::
118+
This defaults to t2.micro. ::
117119

118120
master_instance_type = t2.micro
119121

@@ -123,7 +125,7 @@ The initial number of EC2 instances to launch as compute nodes in the cluster fo
123125

124126
If you're using awsbatch, use :ref:`min_vcpus <min_vcpus>`.
125127

126-
The default is 2 for default template. ::
128+
The default is 2. ::
127129

128130
initial_queue_size = 2
129131

@@ -542,23 +544,23 @@ ebs_snapshot_id
542544
"""""""""""""""
543545
Id of EBS snapshot if using snapshot as source for volume.
544546

545-
Defaults to NONE for default template. ::
547+
Defaults to NONE. ::
546548

547549
ebs_snapshot_id = snap-xxxxx
548550

549551
volume_type
550552
"""""""""""
551553
The `API name <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html>`_ for the type of volume you wish to launch.
552554

553-
Defaults to gp2 for default template. ::
555+
Defaults to gp2. ::
554556

555557
volume_type = io1
556558

557559
volume_size
558560
"""""""""""
559561
Size of volume to be created (if not using a snapshot).
560562

561-
Defaults to 20GB for default template. ::
563+
Defaults to 20GB. ::
562564

563565
volume_size = 20
564566

@@ -572,15 +574,15 @@ encrypted
572574
"""""""""
573575
Whether or not the volume should be encrypted (should not be used with snapshots).
574576

575-
Defaults to false for default template. ::
577+
Defaults to false. ::
576578

577579
encrypted = false
578580

579581
ebs_volume_id
580582
"""""""""""""
581583
EBS Volume Id of an existing volume that will be attached to the MasterServer.
582584

583-
Defaults to NONE for default template. ::
585+
Defaults to NONE. ::
584586

585587
ebs_volume_id = vol-xxxxxx
586588

@@ -622,7 +624,7 @@ The following allows a maximum of 40 concurrent vcpus, and scales down to zero w
622624

623625
[cluster awsbatch]
624626
scheduler = awsbatch
625-
compute_instance_type = optimal # optional, defaults to c4.large
627+
compute_instance_type = optimal # optional, defaults to optimal
626628
min_vcpus = 0 # optional, defaults to 0
627629
desired_vcpus = 0 # optional, defaults to 4
628630
max_vcpus = 40 # optional, defaults to 20

0 commit comments

Comments
 (0)