How to Design or Architect

0

Hi Team

I need to know what strategy we should use when we try to upgrade an agent on a running ec2. In order to follow cloud standards what i did is. i created an AMI and that has got my agent installed, so any new ec2 made by that AMI is having the agent installed. But when i want to upgrade the agent. how should i go about it?

Which is the best option here:

  1. Code deploy
  2. Code pipeline
  3. Lambda.

or what else should be a good approach to follow?

Thanks

1 個回答
1

Hi!

You could either follow "golden AMI" approach - in this case you create a CI/CD pipeline (e.g CodeBuild/Jenkins/TeamCity/etc) that when your new agent version is build - it triggers rebuild of AMI - either via HashiCorp Packer or EC2 Image builder and you further update your nodes to that latest AMI - you could do that via ASG & Launch Templates.

Another way - if you want just have basic AMI that you've already created - and just update the agent on some basis - you better leverage SSM (AWS Systems Manager) features like Distributor that allows to package and publish software on the managed nodes (you need SSM Agent pre-installed for that and ec2 Profile that allows SSM). Or you could just simply use 'Run command" in SSM and run any script that do the task of updating for you on any number of managed machines.

AWS
專家
已回答 2 年前
  • Thanks a lot Aleksandr As you suggested, i am using codepipeline to build AMI. it is working fine when i would need the agent for the first time.. then ec2 created from that AMI would have it.. And when new version of agent is released it would simplu trigger the pipeline and it would create a new AMI. After that when i want to upgrade the agent on existing ec2, how would i do that will new AMI. could you please suggest me on it , or can help me with any doc to follow or any video to explain,. I really need to understand how would we do it. so my current work remains of worth.

    Thanks a lot again for your valuable time please.

    Waiting for your comments.

    Thanks

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南