My GlusterFS Configuration

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 :
  • 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 /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:
    – /app/data/registry/certs:/etc/nginx/certs:ro

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.


Follow by Email

Leave a Reply

Your email address will not be published. Required fields are marked *