Skip to content

A Wercker step to deploy applications with AWS Code Deploy

Notifications You must be signed in to change notification settings

jazzmind/wercker-aws-code-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wercker step for AWS Code Deploy

wercker status

This wercker step allows to deploy applications with AWS Code Deploy service.

Please read the AWS Code Deploy documentation and API before using this step.

The step install the AWS Cli through pip, if the CLI is not already installed.

AWS Code Deploy workflow

To deploy an application with AWS Code Deploy, the Wercker step follow this steps :

This initial step consists on configuring AWS.

The following configuration allows to setup this step :

  • key (required): AWS Access Key ID
  • secret (required): AWS Secret Access Key
  • region (optional): Default region name

This second step consists on defining the application. If the application does not exists this step create the application in Code Deploy.

The following configuration allows to setup this step :

  • application-name (required): Name of the application to deploy
  • application-version (optional): Version of the application to deploy. By default: Short commit id (eg. fec8f4a)

Step 3 : Defining Deployment Config (optional)

This step consists on creating a deployment config. This step is totally optional because you can use the deployment strategy already defined in Code Deploy.

The following configuration allows to setup this step :

  • deployment-config-name (optional): Deployment config name. By default : CodeDeployDefault.OneAtATime
  • minimum-healthy-hosts (optional): The minimum number of healthy instances during deployment. By default : type=FLEET_PERCENT,value=75

This step consists on defining a deployment group. If the deployment group provided does not exists this step create a deployment group in Code Deploy.

The following configuration allows to setup this step :

  • deployment-group-name (required): Deployment group name
  • service-role-arn (optional): Service role arn giving permissions to use Code Deploy when creating a deployment group
  • ec2-tag-filters (optional): EC2 tags to filter on when creating a deployment group
  • auto-scaling-groups (optional): Auto Scaling groups when creating a deployment group

Step 5 : Pushing to S3

This step consists to push the application to S3.

The following configuration allows to setup this step :

  • s3-bucket (required): S3 Bucket
  • s3-source (optional): S3 Source. By default : .
  • s3-key (optional): S3 Key. By default: {application-name}

This step consists to register the revision in Code Deploy.

The following configuration allows to setup this step :

  • revision (optional): Revision of the application to deploy. By default: {application-name}-{application-version}.zip
  • revision-description (optional): Description of the revision of the application to deploy

This final step consists to create the deployment in Code Deploy.

The following configuration allows to setup this step :

  • deployment-description (optional): Description of the deployment
  • deployment-overview (optional): Visualize the deployment. By default : true

Example

The following example deploy an hello application on the deployment group development after pushed the application on the apps.mycompany.com S3 bucket :

deploy:
  steps:
    - nhuray/aws-code-deploy:
       key: aws_access_key_id
       secret: aws_access_secret_id
       application-name: hello
       application-version: 1.1.0
       deployment-group-name: development
       service-role-arn: arn:aws:iam::89862646$091:role/CodeDeploy
       ec2-tag-filters: Key=app,Value=hello,Type=KEY_AND_VALUE Key=environment,Value=development,Type=KEY_AND_VALUE
       s3-bucket: apps.mycompany.com

About

A Wercker step to deploy applications with AWS Code Deploy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages