Can you please help with some guidelines for codepipeline?

0

Hello can somebody please give me some guidelines to building our pipeline with an autoscaling group.

From my understanding we should build a base ami and then when autoscaling needs another instance the base is launched and codedeploy is called and the application updated with the latest version. Because of our application we are needing our ami to be setup with the latest versions of our application and not have it build on the fly at launch.

This is our thinking of how it would work.

  1. Push our code to bitbucket and have it trigger the pipeline to launch an instance from our latest ami.
  2. Setup the application code on the ec2 instance.
  3. Create a new ami and update our launch template version with the new ami.
  4. Swap out the current versions of EC2s to the new version.

So for this scenerio, would it be best to use codebuild to build out the ec2 and setup the application. Then use codedeploy for a Blue/Green deployment or would it be best to do it all in the codedeploy? Any suggestions are welcome

Thank you

asked a year ago233 views
1 Answer
0

Hi,

I think, if we tie up the solutions mentioned here i.e. Create AMIs with AWS CodePipeline with Introducing Instance Refresh for EC2 Auto Scaling , you should get what you are looking for.

Alternatively, I suggest you consider Elastic Beanstalk, it could help bring everything down to just bringing your code. Refer Blue/Green deployments with Elastic Beanstalk

Hope this helps!

Thanks, Rama

profile pictureAWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions