Deploy to the elastic mechanism through the CLI deployment command using Dockerrun.aws.json

I am running an application for elastic coverage, with several environments. This particular application hosts docker containers that host the web service.

To download and deploy a new version of the application in one of the environments, I can go through the web client and click "Download and Deploy", and from the file option, select my latest file Dockerrun.aws.json, which refers to the latest version of the container, which is located privately. Download and deployment work fine without any problems.

To simplify the deployment for myself and others, I would like to use the CLI to download and deploy the Dockerrun.aws.json file. If I use the cli eb deploy command without any special configuration, the normal process of zipping up the entire application and sending it to the host fails (it cannot explain that it only needs to read the Dockerrun.aws.json file).

I found the documentation that you are loading the .elasticbeanstalk / config.yml file.

Using this syntax:

deploy: artifact: Dockerrun.aws.json

The file is downloaded and actually successfully deployed in the first instance, and then it is always impossible to deploy it to the second set of instances.

Taste refusal error: "container unexpectedly exited ..."

Can someone explain or provide a reference to the canonical approach for using the CLI to deploy individual docker container applications?

+7
docker amazon-web-services elastic-beanstalk deployment amazon-elastic-beanstalk
source share
2 answers

So it turns out that the method I listed with config.yml was correct. The reason I saw a partially successful deployment was because the previously launched docker container on the hosts was not stopped by EB.

I think what happened is that EB sends something like

sudo docker kill --signal=SIGTERM $CONTAINER_ID instead of the more common sudo docker stop $CONTAINER_ID

The particular container that I ran did not respond to SIGTERM, and so it would just sit there. When I tested it locally with SIGKILL, it (obviously) would stop correctly, but only SIGTERM would not stop it.

The problem was not the deployment methodology, but rather the confusion in the output generated by EB and my misinterpretation.

+1
source share

Since you asked for the link, I provide the link that I originally used to successfully test and deploy the docker using the elastic cli shell.

Please see if this helps you: https://fangpenlin.com/posts/2014/11/25/running-docker-with-aws-elastic-beanstalk/

0
source share

All Articles