ingenieux / beanstalker

Beanstalker helps you deploy into AWS Elastic Beanstalk from Maven

Home Page:http://docs.ingenieux.com.br/project/beanstalker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dropwizard / Docker example can't find task definition

thesmith opened this issue · comments

When I run mvn -Pawseb -Dbeanstalk.versionLabel= beanstalk:create-environment I get back:

[WARNING] FAILURE
org.apache.maven.plugin.MojoExecutionException: Something went wrong in while waiting for the environment setup to complete : No ecs task definition (or empty definition file) found in environment

I understand that it's looking for the Dockerrun.aws.json but it's obviously not looking in the right place.

Why are you setting versionLabel to empty?

I think the problem was that I ran package without the awseb profile, so the zip wasn't properly created. I'll assuming this is the case and close this ticket.

I just ran into this issue and discovered that this page is currently the only search result for "No ecs task definition", so here's some more detail: My problem was that my Dockerrun.aws.json file got renamed inside the zip file for the uploaded version. A clearer error response from AWS would be "Dockerrun.aws.json not found".

I just ran into this too - in my case it's because I'd created the zip on a mac by downloading an existing app version, editing, rezipping (from a terminal) and reuploading. In downloading the zip from AWS my mac had set a com.apple.quarantine extended attribute on all of the files, which (I guess) made ECS ignore them. Removing that attribute with xattr -c prior to zipping did the trick.

Are your SolutionStacks multicontainer? If so, it leaves the CloudFormation realm and goes into ECS realm :)

And btw, the original solutionStack mask from the archetype seems to allow it to be picked. Try this instead:

<beanstalk.solutionStack>64bit Amazon Linux 201* v* running Docker *</beanstalk.solutionStack>

I ran in to the No ecs task definition as well. I tried to add a task_definition.json in ecs settings. But every time I run my task, it would stop immediately, I think it's an issue with my task_definition.json because I don't know how to write the configuration for node.js application in that.

thanks to @powdahound

The issue is that the source-bundle is been uploaded to S3 in a wrong directory instead of been in the root directory.
.
└── some_files
└── more files
└── Dockerrun.aws.json

Instead it should be;
.
└── Dockerrun.aws.json
└── some files

You can only tell, by going to s3 and checking the uploaded files. if Dockerrun.aws.json is not in the root of the uploaded file/s, you have a problem.