5

I'm running a site on Elastic Beanstalk using a multi container set up. I'm wondering what is the preferred strategy to pull in the latest images.

On the CI server, after successful commits to master, I'm building the Docker images, send them to repositories in AWS Elastic Container Service and then running something like:

CURRENT_VERSION=`aws elasticbeanstalk describe-environments --environment-names $ENVIRONMENT_NAME | jq -r '.Environments[0].VersionLabel'`
aws elasticbeanstalk update-environment --environment-name $ENVIRONMENT_NAME --version-label $CURRENT_VERSION`

This roughly works, but I'm wondering if this is the most efficient way of updating the site. The docs for update-environment say very little.

Also, the environment is made out of 4 different images, each with their own repo and updated independently by different teams. The issue is that sometimes updates "clash" if the environment is already performing an update. I could wait for Status to be "Ready" and AbortableOperationInProgress to be false, but I don't want to hold up the CI server for potentially several minutes.

I was thinking of using Amazon SQS + Lambda to queue them up, but feels very overkill. It would be extremely helpful if EBS already had such a queue of updates built-in. I can't be the first person to run into this issue.

Any ideas and pointers appreciated.

Thanks,

Juan

Juan Delgado
  • 151
  • 3

0 Answers0