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.

  • Docker ubuntu - elasticsearch
  • is possible to link a DNS name to another DNS name in docker?
  • Is it possible to isolate docker container in user-defined overlay network from outside internet?
  • docker images fedora25 have no command “sysctl” and open google bbr
  • Security of Docker as it runs as root user
  • Can't see files with Docker on Windows 10
  • 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.

  • Docker - Is it possible to recreate volume container without recreating the containers that use it
  • Docker Centos 7 easy_install supervisor ssl issue behind proxy
  • update custom configuration file in Docker
  • How to do SSH tunneling with docker (machine & compose)?
  • Can docker containers share a directory amongst them
  • How do networking and load balancer work in docker swarm mode?
  • 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.