Tried to consolidate all questions in one post re clusters, deployment and catalogs

We recently began to use rancher in our production environment and while we found work arounds for most of them, i still want to make sure that we utilize rancher correctly and consolidated all questions that we came across as we started the deployment (fully understand that most questions can’t be answered in the same response, i’ll be more than happy with responses to at least some of the questions) :

  1. Do you still need to use etcd or consul if you initialize swarm cluster via rancher or does it deploy redundant consul and will automatically take care of failover, etc. ?

  2. How to do VARIABLE SUBSITUTIONS in swarm project setup? For example, we want to take 1 docker-compose file, and specify a variable that will hold current host’s machine name (to expose it to the container within the container). Is variable substitution the correct thing to utilize for this?

  3. Is there a way to tell catalog template to deploy different part of stack to specific type of node (i.e. available resources, labels, only 1 per node, etc.)?
    SOLVED: need to use label matching

  4. Is there a way to specify network interface that is used for network drivers and overlays that rancher sets up for it’s internal network? (all servers have multiple network cards - 1 or 2 for public internet and 1 or 2 for local/secure network. Is there a way to add a host via rancher and specify which network interface it should be using.
    SOLVED: (kind of) - need to specify CATTLE IP address when registering agent, I think it should limit rancher to work only with that IP but centos7 appears to be currently having issues with port mapping, so can’t verify

  5. Is there benefit in adding the volumes if the data for the container is mostly stored on same “localhost”, etc. ?

  6. Can you recommend log tailing UI or other ways to monitor logs? Sysdig is available as a public catalog stack, but i was wondering if there’s anything that you would recommend looking into for log tailing / aggregation / monitoring / etc. that has lowest impact on rancher/host/network resource?

  7. We already “used to use” chef for server management and configuration, how does it fit into docker/rancher picture, or does the complexity outweigh the benefits of NO longer using it and instead setup Dockerfile’s, containers, images and compose files?

  8. Adding private catalog is painful because need to log in to the container to install own ssh private key, and ssh init to generate known_host entry in ~/.ssh/known_host. Would be nice if this step could be exposed via UI (to specify credentials for private catalogs, and to pull the host key so git can clone newly added repo without errors)
    RECOMMENDATION: this command will initialize entry to known_hosts: ssh-keyscan -trsa,dsa -p 22 somedomain.com

  9. What are menus Projects, Sevices and System in swarm stack in rancher interface? In which one of these menus should new stack be normally deployed?

  10. How do you specify restrictions/scheduling for deploying new swarm “Projects” (ie. launch one on each node)?
    SOLVED: needed to use labels

  11. Is there a way to initiate addition of containers only when CPU / Disk / Network resource is less loaded than nn% ? for example is rule like this possible:

  • If there’s more than 1 machine in the cluster,
  • And if one of the “services”/“containers” is overloaded or overutilized, then start up a container on another least loaded host to help the struggling “service” and then kill itself when the service stabilized and extra container no longer needed?

I will admit that your consolidated questions are much more daunting to attempt to answer all at once. :slight_smile: I’ll try to provide answers to what I know off the top of my head. I haven’t spent too much time with Swarm deployments yet.

  1. There’s nothing specific that Rancher recommends, but I know some other users have found the Prometheus catalog entry interesting.

  2. Projects are the equivalent of Stacks in a cattle environment. They are just ways to organize the different groups of services. Services under the system tab are services that Rancher deploys or catalog items that integrate with Rancher that enhances Rancher. The services that the user deploys are under Services.

  3. It sounds like you would like this:

I setup a swarm and added 7 members to it.
I then tried to install a stack from catalog template (tried all of the other ones as well) and i couldn’t figure out if same concepts of rancher’s load balancers and scaling certains services in the stack?

ie: install wordpress with 2 web nodes and 1 DB, or setup elasticsearch with 1 client but multiple masters and data nodes, etc.?

is it possible to do it in Rancher’s Swarm environment or does it have to be Cattle environment to utilize all the rancher’s functionality that’s got to do with scaling and load balancing?

Thank you.