Sign inSign up

harnessdev/aws-drone-plugin

By harnessdev

Updated about 2 years ago

Plugin enables support for AWS actions such as invoking Lambda, shrinking clusters and more.

Image
Developer tools
0

2.3K

harnessdev/aws-drone-plugin repository overview

What is the AWS Drone Plugin?

This plugin supports the migration of the following Spinnaker Stages to Harness:

  • Invoke Lambda Function
  • Deploy Lambda Function
  • Resize Server Group
  • Destroy Server Group
  • Enable Server Group
  • Shrink Cluster
  • Scale Down Cluster
  • Disable Cluster
  • Rollback Cluster
  • Find Image from Cluster
  • Lambda Update Code

This plugin is used to help support the Spinnaker to Harness Migrator.

This plugin is only supported for use with AWS.

The documentation is for the latest release/tag. For information on old releases, please release notes at the bottom of this page.

Supported Parameters

For each spinnaker stage, the following parameters are supported. Each parameter can be modified using an environment variable. For example to set the AWS access key you can use the following command where the migrator is run:

export AWS_ACCESS_KEY_ID="<AWS ACCESS KEY ID>"
Common Parameters

The following parameters are common to all actions:

  • AWS_ACCESS_KEY_ID: AWS access key ID
  • AWS_SECRET_ACCESS_KEY: AWS secret access key
  • AWS_REGION: AWS region
Action: Invoke Lambda
Parameters
  • FUNCTION_NAME: Name of the Lambda function to invoke
  • AWS_REGION: AWS region
  • PAYLOAD: Payload to send to the Lambda function
  • ALIAS: (Default: "$LATEST") Alias of the Lambda function
  • ACCOUNT_NAME: (Default: "default") Name of the AWS account
  • TIMEOUT: (Default: 10) Timeout for the Lambda function execution
  • EXECUTION_COUNT: (Default: 1) Number of times to execute the Lambda function
  • PAYLOAD_ENCODED: (Default: false) Whether the payload is base64 encoded
Action: Deploy Lambda
Parameters
  • FUNCTION_NAME: Name of the Lambda function to invoke
  • AWS_REGION: AWS region
  • ALIAS: (Default: "$LATEST") Alias of the Lambda function
  • ACCOUNT_NAME: (Default: "default") Name of the AWS account
  • S3_BUCKET: Name of the bucket where code.zip is stored
  • S3_KEY: Name of the code archive - eg code.zip
  • HANDLER: Name of the function to call on the function execution
  • ROLE: Execution role
  • RUNTIME: Runtime https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported
  • ENV_VAR: Environment variables
  • TAGS: Tags
  • DESCRIPTION: Description of the function
  • LAYERS: The resource ARNs for Lambda layer. Input the entire ARN.
  • MEMORY: (Default: 128MB) Function's allocated memory (MB)
  • TIMEOUT: (Default 120) The amount of seconds that Lambda allows a function to run before stopping it.
  • DLARN: ARN of dead letter queue configuration
  • SUBNET_IDS: Network subnets ids
  • SECURITY_GROUPS_IDS: Network security groups
Action: Resize Server Group
Parameters
  • CLUSTER_NAME: Name of the cluster to scale down
  • AWS_REGION: AWS region
  • TARGET: Cluster version that will be resized. (options: current_asg_dynamic, ancestor_asg_dynamic, oldest_asg_dynamic)
  • RESIZE_ACTION: Resize action to apply. (options: scale_up, scale_down, scale_to_cluster, scale_exact)
  • RESIZE_TYPE: Resize type to use in the scale calculation. (options: pct, incr, exact)
  • SCALE_PERCENTAGE: Percentage number to resize
  • SCALE_NUMBER: Incremental number to resize
  • TARGET_HEALTHY_PERCENTAGE: (Default: 100) Percentage to consider target healthy
  • CAPACITY_MIN: Exact capacity number in min
  • CAPACITY_MAX: Exact capacity number in max
  • CAPACITY_DESIRED: Exact capacity number in desired
Action: Destroy Server Group
Parameters
  • CLUSTER_NAME: Name of the cluster to destroy
  • AWS_REGION: AWS region
  • TARGET: Cluster version that will be destroyed. (options: current_asg_dynamic, ancestor_asg_dynamic, oldest_asg_dynamic)
Action: Enable Server Group
Parameters
  • CLUSTER_NAME: Name of the cluster to enable
  • AWS_REGION: AWS region
  • TARGET: Cluster version that will be enabled. (options: current_asg_dynamic, ancestor_asg_dynamic, oldest_asg_dynamic)
Action: Shrink Cluster
Parameters
  • CLUSTER_NAME: (Default: "shrinkservergroup-v000") Name of the cluster to shrink
  • AWS_REGION: (Default: "us-west-2") AWS region
  • ALLOW_DELETE_ACTIVE: (Default: true) Allow deletion of active instances
  • SHRINK_TO_SIZE: (Default: 1) Number of instances to shrink the cluster to
  • RETAIN_LARGER_OVER_NEWER: (Default: false) Whether to retain larger instances over newer ones
Action: Scale Down Cluster
Parameters
  • CLUSTER_NAME: Name of the cluster to scale down
  • AWS_REGION: AWS region
  • REMAINING_FULL_SIZE_SERVER_GROUPS: (Default: 1) Number of remaining full-size server groups
  • PREFER_LARGER_OVER_NEWER: (Default: false) Whether to prefer larger instances over newer ones
  • ALLOW_SCALE_DOWN_ACTIVE: (Default: false) Whether to allow scaling down active instances
Action: Disable Cluster
Parameters
  • CLUSTER_NAME: Name of the cluster to disable
  • AWS_REGION: AWS region
  • REMAINING_ENABLED_SERVER_GROUPS: (Default: 1) Number of remaining enabled server groups
  • PREFER_LARGER_OVER_NEWER: (Default: false) Whether to prefer larger instances over newer ones
Action: Rollback Cluster
Parameters
  • CLUSTER_NAME: Name of the cluster to rollback
  • AWS_REGION: AWS region
  • TARGET_HEALTHY_ROLLBACK_PERCENTAGE: (Default: 100) Percentage to consider a rollback healthy
Action: Find Image from Cluster
Parameters
  • CLUSTER_NAME: Name of the cluster to find image.
  • REGIONS: AWS regions to find image.
  • TARGET: Use to specify which image to retrieve based on certain criteria. (options: CURRENT, PREVIOUS, OLDEST, LARGEST, FAIL)
  • ONLY_ENABLED: Find enabled image only.
Action: Lambda Update Code
Parameters
  • FUNCTION_NAME: Name of the Lambda function to Update code
  • AWS_REGION: AWS region
  • S3_BUCKET: S3 bucket name (An Amazon S3 bucket in the same AWS Region as your function.)
  • S3_KEY: S3 key name (The Amazon S3 key of the deployment package.)
  • PUBLISH: (Default: false) Set to true to publish a new version of the function after updating the code.

Release Notes

Tag 0.1.4

Added support for the following Spinnaker stages:

  • Invoke Lambda Function
  • Deploy Lambda Function
  • Resize Server Group
  • Destroy Server Group
  • Enable Server Group
  • Shrink Cluster
  • Scale Down Cluster
  • Disable Cluster
  • Rollback Cluster
  • Find Image from Cluster
  • Lambda Update Code

Tag summary

Content type

Image

Digest

sha256:04fff044c

Size

536.4 MB

Last updated

about 2 years ago

docker pull harnessdev/aws-drone-plugin