如何在生产中扩展 Docker 容器 [英] How to scale Docker containers in production

查看:40
本文介绍了如何在生产中扩展 Docker 容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我最近发现了这个很棒的工具,它说

So I recently discovered this awesome tool, and it says

Docker 是一个开源项目,可以轻松创建轻量级、来自任何应用程序的便携式、自给自足的容器.相同开发人员在笔记本电脑上构建和测试的容器可以运行规模、生产中、虚拟机、裸机、OpenStack 集群、公共云等等.

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.

假设我有一个运行 Nginx 的 docker 镜像,并且一个网站连接到外部数据库.如何在生产中扩展容器?

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?

推荐答案

更新:2019-03-11

首先感谢多年来对这个答案点赞的人.

Update: 2019-03-11

First of all thanks for those who have upvoted this answer over the years.

请注意,这个问题是在 2013 年 8 月提出的,当时 Docker 还是一项非常新的技术.此后:Kubernetes 于 2014 年 6 月推出,Docker swarm 于 2015 年 2 月集成到 Docker 引擎中,亚马逊推出了它的 容器解决方案,ECS, 2015 年 4 月和 Google 于 2015 年 8 月推出了 GKE.可以说生产容器的格局发生了重大变化.

Please be aware that this question was asked in August 2013, when Docker was still a very new technology. Since then: Kubernetes was launched on June 2014, Docker swarm was integrated into the Docker engine in Feb 2015, Amazon launched it's container solution, ECS, in April 2015 and Google launched GKE in August 2015. It's fair to say the production container landscape has changed substantially.

简而言之,您必须编写自己的逻辑来执行此操作.

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

我希望在以下项目中出现这种功能,这些项目建立在 docker 之上,旨在支持生产中的应用程序:

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:

我最近发现的另一个相关项目:

Another related project I recently discovered:

最新版本的 Openstack 包含对管理 Docker 容器的支持:

The latest release Openstack contains support for managing Docker containers:

Docker 实例管理系统

System for managing Docker instances

以及如何使用诸如 Packer、Docker 和 Serf 提供不可变的服务器基础架构模式

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

一篇关于如何使用 serf 将 docker 容器连接在一起的简洁文章:

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

使用 Mesos 上运行 Dockermarathon" rel="noreferrer">Marathon 框架

Run Docker on Mesos using the Marathon framework

Mesosphere Docker 开发者教程

Tsuru 上运行 Docker,因为它支持 docker-cluster隔离调度程序部署

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

基于 Docker 的环境编排

Docker-based environments orchestration

maestro-ng

decking.io

Google kubernetes

Redhat 重构了他们的 openshift PAAS 以集成 Docker

Redhat have refactored their openshift PAAS to integrate Docker

一个 Docker NodeJS 库,它包装了 Docker 命令行并从一个 json 文件管理它.

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

亚马逊的新容器服务支持在集群中扩展.

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

严格来说,Flocker 不扩展"应用程序,但它旨在实现使有状态的容器(运行数据库服务?)可跨多个 docker 主机移植:

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/

创建描述 Docker 应用程序的可移植模板的项目:

A project to create portable templates that describe Docker applications:

http://panamax.io/

Docker 项目现在正在本地处理编排(参见 公告)

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

Spotify Helios

另见:

Openstack 项目现在有一个名为 Magnum 的新容器即服务"项目:

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

显示了很多承诺,可以轻松设置 Docker 编排框架,例如 Kubernetes 和 Docker swarm.

Shows a lot of promise, enables the easy setup of Docker orchestration frameworks like Kubernetes and Docker swarm.

Rancher 是一个正在迅速成熟的项目

Rancher is a project that is maturing rapidly

http://rancher.com/

漂亮的用户界面和对混合 Docker 基础设施的强烈关注

Nice UI and strong focus on hyrbrid Docker infrastructures

Lattice 项目是 Cloud Foundry 的一个分支,用于管理容器集群.

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

Docker 最近收购了 Tutum:

Docker recently bought Tutum:

https://www.docker.com/tutum

部署在 Kubernetes 上的应用程序的包管理器.

Package manager for applications deployed on Kubernetes.

http://helm.sh/

Vamp 是一个开源和自托管平台,用于管理依赖容器技术的(微)面向服务的架构.

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

http://vamp.io/

分布式、高可用性、数据中心感知调度程序

A Distributed, Highly Available, Datacenter-Aware Scheduler

来自为我们提供 Vagrant 和其他强大工具的人.

From the guys that gave us Vagrant and other powerful tools.

适用于 AWS 的容器托管解决方案,开源且基于 Kubernetes

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

https://supergiant.io/

位于德国的基于 Apache Mesos 的容器

Apache Mesos based container hosted located in Germany

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

而且 Docker Inc. 也提供了一个容器托管服务,叫做 Docker 云

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

https://cloud.docker.com/

Jelastic 是托管的 PAAS自动扩展容器的服务.

Jelastic is a hosted PAAS service that scales containers automatically.

这篇关于如何在生产中扩展 Docker 容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆