forked from LeanerCloud/AutoSpotting
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/ec2 fleet integration (LeanerCloud#471)
* Carve instanceManager from instances.go into instance_manager.go * Move instanceManager tests to instance_manager_test.go * Move read-only instance query functions to instance_queries.go * Move additional code to instance_queries.go and instance_queries_test.go * Move OD->Spot conversion helpers to instance_conversion.go and instance_actions.go * Fix linter issues in autoscaling_test.go * Fix linter issues in mock_test.go * Fix linter issues in region.go and spot_price.go * Convert RunInstances to instant EC2 Fleet API call - This allows us to implement support for allocation strategies, currently hardcoded to capacity-optimized-prioritized, but later it could be made configurable. - It requires the use of a temporary LaunchTemplate, which is created based on the data previously passed to the RunInstances API call and deleted immediately after the EC2 fleet API call. * Convert tests for createRunInstancesInput to createLaunchTemplateData * Small log message fix * Add additional EC2 mocks * Implement support for configurable Spot allocation strategies - Added global config with per-ASG tag overrides - Extended unit test coverage for the new logic - Improved tests for reading other configurations from tags - Added unit tests for EBS block device conversion logic - Converted PatchBeanstalkUserdata config flag to bool value * Move small utility functions to util.go * Fix codeclimate issue * Extract complex if condition into its own function, pass instance type information by reference * Further simplifications for codeclimate * Use latest version of golang and build for amd64 * Expose spot_allocation_strategy on CloudFormation * Ensure the AMI ID comes from the LaunchConfiguration/Template * Add required IAM permissions * Set priority for capacity-optimized-prioritized * Pass missing LaunchTemplate fields, such as UserData and KeyName * Expand test coverage * Document the capacity-optimized prioritized * Small readme changes
- Loading branch information
Showing
28 changed files
with
5,489 additions
and
3,915 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.16-alpine | ||
FROM golang:alpine | ||
|
||
ARG flavor | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.