Monday, July 17, 2017

How to update ECS-AGENT version through chef cookbook

  • We are installing ECS-AGENT on Docker hosts using  chef Role.
  • We have three different environments  for Docker hosts (Dev,staging and production).
  • W.r.t to three different enviroments,we have three different roles (ecs,ecs-staging,ecs-production).
  • According to the chef architecture,the ecs-agent version should be updated automatically,because chef will checkin for every 30mins.

       Incase,ecs-agent has to be updated,we have to do following steps:
  
  1. we have to remove  'ecs' role from the Runlist and run   `chef-client`  on the node.
  2. Once the step1 is finished,we need to stop the 'ecs-agent` container and remove it.
  3. Add the `ecs role` to the Runlist and run the chef-client on the node.
  4. we can see the  `ecs-agent` running on the node.
  5. we can verify the ecs-agent version by using this command  'curl http://localhost:51678/v1/metadata `

No comments:

Post a Comment