-1

We have multiple amazon ec2 instances behind a load balancer. Our build script is written in phing and is integrated with git.

We are looking for a tool (like Jenkins or Amazon code deploy) which could display all the active instances currently behind load balancer and then allow us to select some of them (or select a group defined previously) and then trigger either of the following (whichever is better) -

  • a build script hosted on the same dedicated server where the tool is hosted.

  • or the respective build scripts hosted on the selected ec2 instances.

We should be able to do the following -

  • specify a git branch name, optionally, when we trigger the build script for any group of instances.

  • be able to roll out in batches of boxes, so as to get some time to monitor load, and then move to next batch if all is good. Best way, I guess, would be to specify a size of the batch (e.g. 10), so that the process waits for a user prompt after rollout on every batch completes.

So, if we have to rollout two different git branches to two groups of instances, we should be able to run them in two steps (if we do not specify batch size).

Would like to know about experiences of people who dealt with something similar.

Sandeepan Nath
  • 9,966
  • 17
  • 86
  • 144
  • @Downvoter, care to explain? Honestly, I sometimes find it so difficult to gain knowledge, being scared of getting downvoted. I have so many questions to ask but can't ask here, and there are not enough people to answer on quora, and they also have put this limit on the length of the question body. – Sandeepan Nath May 24 '16 at 08:02

2 Answers2

1

For CodeDeploy, it supports Git (more precisely, GitHub). It also allows you to deploy only to tagged EC2 instances. If combined with custom DeploymentConfig (http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-create-deployment-configuration.html), you can also control how fast (the size of the batch) to deploy.

  • I could not still understand how easy it would be to maintain different git branches in some subsets of EC2 instances. I have a build script written in phing which is integrated with git and can rollout a given git branch to an instance. I would like to use the appropriate tool to trigger this script to rollout the branch I want to specific instances. AWS codedeploy looks like the closest to what I am looking for. Does it come under the free tier services? – Sandeepan Nath May 19 '16 at 11:58
  • 1
    CodeDeploy is free. The instances and other resources it launches/consumes aren't. – user6341641 May 23 '16 at 17:55
0

I would re-structure the question:

The choices you have for application deployment and whether the tool has option to perform rolling deployments.

Jenkins is software for CI/CD, which will have to use plugins,custom scripting or leverage an existing orchestration software setup for doing the deployments.

For software orchestration, you have many choices, some of the more famous tools are Chef, puppet, ansible etc.. All of these would need you to manage some kind of centralized setup. All such software support application deployment.

You need to make a decision on whether you would want to invest in maintaining such a setup.

If you decide against such a setup, you have the option of using managed services such as AWS OpsWorks, AWS CodeDeploy, hosted chef etc. In choosing any of these services, you delegate the management of orchestration software to a vendor, which will ensure the service is up all the time.

AWS code deploy and AWS OpsWorks are managed services on aws and work pretty well on AWS setups. AWS OpsWorks uses chef under the hood.

AWS CodeDeploy only provides a subset of what OpsWorks provides and is responsible only for deployments. With AWS code deploy you get convenient visualization of your software deployments through AWS console.

With AWS code deploy, you can achieve the goal of partial roll out to ec2 instances. You can do the same with other tools as well but CodeDeploy on AWS environment will take least amount of work. CodeDeploy also allows you to deploy from GIT. Please refer to the following aws documentation http://docs.aws.amazon.com/codedeploy/latest/userguide/github-integ-tutorial.html

The pitfall with code deploy is the fact that the agent that will run on instances has been tested for and is supported for only a limited number of OS combinations.(http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-run-agent.html#how-to-run-agent-supported-oses) Also in future if you decide to move away from AWS, you will have to redo the deployment related work.

CodeDeploy service only charges you for the underneath AWS resources. Please find the link to pricing documentation below: https://aws.amazon.com/codedeploy/pricing/

Shibashis
  • 8,023
  • 3
  • 27
  • 38
  • Thanks for answering. I wanted to see a demo of the interface to select the instances. Do you have an idea if I could do a test setup using the free tier facilities? I am still a beginner with AWS and have been confused with the scope of the resources made available under free tier. – Sandeepan Nath May 19 '16 at 07:31
  • So if you only use micro instances and you are under free tier you will be not charged. If you use an elb, there will a minimal hourly charge. – Shibashis May 19 '16 at 13:30
  • Yo will get flexibility on which branch of your code you want to deploy – Shibashis May 19 '16 at 13:31
  • Just to update, I came to know that using Amazon codedeploy as such does not involve any charges. But the appspec file needs to be hosted in S3, which involves some minimal charges (for storage/upload/download). – Sandeepan Nath May 19 '16 at 13:59
  • I updated the pricing link in the answer above. You will also incur hourly elb cost – Shibashis May 19 '16 at 14:03