Multicontainer Docker Environments - don't start
a-marcel opened this issue · comments
Hello,
i use your plugin for ages and it works perfectly. Now, i need to deploy a Multicontainer to aws but i'm not able to do this. The Stack just failed with "Failed to launch environment." - that's it.
If i create the Environment with the same zip file via the beanstalk aws page, it works.
i created two service roles / iam
-
aws-elasticbeanstalk-ec2-role - with the Policy: AWSElasticBeanstalkMulticontainerDocker, AmazonEC2ContainerServiceforEC2Role
-
aws-elasticbeanstalk-service-role with the same Policies like aws-elasticbeanstalk-ec2-role
My files are:
Dockerrun.aws.json
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "nginx-proxy",
"image": "nginx:1.10",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 8080
}
]
}
]
}
.ebextensions/blockdevice-sdh.config
option_settings:
aws:autoscaling:launchconfiguration:
BlockDeviceMappings: /dev/xvdcz=:12:true:gp2,/dev/sdh=:24
.ebextensions/serviceroles.config
option_settings:
- namespace: aws:autoscaling:launchconfiguration
option_name: IamInstanceProfile
value: aws-elasticbeanstalk-ec2-role
- namespace: aws:elasticbeanstalk:environment
option_name: ServiceRole
value: aws-elasticbeanstalk-service-role
and some data from the pom.xml
<properties>
<beanstalk.solutionStack>64bit Amazon Linux 2016.03 v2.1.3 running Multi-container Docker 1.11.1 (Generic)</beanstalk.solutionStack>
<beanstalker.region>eu-central-1</beanstalker.region>
</properties>
the console log from the instance don't show so much. i compared the cloud formation templates (one time from the mvn deploy and one time from the ElasticBeanstalk deploy via the webpage) and i don't see any important differences.
After checking all events, the only thing, wich one are different is that the mvn deployment not doing the ECS task
ECS task: arn:aws:ecs:eu-central-1:980585748732:task/b1098b24-d5ac-44e8-9987-e90e98fa0983 is RUNNING.
Starting new ECS task with awseb-Release-nebh2zbkfa:1.
Added instance [i-dd79c060] to your environment.
The documentation from Elasticbeanstalk sayed, that EB take care of creating and running this automatically. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecs.html
i hope you've some idea, why the container not starts.
Thanks a lot for you great work
Marcel
i guess, this is similar to #63
but my zip file looks like this (the name of Dockerrun.aws.json is exactly like it should be):
0 07-15-16 21:33 .ebextensions/
118 07-15-16 21:33 .ebextensions/blockdevice-sdh.config
98 07-15-16 21:33 .ebextensions/customoptions.config
268 07-15-16 21:33 .ebextensions/serviceroles.config
292 07-15-16 00:02 Dockerrun.aws.json
Can you provide me a small self-contained sample to look into it?