Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicontainer Docker Environments - don't start #104

Open
a-marcel opened this issue Jul 15, 2016 · 1 comment
Open

Multicontainer Docker Environments - don't start #104

a-marcel opened this issue Jul 15, 2016 · 1 comment

Comments

@a-marcel
Copy link

a-marcel commented Jul 15, 2016

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

  1. aws-elasticbeanstalk-ec2-role - with the Policy: AWSElasticBeanstalkMulticontainerDocker, AmazonEC2ContainerServiceforEC2Role

  2. 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
@aldrinleal
Copy link
Member

Can you provide me a small self-contained sample to look into it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants