0

Suppose we already have:

  1. Existing infrastructure with few instances in a load balancer
  2. Existing github account and application already deployed in the instances

How can I achieve following using aws code-deploy?

We have multiple commits since last pull to production servers, how can we achieve git pull on production multiple instances using code-deploy.

  1. Pull out an instance from load balancer
  2. git pull
  3. restart/reload server
  4. instance Add instance again to the load balancer

Kindly suggest.

Thanks in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Prabhath Kota
  • 93
  • 1
  • 7

1 Answers1

1

CodeDeploy gives you the option for deploying an application directly from Github.

If you need to build your code before deploying or you are not willing to introduce appspec file in the github repo, you can create a different deployable bundle and put all the commands to pull / build, attach / detatch from load balancer, etc in the hook scripts.

In case you are using AWS Elastic load balancing, we have some sample scripts you can borrow from: I hope this helps you get set up.

Thanks, Amartya Datta Gupta