The Revolution Will Be Containerized: (Docker)

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024
  • An exploration of Linux application deployment and why containerization in general (and Docker in particular) are a great fit. See more (including source for the presentation) at serialized.net/...

Комментарии • 11

  • @TheodorosPloumis
    @TheodorosPloumis 10 лет назад

    Excellent screencast! Thanks

  • @bboyfaja
    @bboyfaja 10 лет назад

    What is the name of LB you are talking about at 19:02?

    • @JoshuaBarratt
      @JoshuaBarratt  10 лет назад

      Sorry, I just saw this! github.com/dotcloud/hipache

  • @GangaDathanomdathan
    @GangaDathanomdathan 10 лет назад

    Hi i would like to know more about Docker, is it possible to install same instance in multiple instance, wordpress? multiple wordpress instances? and make it scalabe ?

    • @JoshuaBarratt
      @JoshuaBarratt  10 лет назад +1

      Absolutely. You can use a service discovery framework like serf and a load balancer like HAProxy. Here is one example dockerfile that provides some plumbing for that: github.com/turbovote/docker-haproxy So you'd start your new wordpress instances and have them advertise the right serf role, and HAProxy will start balancing to them automatically (and remove them if you kill those containers.) This example shows specifically more about loading wordpress with serf: www.centurylinklabs.com/decentralizing-docker-how-to-use-serf-with-docker/

  • @chewmanfoo
    @chewmanfoo 10 лет назад

    ok I'm confused - you installed redis-server into the container, but when you showed the filesystem of the container, redis-server (it's init file, it's binary, any configs) weren't there. So where is the redis-server binary installed within the image? I did it on my vagrant centos vm runnign docker with a fedora docker image. Centos still has no redia rpm installed even though it's obviously installed within fedora. docker magic?

    • @JoshuaBarratt
      @JoshuaBarratt  10 лет назад +1

      Docker magic, yep! And this is one of the more confusing points about how things work.
      When you install things in a Dockerfile they become part of an *image*.
      When you start a *container*, it creates a copy on write filesystem which just keeps everything that is different between the *running container* and the *image*.
      So this is actually what you'd want if, say, you were running 10 redis services in different containers. You only have one copy of all the common stuff (in the image) and then each container that you start *off* the image only has the things that are special about that running container.
      So using some of the introspection methods I showed in there you can actually go find a directory which has just the redis install in it; all the files that are different between the *redis image* you made with the Dockerfile, and the *base image* that it references at the top of the Dockerfile. But that image won't have any of the files (like the redis db) which happen as a result of actually starting redis up and starting to use it.

    • @chewmanfoo
      @chewmanfoo 10 лет назад +1

      Joshua Barratt no shit? that makes sense and it *is* pretty damn cool

    • @JoshuaBarratt
      @JoshuaBarratt  10 лет назад

      Chew Manfoo Yeah, I see a lot of people get confused by it. The container lifecycle is
      1. create container from an image (actually makes one of those directories)
      2. start container
      3. stop container
      4. delete container
      Someone new to docker will often have thousands of stopped-but-not-deleted containers sitting around on their machine.

  • @GangaDathanomdathan
    @GangaDathanomdathan 10 лет назад

    cool, is there any useful tutorial that, i can install scalable worpress with multiple wordpress instances on a single container? i was trying to search, but nothing is working on my enviornment ....

    • @JoshuaBarratt
      @JoshuaBarratt  10 лет назад

      Well, the whole idea with Docker is that containers are cheap, and ideally are just used for running a single "main process." So you wouldn't want to put multiple wordpress instances in a single container, you'd want to put (say) mysql in one container, haproxy in another, and then launch as many containers for the wordpress app as you need. And then use serf or one of those discovery frameworks to tie them all together.
      If you wanted to do them all on a single *VM* you could, but the beauty of this model is that you can bring containers online in different VM's without changing a thing.
      That being said, I don't know off the top of my head if someone has done an end-to-end tutorial of exactly what you're asking about. The combination of the two I linked should more or less do it. In what was is it not working for you?