I’m trying to establish a command line workflow for working with Rancher. I’m using the rancher CLI as opposed to the rancher-compose command (but I can switch if necessary).
From what I’m seeing, “stacks” are composed of a docker-compose.yml and rancher-compose.yml. I can create or start a stack with these configuration files, however after that point I seem to lose any ability to manipulate the stack as a unit and must instead issue new commands that impact the individual services created.
For instance, if I start a stack with a set of docker/rancher compose files, I can’t make substantive changes to the stack just by editing those files. For instance, editing the config files to remove a service and issuing an up command (with or without -u) will have no impact on the removed service. It doesn’t go anywhere. If I change the scale attribute in the rancher-compose for a service, again, no impact at all, but if I add a new service to the config files and do an “up”, well, that works fine. The new service shows up in the stack
It’s hit and miss as to what is and isn’t affected by making changes my configuration files and then applying them to the stack. This inconsistency is a bit confusing and doesn’t make me feel confident using the CLI as I have little idea what changes I’m making to the configuration files actually end up being applied to the stack. I don’t want to have to reply on the UI to do things, as that’s obviously almost impossible to automate.
I feel like I am I missing something, or perhaps this is just the nature of the beast. Any ideas?