AWS Multicontainer Docker Environments – don't start

i use the beanstalk-maven-pluginand like 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.

  • python logger in docker is not working
  • docker file not found
  • How to install docker-compose on Linux RHEL 6.6?
  • How to increase shm size of a kubernetes container (--shm-size equivalent of docker)
  • Jenkins + Docker
  • Why env variables are not created automatically?
  • 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

    but my zip file looks like this:

        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
    

    i hope you’ve some idea, why the container not starts.

    Thanks a lot
    Marcel

  • Docker + Jenkins + AWS
  • Multiple RUN instructions vs. single CMD to execute setup script in Dockerfile to initialize container
  • New version of postgresql docker container doesn't have the new added data
  • How to set up autoscaling RabbitMQ Cluster AWS
  • How to RUN plenv/rbenv in Dockerfile?
  • how to permanently set environment variable for boot2docker
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.