Skip to content

Commit

Permalink
"Create Azure Stateful Node by Importing VM" support (#15)
Browse files Browse the repository at this point in the history
* Draft import flow with example added

* ansible-lint fixes

* Update Changelog.rst

* Review comment fixes, Updating example and Version Bump.

* Adding "execution-environment.yml"

* Bump python version used for CI Environment

* Correcting Python Version
  • Loading branch information
anuragsharma-123 authored Jul 17, 2023
1 parent 52905f3 commit ea26112
Show file tree
Hide file tree
Showing 42 changed files with 1,157 additions and 995 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
with:
# it is just required to run that once as "ansible-test units" in the docker image
# will run on all python versions it supports.
python-version: 3.9
python-version: 3.10.12

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,12 @@ New Modules
-----------

- spot.cloud_modules.azure_elastigroup - Manage (Create, Update, Delete) Azure Elastigroups


v1.3.0
======

Release Summary
---------------

Adding support to create Azure Stateful Node by Importing an Azure VM.
60 changes: 35 additions & 25 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,55 @@
ancestor: null
releases:
1.3.0:
changes:
release_summary: Adding ability to create Azure Stateful Node by importing a VM.
fragments:
- 1-3-0-summary.yml
modules:
- description: Create, update, delete or Import Spot Azure Stateful Nodes
name: azure_stateful_node
namespace: ''
release_date: '2023-07-12'
1.2.0:
changes:
release_summary: Adding Azure Elastigroups support in spot.cloud_modules collection.
fragments:
- 1-2-0-summary.yml
- 1-2-0-summary.yml
modules:
- description: Create, update or delete Spot Azure Elastigroups
name: azure_elastigroup
namespace: ''
- description: Create, update or delete Spot Azure Elastigroups
name: azure_elastigroup
namespace: ''
release_date: '2023-03-30'
1.1.0:
changes:
release_summary: Adding Azure Stateful Node support in spot.cloud_modules collection.
fragments:
- 1-1-0-summary.yml
- 1-1-0-summary.yml
modules:
- description: Create, update or delete Spot Azure Stateful Nodes
name: azure_stateful_node
namespace: ''
- description: Create, update or delete Spot Azure Stateful Nodes
name: azure_stateful_node
namespace: ''
release_date: '2023-03-29'
1.0.0:
changes:
release_summary: New collection - adding all existing modules.
fragments:
- 1-0-0-summary.yml
- 3641626-adjust-tests.yml
- 1-0-0-summary.yml
- 3641626-adjust-tests.yml
modules:
- description: Manage (Create, Update, Delete) Spot AWS Elastigroups
name: aws_elastigroup
namespace: ''
- description: Create, update or delete Spot AWS Managed Instances
name: aws_managed_instance
namespace: ''
- description: Create, update or delete Spot MRScaler
name: aws_mrscaler
namespace: ''
- description: Create, update or delete Spot Ocean K8s
name: aws_ocean_k8s
namespace: ''
- description: Create event subscription for resource
name: event_subscription
namespace: ''
- description: Manage (Create, Update, Delete) Spot AWS Elastigroups
name: aws_elastigroup
namespace: ''
- description: Create, update or delete Spot AWS Managed Instances
name: aws_managed_instance
namespace: ''
- description: Create, update or delete Spot MRScaler
name: aws_mrscaler
namespace: ''
- description: Create, update or delete Spot Ocean K8s
name: aws_ocean_k8s
namespace: ''
- description: Create event subscription for resource
name: event_subscription
namespace: ''
release_date: '2021-12-14'
32 changes: 16 additions & 16 deletions changelogs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ prelude_section_name: release_summary
prelude_section_title: Release Summary
sanitize_changelog: true
sections:
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
title: Spot Cloud Modules
trivial_section_name: trivial
use_fqcn: true
6 changes: 3 additions & 3 deletions docs/examples/elastigroup/azure-elastigroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
health_check_types: ["vmState"]
auto_healing: false
grace_period: 300
unhealthy_duration: 120
unhealthy_duration: 120
scheduling:
tasks:
- is_enabled: true
Expand All @@ -38,12 +38,12 @@
- timeout: 180
type: "vmReady"
- timeout: 210
type: "vmReadyToShutdown"
type: "vmReadyToShutdown"
compute:
os: "Linux"
zones: ["1", "2", "3"]
preferred_zones: ["1", "2"]
vm_sizes:
vm_sizes:
od_sizes: ["standard_ds1_v2", "standard_ds2_v2"]
spot_sizes: ["standard_ds1_v2", "standard_ds2_v2"]
preferred_spot_sizes: ["standard_ds1_v2"]
Expand Down
180 changes: 90 additions & 90 deletions docs/examples/elastigroup/elastigroup-additional-configurations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,94 @@
tasks:
- name: create elastigroup
spot.cloud_modules.aws_elastigroup:
name: ansible_test_group
state: present
risk: 100
availability_vs_cost: balanced
availability_zones:
- name: us-east-2c
subnet_id: subnet-123c
- name: us-east-2b
subnet_id: subnet-123b
- name: us-east-2a
subnet_id: subnet-123a
image_id: test-ami
key_pair: test-key-pair
max_size: 2
min_size: 0
target: 0
unit: instance
monitoring: False
on_demand_instance_type: m4.large
product: Linux/UNIX
user_data: IyEvdXNyL2Jpbi9lbnYgYmFzaA==
shutdown_script: IyEvdXNyL2Jpbi9lbnYgYmFzaA==
target_tracking_policies:
- policy_name: test-target-tracking-1
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
target: 50
cooldown: 120
source: cloudWatch
up_scaling_policies:
- policy_name: test-scaling-policies-1
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
cooldown: 120
threshold: 50
source: cloudWatch
dimensions:
- name: InstanceId
evaluation_periods: 5
period: 300
action_type: adjustment
adjustment: 1
- policy_name: test-scaling-policies-2
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
cooldown: 120
threshold: 50
source: cloudWatch
dimensions:
- name: InstanceType
evaluation_periods: 5
period: 300
action_type: updateCapacity
target: 10
maximum: 15
minimum: 5
down_scaling_policies:
- policy_name: test-scaling-policies-1
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
cooldown: 120
threshold: 50
source: cloudWatch
dimensions:
- name: InstanceId
evaluation_periods: 5
period: 300
action_type: percentageAdjustment
adjustment: 20
tags:
- Name: ansible_test_group
- Environment: dev
security_group_ids:
- sg-default
spot_instance_types:
- m4.xlarge
- m5.xlarge
do_not_update:
- image_id
- target
- user_data
name: ansible_test_group
state: present
risk: 100
availability_vs_cost: balanced
availability_zones:
- name: us-east-2c
subnet_id: subnet-123c
- name: us-east-2b
subnet_id: subnet-123b
- name: us-east-2a
subnet_id: subnet-123a
image_id: test-ami
key_pair: test-key-pair
max_size: 2
min_size: 0
target: 0
unit: instance
monitoring: false
on_demand_instance_type: m4.large
product: Linux/UNIX
user_data: IyEvdXNyL2Jpbi9lbnYgYmFzaA==
shutdown_script: IyEvdXNyL2Jpbi9lbnYgYmFzaA==
target_tracking_policies:
- policy_name: test-target-tracking-1
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
target: 50
cooldown: 120
source: cloudWatch
up_scaling_policies:
- policy_name: test-scaling-policies-1
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
cooldown: 120
threshold: 50
source: cloudWatch
dimensions:
- name: InstanceId
evaluation_periods: 5
period: 300
action_type: adjustment
adjustment: 1
- policy_name: test-scaling-policies-2
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
cooldown: 120
threshold: 50
source: cloudWatch
dimensions:
- name: InstanceType
evaluation_periods: 5
period: 300
action_type: updateCapacity
target: 10
maximum: 15
minimum: 5
down_scaling_policies:
- policy_name: test-scaling-policies-1
namespace: AWS/EC2
metric_name: CPUUtilization
statistic: average
unit: percent
cooldown: 120
threshold: 50
source: cloudWatch
dimensions:
- name: InstanceId
evaluation_periods: 5
period: 300
action_type: percentageAdjustment
adjustment: 20
tags:
- Name: ansible_test_group
- Environment: dev
security_group_ids:
- sg-default
spot_instance_types:
- m4.xlarge
- m5.xlarge
do_not_update:
- image_id
- target
- user_data
register: result
- debug: var=result
- debug: var=result
Loading

0 comments on commit ea26112

Please sign in to comment.