Skip to content

Chaos Engineering - EC2 control plugin for Arcaflow

License

Notifications You must be signed in to change notification settings

arcalot/arcaflow-plugin-aws-ec2-control

Repository files navigation

Python Plugin AWS EC2 Plugin

BE CAREFUL WITH AWS CREDENTIALS

This is a simple plugin that allows you to input your EC2 instance ID, the power action you want to do, and your AWS creds, to control the EC2 instance.

The valid actions are:

  • stop
  • force_stop
  • start
  • reboot
  • terminate

Examples are in the input folder.

Unit Tests

After installing the poetry dependencies, run all unit tests via:

# Run all unit tests
python -m unittest tests.test_ec2_plugin

Image Building

You can change this plugin's image version tag in .github/workflows/carpenter.yaml by editing the IMAGE_TAG variable, and pushing that change to the branch designated in that workflow.

Autogenerated Input/Output Documentation by Arcaflow-Docsgen Below

Run AWs ec2 action (aws-ec2-action)

Runs AWS EC2 actions

Input

Type:scope
Root object:NodeActionParams
Properties
action (enum[string])
Name:action
Description:The action to execute.
Required:Yes
Type:enum[string]
Values
  • force_stop: FORCE_STOP
  • reboot: REBOOT
  • start: START
  • stop: STOP
  • terminate: TERMINATE
aws_access_key_id (string)
Name:aws_access_public_key
Description:The AWS public key/key id.
Required:Yes
Type:string
aws_access_private_key (string)
Name:aws_access_private_key
Description:The AWS private/access key.
Required:Yes
Type:string
aws_region (string)
Name:aws_region
Description:The AWS region the instance is in.
Required:Yes
Type:string
instance_id (string)
Name:addr
Description:The AWS instance ID.
Required:Yes
Type:string
wait (bool)
Name:wait
Description:Whether to wait for it to complete its action.
Required:Yes
Type:bool
wait_timeout (int)
Name:wait_timeout
Description:The amount of time in seconds to spend waiting for the desired state.
Required:No
Default (JSON encoded):
30
Type:int
Objects
NodeActionParams (object)
Type:object
Properties
action (enum[string])
Name:action
Description:The action to execute.
Required:Yes
Type:enum[string]
Values
  • force_stop: FORCE_STOP
  • reboot: REBOOT
  • start: START
  • stop: STOP
  • terminate: TERMINATE
aws_access_key_id (string)
Name:aws_access_public_key
Description:The AWS public key/key id.
Required:Yes
Type:string
aws_access_private_key (string)
Name:aws_access_private_key
Description:The AWS private/access key.
Required:Yes
Type:string
aws_region (string)
Name:aws_region
Description:The AWS region the instance is in.
Required:Yes
Type:string
instance_id (string)
Name:addr
Description:The AWS instance ID.
Required:Yes
Type:string
wait (bool)
Name:wait
Description:Whether to wait for it to complete its action.
Required:Yes
Type:bool
wait_timeout (int)
Name:wait_timeout
Description:The amount of time in seconds to spend waiting for the desired state.
Required:No
Default (JSON encoded):
30
Type:int

Outputs

error

Type:scope
Root object:ErrorOutput
Properties
error (string)
Name:Error
Description:An explanation why the execution failed.
Required:Yes
Type:string
Objects
ErrorOutput (object)
Type:object
Properties
error (string)
Name:Error
Description:An explanation why the execution failed.
Required:Yes
Type:string

success

Type:scope
Root object:SuccessOutput
Properties
final_power_state_on (bool)
Required:Yes
Type:bool
ms_duration (int)
Required:Yes
Type:int
Objects
SuccessOutput (object)
Type:object
Properties
final_power_state_on (bool)
Required:Yes
Type:bool
ms_duration (int)
Required:Yes
Type:int

About

Chaos Engineering - EC2 control plugin for Arcaflow

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published