Discussion on how to better use the Rancher Community Catalog

Hello Rancher Community!

I am amazed about how much efforts we have put in sharing some of our stacks in the Rancher Community Catalog. I fully understand Rancher decision to separate it from the official rancher catalog with supported stacks.

I love the idea of the community catalog but I have had recently difficulties in using it in real case scenarios due to various reasons I list below. I will put my questions towards the community and the Rancher staff, just to understand how to make better usage of it.

I have seen many stacks have declared published ports on hosts, scheduling labels, load balancer already declared in the stack. Often one wants to adjust these values during instantiation of the stack. E.g. a stack having a port published 8080 makes it impossible to deploy on a host where port is already in use. Or if a stack expect a host with a label balancer=true and one already has same label used with balancer=yes…it makes impossible to use the stacks in practical terms without forking them.

Proposed best practices
Therefore in order to make the community stack more useful for all of us I would recommend the following best practices:

  1. ports declaration. Don’t publish ports on host. If needed use random chosen ephemeral ports or have them as a variable (form input).
  2. labels. Avoid hard coded labels,
    And don’t use host labels for scheduling that have generic names. Instead of db=true use stackname-db=true.
    Best option is to make labels as variable so that can be decided from who uses the stack.
  3. loadbalancer. Don’t include a loadbalancer in the stack, only internal loadbalancer are fine in my opinion. Let the deployer decide on which loadbalancer the stack should be connected to. E.g. write in documentation README which service and port needs to be added to loadbalancer.

Further questions

  1. How to deal with log drivers plugins?
  2. When a Catalog Stack is deployed, it can be easily modified, and very difficult to see what has been changed compared to the original stack … there is no built-in diff in the Rancher UI…
  3. Rancher Catalogs are also proliferating on github, right now there are 126 Rancher catalogs on github…why not using the same Community Catalog?

Due to the reasons above, I find the Community Catalog stacks very difficult to use them in production. So I just take them as examples and tend to copy and put them in my own catalog, in order to change those values…but than I am on my own and loose the benefit of the “upgrade” from the original stack…So I am a bit puzzled on how to make best use of the Rancher Community Catalog. What is its intended usage pattern?

I would appreciate a page with “Best practices for Rancher Catalog templates” so that they are easier to re-use, preferably under the Rancher docs.

What are your thoughts about the above? Anything that can be done better? :slight_smile:

1 Like