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.
To deploy an application with AWS Code Deploy, the Wercker step follow this steps :
Step 1 : Configuring AWS
This initial step consists on configuring AWS.
The following configuration allows to setup this step :
key
(required): AWS Access Key IDsecret
(required): AWS Secret Access Keyregion
(optional): Default region name
Step 2 : Defining Application
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 deployapplication-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.OneAtATimeminimum-healthy-hosts
(optional): The minimum number of healthy instances during deployment. By default : type=FLEET_PERCENT,value=75
Step 4 : Defining Deployment Group
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 nameservice-role-arn
(optional): Service role arn giving permissions to use Code Deploy when creating a deployment groupec2-tag-filters
(optional): EC2 tags to filter on when creating a deployment groupauto-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 Buckets3-source
(optional): S3 Source. By default : .s3-key
(optional): S3 Key. By default: {application-name}
Step 6 : Registering Revision
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}.ziprevision-description
(optional): Description of the revision of the application to deploy
Step 7 : Creating Deployment
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 deploymentdeployment-overview
(optional): Visualize the deployment. By default : true
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