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.

  • How to test the container or image after docker build?
  • Docker container with Node and Express on Mac, not showing in browser?
  • gitlab docker ssh issue
  • Docker/nginx [windows10] - change page on linked folder and show changes directly in the browser
  • How to run sonatype nexus on aws ec2?
  • Localhost doesn't forward requests to oracle docker container
  • 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.

  • Working on a Dockerfile in order to build a WordPress image
  • How does Docker Swarm handle database (PostgreSQL) replication?
  • docker-compose build error: command 'gcc' failed with exit status 4
  • docker-compose postgresql implementation in python app
  • Docker - Cant access docker port from outside
  • “Caching” intermediate Docker build
  • 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.