Skip to content

Conversation

@hanwen-pcluste
Copy link
Contributor

@hanwen-pcluste hanwen-pcluste commented Nov 20, 2020

When running pcluster in a region with free tier, default instance type is set to the free tier instance type. When running pcluster in the China (BJS) region or AWS GovCloud (US) regions, default instance type is t3.micro.
Free tier is not available in the China (BJS) region and AWS GovCloud (US) regions.
For more information about free tier, please see https://aws.amazon.com/free/free-tier-faqs/

Signed-off-by: Hanwen hanwenli@amazon.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hanwen-pcluste hanwen-pcluste marked this pull request as draft November 20, 2020 00:03
@hanwen-pcluste hanwen-pcluste marked this pull request as ready for review November 20, 2020 00:03
@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #2254 (73b7b14) into develop (c96d01b) will increase coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2254      +/-   ##
===========================================
+ Coverage    61.97%   62.12%   +0.14%     
===========================================
  Files           40       40              
  Lines         6123     6149      +26     
===========================================
+ Hits          3795     3820      +25     
- Misses        2328     2329       +1     
Impacted Files Coverage Δ
cli/src/pcluster/config/mappings.py 100.00% <ø> (ø)
cli/src/pcluster/createami.py 35.87% <ø> (-0.13%) ⬇️
cli/src/pcluster/config/cfn_param_types.py 93.07% <100.00%> (+0.12%) ⬆️
cli/src/pcluster/config/param_types.py 95.98% <100.00%> (-0.72%) ⬇️
cli/src/pcluster/configure/easyconfig.py 87.55% <100.00%> (+0.36%) ⬆️
cli/src/pcluster/utils.py 67.15% <100.00%> (+0.60%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c96d01b...73b7b14. Read the comment docs.

@hanwen-pcluste hanwen-pcluste force-pushed the defaultinstancetype branch 8 times, most recently from 7148aa1 to 3a66c3e Compare November 24, 2020 18:30
@hanwen-pcluste hanwen-pcluste force-pushed the defaultinstancetype branch 2 times, most recently from 9d90125 to 71ee72d Compare November 25, 2020 20:28
Copy link
Contributor

@ddeidda ddeidda left a comment

Choose a reason for hiding this comment

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

We are close! Let's talk about the few open points 👍


def refresh(self):
"""Get default value from a boto3 call for free tier instance type."""
if not self.value:
Copy link
Contributor

Choose a reason for hiding this comment

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

What about a shorter syntax like this:

self.value = get_default_instance_type() if pcluster_config.get_section("cluster").get_param_value("scheduler") != "awsbatch" else "optimal"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@hanwen-pcluste hanwen-pcluste force-pushed the defaultinstancetype branch 4 times, most recently from a29b46a to 0bba355 Compare December 1, 2020 18:16
When running pcluster in a region with free tier, default instance type is set to the free tier instance type. When running pcluster in the China (BJS) region or AWS GovCloud (US) regions, default instance type is t3.micro.
Free tier is not available in the China (BJS) region and AWS GovCloud (US) regions.
For more information about free tier, please see https://aws.amazon.com/free/free-tier-faqs/

Signed-off-by: Hanwen <hanwenli@amazon.com>
@hanwen-pcluste hanwen-pcluste force-pushed the defaultinstancetype branch 2 times, most recently from 92f1e32 to 672e15a Compare December 2, 2020 14:53
…into defaultinstancetype

� Conflicts:
�	CHANGELOG.md
�	cli/src/pcluster/config/mappings.py
�	cli/src/pcluster/configure/easyconfig.py
�	cli/src/pcluster/examples/config
�	tests/integration-tests/tests/configure/test_pcluster_configure.py

Signed-off-by: Hanwen <hanwenli@amazon.com>
@hanwen-pcluste hanwen-pcluste merged commit 2dc01d0 into aws:develop Dec 2, 2020
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.

4 participants