I started playing with Flocker for my persistent storage needs and I really like it. I have not had the greatest experience with Convoy NFS, and for what it’s worth, I really don’t want to use NFS for my production stack.
Anyway: Flocker allows me to use volumes on central persistent storage, and volumes move with a container. If a container moves from node1 to node2, the (persistent data) volume moves with it - slick.
Now my question:
I have a specific application where each instance of a service needs its own persistent data volume. However, when I scale up a service, they all get the exact same volume configuration. I’d love for the volume name to be dynamic - maybe even simply the container name. That way, when I scale up a service, the new containers would get their own volume using the same volume driver as the original service.
Basically, if I have a stack “frontend” with a service “nginx”, I’d like for each instance of this service to get its own named volume “frontend_nginx_1”, “frontend_nginx_2”, etc…
I know docker-compose supports variable interpolation in the .yml file. I wonder how this would behave within rancher? Can something be hacked together with what exists today, or is this a feature request?