Posts

Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 5)

Image
Create a source bundle, which includes the deployment scripts, and upload it to AWS CodeCommit repository Now you can download the following sample bundle to your local repository and push the change to the central repository along with your application code hosted on AWS CodeCommit. The sample bundle includes everything you need to work AWS CodeDeploy: the Application Specification (AppSpec) file and deployment scripts. http://s3.amazonaws.com/aws-codedeploy-us-east-1/samples/latest/SampleApp_ELB_Integration.zip This sample bundle contains the deployment artifacts and a set of scripts that call the AutoScaling EnterStandby and ExitStandby APIs to do both the registration and deregistration of an Amazon EC2 instance from the load balancer. The installation scripts and deployment artifacts are bundled together with a CodeDeploy AppSpec file. The AppSpec file must be placed in the root of your sourcerepository and describes where to copy the application and how to execute installation sc…

Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 4)

Image
Use AWS CodeDeploy to Deploy  Amazon EC2 Instances Behind an Elastic Load Balancer and Auto Scaling Let’s assume you have an application architecture designed for high availability that includes an Elastic Load Balancer in front of multiple application servers belonging to an Auto Scaling Group. Elastic Load Balancing enables you to distribute incoming traffic over multiple servers and Auto Scaling allows you to scale your EC2 capacity up or down automatically according to your needs In this blog post, we will show how you can use CodeDeploy to avoid downtime when updating the code running on your application servers in such an environment. We will use the CodeDeploy rolling updates feature so that there is a minimum capacity always available to serve traffic and use a simple script to take EC2 instances out of the load balancer as and when we deploy new code on it. So let’s get started. We are going to: Set up the environment with Elastic Load Balancer and Auto Scaling GroupSet up the…

Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 3)

Image
AWS CodeDeploy AWS CodeDeploy coordinates application deployments to Amazon EC2 instances, on-premises instances, or both. (On-premises instances are physical devices that are not Amazon EC2 instances.) An application can contain deployable content like code, web, and configuration files, executables, packages, scripts, and so on. AWS CodeDeploy deploys applications from Amazon S3 buckets and GitHub repositories. You do not need to make changes to your existing code to use AWS CodeDeploy. You can use AWS CodeDeploy to control the pace of deployment across Amazon EC2 instances and to define the actions to be taken at each stage. AWS CodeDeploy works with various systems for configuration management, source control, continuous integration, continuous delivery, and continuous deployment. AWS CodeDeploy offers these benefits: Automated deployments: AWS CodeDeploy fully automates your application deployments across your development, test, and production environments. AWS CodeDeploy scales w…

Continuous Deployment : Using AWS Code Commit, AWS Code Deploy and Jenkins (Part 2)

Image
Jenkins Server Jenkins is an open source automation server. With Jenkins, organizations can accelerate the software development process through automation. Jenkins manages and controls development lifecycle processes of all kinds, including build, document, test, package, stage, deployment, static analysis and many more. You can set up Jenkins to watch for any code changes in places like SVN and Git, automatically do a build with tools like Ant and Maven, initiate tests and then take actions like rolling back or rolling forward in production. Set Up the Jenkins Server Create an instance using the Amazon Linux AMI. Make sure you associate the instance with the CodeCommitRole role (Created in previous step) and configure the security group associated with the instance to allow incoming traffic on ports 22 (SSH) and 8080 (Jenkins). You may further secure your server by restricting access to only the IP addresses of local development environment connecting to Jenkins Use SSH to connect t…