Introduction to AWS CodeDeploy

Updated 18 July 2017

AWS CodeDeploy can be used to automate application deployments to the Amazon EC2 instances or the on-premises instances in our data-centers. AWS CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes to your existing code before you can use AWS CodeDeploy.

AWS CodeDeploy makes it easier to rapidly release new features, helps to avoid downtime during application deployment, and handles the complexity of updating the applications, without many of the risks associated with error-prone manual deployments. The CodeDeploy  service scales with the infrastructure and allows to easily deploy to one instance or thousands of instances.

 

Benefits of AWS CodeDeploy:

 

  • Automated Deployment : You can consistently deploy your application across your development, test, and production environments on any instance, whether running in the cloud or on-premises.
  • Minimize downtime : It performs rolling updates across your instances and tracks application health according to configurable rules. Code deployments can easily be stopped and rolled back if there are errors.
  • Centralized Control : AWS CodeDeploy allows you to easily launch and track the status of your application deployments through the AWS Management Console or the AWS CLI.
  • Easy to adopt : AWS CodeDeploy is platform and language independent and works with any application. CodeDeploy can also integrate with your existing software release process or continuous delivery toolchain (e.g., Jenkins)

 

AWS Deployment Types:

 

In-Place Deployment : In this type of deployment, the application running on each instance in deployment group is stopped, updated with the latest code and finally started and verified. In this process, a load balancer can also be used to deregister each instance during deployment, and then restore the service again after deployment is completed.

Blue/Green Deployment : In this type of deployment, the each instance of the original environment is replaced by a different set of instances called the replacement environment. In the process, the instances in the replacement group are prepared and updated with the latest code, tested, verified and finally registered with the ELB. The instances in the original environment are deregistered and either terminated or kept for further use.

 

Deployment Components :

 

The below diagram shows the various components in AWS CodeDeploy and how they interact with one another.

 

 

 

Deployment Work-flow :

 

The below diagram shows the various steps involved in the deployment of code revision in AWS CodeDeploy.

 

  1. Create an “application” which will uniquely identify the application you want to deploy by specifying a unique name. It acts as a container, to ensure the correct combination of revision, deployment configuration, and deployment group are referenced during a deployment.
  2. Setup a deployment group by specifying the instances to which you want to deploy your application revisions and a deployment type i.e in-place or blue/green deployment .
  3. Specify a deployment configuration by specifying the number of instances to simultaneously deploy application revisions and describing the success and failure conditions for the deployment.
  4. Upload your application revision to Amazon S3 or GitHub. In addition to the application files for deployment and scripts that you want to run during the deployment, you must also include an application specification file called AppSpec file, which contains deployment instructions such as where to copy the files on to each instance and at what point of time to run deployment scripts.
  5. Deploy your application revision to the deployment group. CodeDeploy agent on each participating instance in the deployment group copies the application revision from Amazon S3 or GitHub to the instance. The AWS CodeDeploy agent then unbundles the revision, and using the AppSpec file, copies the files into the specified locations and executes any deployment scripts.
  6. Checking the deployment results and verifying if the deployment is successful or failed due to some errors.
  7. Configure event-driven triggers to receive SMS or email notifications about deployment and instance events, such as success or failure.

 

The above steps are involved in deploying the Application code using AWS CodeDeploy. However, in the next tutorial, we will learn how to practically deploy our code using AWS CodeDeploy Service.

 

Thanks for the time… Happy Computing!!!

 

In case of any help or query, please contact us.

Category(s) AWS cloud Uncategorized
author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Start a Project




    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home