Is there a way to create a custom, private library (aka templates) to add to the catalog?
For example I’d like to allow employees at my company to quickly spin up stack with a predefined set of services, how they’re linked, some default env variables etc. But I don’t want to make this a public template. In fact some of the service docker images refer to a private hub, which wouldn’t work for public anyway.
Just did this myself, though I don’t know that Rancher officially supports it.
For myself, to make it easy, I temporarily disabled auth on our private repo and set it up with plain http.
Then I exec’d into the running rancher-server container and created an ssh keypair. I updated the git config file directly to switch to ssh (the repos are in /var/log/cattle/DATA/) then did one manual git pull so I could accept the host key.
To clarify, I disabled authentication on my repo so I could figure out where the repo ends up. You can do this without disabling authentication:
exec into your rancher server container (docker exec -i -t <container-id> /bin/sh)
provide id_rsa.pub to your git repo
git clone <your repo> <catalog-alias>
add the git repo to Rancher via the webUI using the same catalog alias and git URI you used above.
They do have a feature request open to support this directly: