Elastic Beanstalk CLI – Not replacing instance on deploy

I’ve just tried making a change to an .ebextensions config file, and doing an “eb deploy”, however I noticed when I ssh’d in, that the commands have simply been run again against the same instance.

I had assumed that doing a deploy would replace the instances. I hadn’t counted on the commands potentially needing to be re-runnable on a particular instance.

  • What are the disadvantages of a Docker container using the host network?
  • How to extend an existing docker image?
  • When does a running Docker container run out of disk space?
  • AWS Beanstalk docker image automatic update doesn't work
  • Docker service create `n` replicas in `n-1` swarm nodes
  • Docker pull error: no space left on device
  • Can someone tell me under what circumstances Elastic Beanstalk will determine it needs to replace the instances?

    Is there some way to force a replacement of the instances from the cli?

    I should also mention that this is a docker application.

  • Why can't composer find a composer.json file inside my Docker container?
  • What's the simplest mac docker setup for archival purposes?
  • When do DockerHub auth tokens expire?
  • How import file from computer to docker containers with mongodb
  • Stop Minecraft server in Docker when container stops
  • Populate Cassandra Db using Docker
  • One Solution collect form web for “Elastic Beanstalk CLI – Not replacing instance on deploy”

    Can someone tell me under what circumstances Elastic Beanstalk will
    determine it needs to replace the instances?

    Elastic Beanstalk replaces the instance automatically only when there any underlying issue detected in the instance or the instance becomes unavailable. Other way to change the instance is forcing it with being careful of down time. Where comes your second question.

    Is there some way to force a replacement of the instances from the
    cli?

    This is recommended process for zero down time. Increase the minimum instances in Elastic BeanStalk to 3 and decrease it back to 2 after the third instance is up then terminate the problematic instance. Using CLI below are the steps

    eb config
    

    Change the number of instances in the config file that appears below.

    aws:autoscaling:asg:
        Availability Zones: Any
        Cooldown: '360'
        Custom Availability Zones: 'us-west-2a,us-west-2b'
        MaxSize: '3'
        MinSize: '1'
    

    Once you see the 3 instance up.

    You can stop the instance with something like this.

    ec2-stop-instances i-10a64379
    

    And then you can again follow the above step to bring it back to what you want.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.