
AWS Elastic Beanstalk for Docker - jeffbarr
http://aws.typepad.com/aws/2014/04/aws-elastic-beanstalk-for-docker.html
======
EwanToo
It's a shame the containers appear to be stuck at 1 container per VM, which is
fairly limiting, there's no real reason why you wouldn't run 10 or more
containers on 1 VM other than IP allocation (which AWS already does very well)

~~~
nickstinemates
Agree - but, this is a good initial offering I believe should only get better
with time.

This is a great thing for AWS and for Docker users.

------
dmourati
Help me understand why docker adds any value in prod? When I tried it, I got
quickly frustrated with the "expose a single port" to the local OS. Sure, I
could go ham on it and move ports around but where is the scale in that? If we
are limited to 1 docker/VM seems like we waste more than we gain. Same problem
in physical servers.

Not trolling here, seriously interested in where people see value in the real
world.

~~~
tszming
IMO, docker is _less_ useful when you are on a cloud platform like AWS since
you already can pack and ship your application as AMI, they even have a
marketplace for this:
[https://aws.amazon.com/marketplace](https://aws.amazon.com/marketplace). One
of the exceptions I can think of why you really need to run docker inside ec2
is you want to build a PaaS or something like memcached as a service, since it
is expensive to give every customer to own a dedicated instance.

Honestly, I would prefer to run as many small/medium instances rather than a
powerful instance but to host many dockers inside it, because if you put all
the eggs in one basket and when then host machine is down, you are having a
bigger problem; if you host a single docker on an ec2 instance, and as I said
before, you can already solve this via AMI without the overheads/abstraction.

Of course, it is still very useful to run docker on a physical machine when
you don't want to setup KVM or mess up with OpenStack.

~~~
benjaminwootton
Docker is massively more lightweight than shipping AMIs.

\- We build hundreds if not thousands of docker images a day after each CI
commit. Thats not viable with virtual machines or AMIs.

\- Docker has the union file system, so pushes and pulls of Docker images
after each CI build are tiny;

\- Docker is more platform independent whereas AMIs are very EC2 specific. No
other cloud provider have anything as sophisiticated as AMI;

\- Rollbacks are instant with Docker;

Docker can also be used in conjunction with autoscaling and resilience. We
have 10+ containers on a box, but still replicate this 5 or 6 times and will
possibly add EC2 AutoScaling in future. Cloud and Docker are complementary not
an alternative in my opinion.

------
evandbrown
We'll carve out ~15 minutes for a brief overview + Q&A during tomorrow's
Office Hours:
[https://plus.google.com/events/ceoe036ugsu6hndr6ncl616gr3k](https://plus.google.com/events/ceoe036ugsu6hndr6ncl616gr3k)

~~~
maslam
Evan this is really nice!

------
mikebabineau
They also published a quick demo:
[https://www.youtube.com/watch?v=lBu7Ov3Rt-M&feature=youtu.be](https://www.youtube.com/watch?v=lBu7Ov3Rt-M&feature=youtu.be)

------
edandersen
I even got a simple .NET app running on Elastic Beanstalk, and it's almost
been up for two years with no downtime. Quite impressed.

------
rsanders
This is excellent news. I have a rather complicated app which I fought tooth
and nail to get working on Elastic Beanstalk. The provisioning scripts were
just too buggy, undocumented, and full of bad assumptions.

I have a couple of apps running perfectly under EB. This neatly solves my main
issue with it.

~~~
toomuchtodo
I would be interested in the details with regards to problems you had. I
deploy a java/tomcat application to Elastic Beanstalk, and haven't had any
issues, going so far as to heavily modify the environment using .ebextensions
scripts to replace apache configurations, install additional packages, etc.

~~~
robbles
I'm still looking for a way to deploy with Elastic Beanstalk without causing a
brief interruption in service. It seems like a major oversight in the system
it provides.

I know you can do the CNAME swap trick, but that cause monitoring issues due
to essentially switching between groups of servers, plus you have to run twice
as many servers.

Since you've had some experience with advanced configuration of EB apps, have
you run into any convenient trick for doing this?

~~~
toomuchtodo
Elastic Beanstalk does have rolling updates, but unfortunately its for
environment changes, not application version changes.

Our developers are fond of the Elastic Beanstalk interface; to switch between
app versions without end-user disruption, I have logic that directly
manipulates instance state and uses connection draining (both ELB functions)
to cycle new clients to the fresh cluster while not disrupting existing
clients.

We don't run twice as many servers; before we switch between groups of
servers, we scale up the destination cluster, and after the switch scale down
the stale cluster with the old app version (2 is the minimum for load balanced
applications unfortunately).

My email is in my profile; feel free to get in touch, I'd be happy to answer
any questions you may have.

------
KickingTheTV
How do you guys feel about the "Container-as-a-Service" providers (Orchard,
Stackdock, Tutum) in relation to Elastic Beanstalk for Docker? IMHO AWS's
solution appears complex and lacking compared to this:
[http://ow.ly/w63M6](http://ow.ly/w63M6)

------
uberdog
It says on the docker site "Please note Docker is currently under heavy
development. It should not be used in production (yet)."

[http://www.docker.io/learn_more/](http://www.docker.io/learn_more/)

------
MichaelGlass
Until elastic beanstalk supports time scheduled scaling, I will be sad. Every
morning my app servers go from zero to a million miles an hour and it takes
about 20 minutes to scale up. Does anyone actually use this at scale?

~~~
imperialWicket
Elastic beanstalk uses auto scaling groups which support as-put-scheduled-
update-group-action in the cli or
[http://docs.aws.amazon.com/AutoScaling/latest/APIReference/A...](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/API_PutScheduledUpdateGroupAction.html)
to set time-based scaling.

~~~
MichaelGlass
lovely. I had a consultation with an Amazon rep after reading this
[http://aws.amazon.com/application-
management/](http://aws.amazon.com/application-management/) and they confirmed
their own incorrect documentation.

------
bsaul
I'm currently playing with docker and wonders : how does that tech fits with
things like chef/puppet/saltstack ( its conf part) ? Is it going to make all
those technologies pointless ?

~~~
shykes
Hi, Docker is pretty complementary with the configuration management tools you
mention. Lots of people use them in combination.

One common pattern is to use chef/puppet/salt/ansible to help you build the
application stack _inside_ the container, then seal the result into a standard
Docker container. Once the build phase is over, it no longer matters which
configuration management tool you used (if any), which makes your application
more portable across infrastructure. See for example
[http://tech.paulcz.net/2013/09/creating-immutable-servers-
wi...](http://tech.paulcz.net/2013/09/creating-immutable-servers-with-chef-
and-docker-dot-io.html)

~~~
mpdehaan2
Here's a post I wrote about using Ansible inside a docker file --
[http://www.ansible.com/blog/2014/02/12/installing-and-
buildi...](http://www.ansible.com/blog/2014/02/12/installing-and-building-
docker-with-ansible)

------
oDot
Is updating the source rebuilds the image from scratch?

~~~
evandbrown
If you deploy a Dockerfile, EB will re-build the image.

Also, by default, EB will do a `docker pull your-image` on each app version
deploy. To disable that, include a Dockerrun.aws.json file with the following:

{ "AWSEBDockerrunVersion": "1", "Image": { "Update": "false" } }

And some more color here:
[http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create...](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_image.html)

EDIT: Also would point out that EB is using Docker's layer/image caching, so a
rebuild does use the local cache (but does do the `docker pull` to check
remote for any updates)

~~~
oDot
Thank you, all clear now!

