M
M
Madnezz2016-06-03 18:51:15
linux
Madnezz, 2016-06-03 18:51:15

How to store data and manage containers in docker?

I don’t fully understand how to work with docker in production.
Let's say there are 3 physical servers and a web application that uses the following containers:
1. Load balancer (nginx)
1 piece 2. Backends (Already compiled binaries inside) 1 - n pieces
3. Database (Postgres) 1-n pieces
How easy it is to run in docker I understand, but the following things are not clear:
1. Store all changeable data, for example, pictures, ccs, js and files uploaded by users in a volume image. This image will be placed, for example, on 1 physical server, in case of its failure, how to migrate this container to another server with all the data? Exactly the same as to be with a DB? And how to backup these data containers?
2. What tool to manage all this good, so that there is fault tolerance and preferably from the web face? I tried:
-Mesosphere DC / OS (the functions I need seem to be there, but it is sharpened for a large number of nodes and a fierce enterprise)
-Docker UCP (Everything is cool, but paid)
-Rancher (In fact, open source is analogous to Docker UCP, but it seemed damp)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vaavaan, 2016-06-03
@Vaavaan

All mutable data like images, ccs, js

These are the immutable parts of the application. They must be located inside the Docker image. Every time you change css - the image is rebuilt. Because it's incremental, it's fast and doesn't take up much disk space.
Not necessarily as files.
You can put user-loaded files over the network on S3 or OpenStack Swift storage. There is software - these things can be cocked locally. You can also use external servers. For example, using Ceph Object Storage.
Let's say Ceph automatically spreads data over several servers (a semi-backup is obtained).
Kubernetes, Yandex Cocaine (cocaine-runtime, cocaine-plugins, cocaine-tool)+Yandex Elliptics, Nomad+Consul+Registrator+Prometheus+Grafana, CloudFoundary, OpenShift, OpenStack, CoreOS, Docker Swarm, EtcD, Fleet, GoCircuit, Helios, AWS ECS, HTCondor, Hadoop YARN, Nagios/Zabbix/Sensu, SkyDNS, SmartStack, Puppet, Ansible, Chef, doozerd, CloudFormation, Boto, Fog, Heat, etc.
Some of the above are complete platforms, some are pieces of which you can fold your platform.
Rancher is not raw. Raw RancherOS. You can use another.
Mesos you used naked or what? It needs Aurora, Maraphon, Singularity.
They are all tailored for a wild number of nodes. Nothing prevents you from using it on 5 nodes. True, for example, Mesos, because of its Zookeeper, unreasonably wants at least 16 gigabytes per node.
In principle, Consul is enough for many things.
Example:
https://medium.com/@ladislavGazo/easy-routing-and-...

D
Danil Biryukov-Romanov, 2016-06-03
@urtow

Look at OpenShift, it's a RedHat project, it only works on CentOS/RedHat, but it solves all your problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question