0

Our application is hosted on AWS EC2, we add code updates & fix bugs every few weeks. Our code is on github and github actions does the deployment with automated & manual workflows. We have a good traffic so we have already added 5 servers with load balancer pointing to them. We want to apply auto scaling on our applications server, so that there would be no constant number of servers instead the servers will auto scale and redeploy our app according to the application traffic.
But my question is as we have added the IPs on the github actions workflow when the servers will scale up and deploy new servers the ips will change, so how would github actions will know where to deploy the codes?
Can anyone give me any suggestions or any way to debug this issue? Thanks in advance.

anarxz
  • 186
  • 4
MD Nasirul Islam
  • 145
  • 1
  • 11
  • You should look into AWS CodeDeploy. – tilleyc Dec 04 '21 at 16:43
  • thanks for the info – MD Nasirul Islam Dec 04 '21 at 18:55
  • I would probably look at source changes triggering AWS Code Pipeline, which builds / tests if required using AWS Code Build, then with manual approval uses AWS Code Deploy for deployment. It will take a bit of work to get going. You will probably be best creating an AMI with each software version, though you can have a base AMI that installs everything with a startup script but that takes longer to start a new server. – Tim Dec 05 '21 at 01:07
  • Can I use the base image? just update the codes on the base image? so that it could be deployed on the servers? Whats the best practice? cc: @Tim – MD Nasirul Islam Dec 05 '21 at 05:27
  • Yes you can use a base image and update. Base image can be plain linux then you update / install software / install application, or your AMI can be fairly up to date and you just run updates of patches and latest application. Trade-offs both ways. Best do some reading. – Tim Dec 05 '21 at 07:17
  • thanks for the tips @Tim – MD Nasirul Islam Dec 05 '21 at 10:04

0 Answers0