Automatic deployment of Docker containers on AWS ECS using Jenkins or Job Scheduler

Currently we build our Docker containers and publish them to Amazon ECR. We have created TaskDefinitions and are able to deploy them manually on an ECS Cluster. So a new deployment involves manual update of the TaskDefinition.

Now we would like to automate the deployment so when a Docker Image is successfully build using Jenkins and published to the ECR repo we would like to replace the current running version with the newly build one.

Next to this we would like to give people the opportunity to launch a specific version of 1 or more combinations of docker containers. Any suggestion on how we could implement a continuous cycle without manually updating the TaskDefinitions?

Answers


This article describes how to do Continuous deployments to ECS with Jenkins. It uses a shell script after the image has been built and pushed to update an ECS service with a new task definition revision. Hope it helps.


A more simple solution for this might be to use the ecs-deploy script from here:

https://github.com/silinternational/ecs-deploy

After my container has been built and deployed to dockerhub it's simply a matter of:

ecs-deploy -k $AWS_KEY -s $AWS_SECRET -r $AWS_REGION -c $CLUSTER_NAME -n $SERVICE_NAME -i $DOCKER_IMAGE_NAME

and that does it.


Need Your Help

Installing VS.NET on a 64-bit Computer

visual-studio 64-bit

I am trying to install Visual Studio .NET on a Windows 7 64-bit computer. When I run the setup, I get this error message:

invalid type argument of '->' (have 'int')

c pointers dereference operator-precedence invalid-argument

I get the error reported below while I am compiling my code. Could you please correct me where I mistaken?