Here is more detail about how I have setup my Gluster. I built my server outside of my rancher environment. I did not use the one from the catalog, because, like you, after several tries, it just kept failing. Its really meant for testing anyway and not for a productions build. Important note: I have a base image that I use for all my rancher host. This base image has the AWS CLI installed. That will be important later. I call this image Docker GOLD
- I started here : http://gluster.readthedocs.io/en/latest/Install-Guide/Install/4
- I installed this on two t2.small instances with 16GB os drives and 50 GB storage drives. I used my Docker Gold image.
- Following the instructions I created a volume and named it vol1.
- I modified my Docker GOLD image by installing the Gluster driver.
- I added the mount command to the User Data of my Launch config. So now every host in my system is mounting that volume to /app
sudo mkdir /app sudo mount -t glusterfs glusterfs1.domain.com:vol1 /app
- Inside that volume I created a folder called data. (its important that you don’t create your directories at the root of the volume.) Under data is the individual folder(s) for each app. For example there is one for the Registry, called registry.
- I can then modify the “volumes” section of the docker-compose as appropriate. For example:volumes:
So far it is working like a charm. I did have to trigger a self heal once because I had deleted something directly off the server. If you need to delete something do it from the mounted volume.