Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent storage solution for Docker on AWS EC2

I want to deploy a node-red server on my AWS EC2 cluster. I got the docker image up and running without problems. Node-red stores the user flows in a folder named /data. Now when the container is destroyed the data is lost. I have red about several solutions where you can mount a local folder into a volume. What is a good way to deal with persistent data in AWS EC2?

My initial thoughts are to use a S3 volume or mount a volume in the task definition.

like image 864
Peter Savnik Avatar asked Oct 10 '17 07:10

Peter Savnik


1 Answers

It is possible to use a volume driver plugin with docker that supports mapping EBS volumes.

Flocker was one of the first volume managers, it supports EBS and has evolved to support a lot of different back ends.

Cloudstor is Dockers volume plugin (It comes with Docker for AWS/Azure).

Blocker is an EBS only volume driver.

S3 doesn't work well for all file system operations as you can't update a section of an object, so updating 1 byte of a file means you have to write the entire object again. It's also not immediately consistent so a write then read might give you odd/old results.

like image 164
Matt Avatar answered Oct 22 '22 03:10

Matt