How to scale Docker containers in production

So I recently discovered this awesome tool, and it says

Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.

Let's say I have a docker image which runs Nginx and a website connects to external database. How do I scale the container in production?


The short answer is that you'd have to write your own logic to do this.

I would expect this kind of feature to emerge from the following projects, built on top of docker, and designed to support applications in production:

  • flynn
  • deis
  • coreos
  • Mesos
  • Update 1

    Another related project I recently discovered:

  • maestro
  • Update 2

    The latest release Openstack contains support for managing Docker containers:

  • Docker Openstack
  • Paas zone within OpenStack
  • Update 3

    System for managing Docker instances

  • Shipyard
  • And a presentation on how to use tools like Packer, Docker and Serf to deliver an immutable server infrastructure pattern

  • FutureOps with Immutable Infrastructure
  • Slides
  • Update 4

    A neat article on how to wire together docker containers using serf:

  • Decentralizing Docker: How to use serf with Docker
  • Update 5

    Run Docker on Mesos using the Marathon framework

    Mesosphere Docker Developer Tutorial

    Update 6

    Run Docker on Tsuru as it supports docker-cluster and segregated scheduler deploy

  • http://blog.tsuru.io/2014/04/04/running-tsuru-in-production-scaling-and-segregating-docker-containers/
  • Update 7

    Docker-based environments orchestration

    maestro-ng

    Update 8

    decking.io

    Update 9

    Google kubernetes

    Update 10

    Redhat have refactored their openshift PAAS to integrate Docker

  • Project Atomic
  • Geard
  • Update 11

    A Docker NodeJS lib wrapping the Docker command line and managing it from a json file.

  • docker-cmd
  • Update 12

    Amazon's new container service enables scaling in the cluster.

    Update 13

    Strictly speaking Flocker does not "scale" applications, but it is designed to fufil a related function of making stateful containers (running databases services?) portable across multiple docker hosts:

    https://clusterhq.com/

    Update 14

    A project to create portable templates that describe Docker applications:

    http://panamax.io/

    Update 15

    The Docker project is now addressing orchestration natively (See announcement)

  • Docker machine
  • Docker swarm
  • Docker compose
  • Update 16

    Spotify Helios

    See also:

  • https://blog.docker.com/tag/helios/
  • Update 17

    The Openstack project now has a new "container as a service" project called Magnum:

  • https://wiki.openstack.org/wiki/Magnum
  • Shows a lot of promise, enables the easy setup of Docker orchestration frameworks like Kubernetes and Docker swarm.

    Update 18

    Rancher is a project that is maturing rapidly

    http://rancher.com/

    Nice UI and strong focus on hyrbrid Docker infrastructures

    Update 19

    The Lattice project is an offshoot of Cloud Foundry for managing container clusters.

    Update 20

    Docker recently bought Tutum:

    https://www.docker.com/tutum

    Update 21

    Package manager for applications deployed on Kubernetes.

    http://helm.sh/

    Update 22

    Vamp is an open source and self-hosted platform for managing (micro)service oriented architectures that rely on container technology.

    http://vamp.io/

    Update 23

    A Distributed, Highly Available, Datacenter-Aware Scheduler

  • https://www.nomadproject.io/
  • From the guys that gave us Vagrant and other powerful tools.

    Update 24

    Container hosting solution for AWS, open source and based on Kubernetes

    https://supergiant.io/

    Update 25

    Apache Mesos based container hosted located in Germany

    https://sloppy.io/features/#features

    And Docker Inc. also provide a container hosting service called Docker cloud

    https://cloud.docker.com/

    Update 26

    Jelastic is a hosted PAAS service that scales containers automatically.


    Deis automates scaling of Docker containers (among other things).

    Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage applications on your own servers. Deis builds upon Docker and CoreOS to provide a lightweight PaaS with a Heroku-inspired workflow.

    Here is the developer workflow:

    deis create myapp                      # create a new deis app called "myapp"
    git push deis master                   # built with a buildpack or dockerfile
    deis scale web=16 worker=4             # scale up docker containers
    

    Deis automatically deploys your Docker containers across a CoreOS cluster and configures the Nginx routers to route requests to healthy Docker containers. If a host dies, containers are automatically restarted on another host in seconds. Just browse to the proxy URL or use deis open to hit your app.

    Some other useful commands:

    deis config:set DATABASE_URL=          # attach to a database w/ an envvar
    deis run make test                     # run ephemeral containers for one-off tasks
    deis logs                              # get aggregated logs for troubleshooting
    deis rollback v23                      # rollback to a prior release
    

    To see this in action, check out the terminal video at http://deis.io/overview/. You can also learn about Deis concepts or jump right into deploying your own private PaaS.


    看看Rancher.com - 它可以管理多个Docker主机等等。

    链接地址: http://www.djcxy.com/p/30142.html

    上一篇: 如何基地自动更新您的码头集装箱

    下一篇: 如何在生产中扩展Docker容器