rancher / catalog-dockerfiles

Dockerfiles for Rancher Catalog containers
Apache License 2.0
131 stars 102 forks source link

[Request] glusterfs should allow to choose the location of the "brick" #52

Open marceloaguero opened 8 years ago

marceloaguero commented 8 years ago

It would be useful to be allowed to select the location of volume /data/glusterfs/brick1. I'd like to map /data/glusterfs/brick1 to /storage/brick1 in the host, fr example.

That would allow the use, for example, of a hard disk dedicated to GlusterFS on the host.

amalagaura commented 8 years ago

I guess I am stuck with this right now. I don't understand the point of a storage solution if you cannot specify where the storage volumes are. What is being used by GlusterFS now? I am confused by this. One of the containers is a "data container" but if this container is stopped will the data disappear? I see glusterfs_glusterfs-server_glusterfs-volume-create_1 and /data/glusterfs/brick1 but I have no idea how that is all configured.

marceloaguero commented 8 years ago

If the data container is stopped, the data will not disappear. Volumes created in docker are not deleted.

My point is, I would like choose the place (directory) to be used as part of gluster cluster.

When the data container starts, the volume that will be part of the cluster is created under /var/lib/docker. I think it would be better that the system administrator could choose another location in the same way as you choose the location of any storage volume in docker (or rancher): /storage/brick1: /data/glusterfs/brick1

amalagaura commented 8 years ago

I do not think this catalog will suffice for this. I am planning to not use the rancher catalog or docker to run gluster. Just run the gluster daemon directly on my hosts and then specify the gluster driver and gluster hosts to Convoy.

cloudnautique commented 8 years ago

@marceloaguero , we agree this template needs work to be useful in any serious type of environment. It has been created mostly to make it easy to try out Convoy. Also, our catalog needs some improvements like scheduling where the containers should go, probably want these on nodes with disks backing them, etc.

To meet a specific use case, you could clone the catalog into a fork and modify the template to meet your needs and add it to your rancher install. The catalog feature is really nice as far as making it easy to add your own.

marceloaguero commented 8 years ago

That's exactly what we did, Bill. We customize GlusterFS' catalog and, at least, it works as we wanted.

Actually, we only modify docker-compose.yml adding a line for the required volume as I tried to explain in https://forums.rancher.com/t/rancher-catalog-glusterfs-how-to-choose-where-bricks-get -created/2103