3

I'd like to setup proper way to persist docker volumes. Currently all our docker volumes are local only, so in case of server failure our data are lost.

I'm thinking about buying two servers and setup them both as volume providers.
Are nfs servers doable or do I need something like gluster?
Or can I use AWS Cloud storage or similar solution?
Best features would be seamless transition between providers in case of crashing one of them, volume snapshots, low nodes count, no single point of failure, etc.

Definitely worth noting, that we have servers leased at Hetzner (so maybe some kind of storage box solution?) and we're using Rancher 1.6.22 with Cattle.

Thank you for any advices.

4 Answers4

1

Google Cloud definitely support docker in the way you want, and so much more

You can have hosted / redundant clusters, ensure almost perfect uptime over multiple regional data centers, backups, extra containers on demand, self healing clusters, load balancing etc etc.

I would recommend the following guide.

https://cloud.google.com/cloud-build/docs/quickstart-docker

(if you don't have a GCP account, create a trial for free - https://console.cloud.google.com)

  • I'm afraid this solution would require running complete stack in google cloud therefore cost more money (our stack is a bit computation heavy). But I will definitely try out using google cloud storage as persistent volume though. Although I'm a bit concerned about speed in that scenario. In any case, thank you. – Jaroslav Leitl Oct 01 '18 at 07:05
1

You may use a Google Cloud Storage bucket as a persistent docker volume and mount it on the container. You will need to install Google Cloud Platform gcsfuse on the container to mount the GCP bucket.

GCP bucket can guarantee up to 99.99% uptime and will eliminate single point of failure. It can be configured to automatically backup data from one bucket to another if you need.

I would recommend the github article on how to create and mount volume to your container. Please refer to this link if you need further information on GCP buckets.

John Mathew
  • 181
  • 2
0

To get the best volumes performance in containerized environment better use GlusterFS. And avoid NFS, it have some performance problem with containers and VM Environments.

affan
  • 61
  • 3
  • Thank you for your advice about NFS. I was a bit concerned about NFS performance, but now I'll avoid it as much as I can. – Jaroslav Leitl Oct 01 '18 at 07:09
  • Your welcome.. For full VM stack it is best using ceph, but for containers glusterfs working really good. – affan Oct 02 '18 at 11:30
0

Have a look at gk-deploy, it can deploy Gluster for you in many different cloud environments. The recommendation is to have a minimum of three storage servers though. You can use two powerful ones and a smaller 'arbiter' if you want to save some costs.

Niels de Vos
  • 146
  • 3