container.training
container.training copied to clipboard
#393 slides about portainer api
I tried to add 2 slides to demonstrate 2 of the major benefits of the portainer API.
- You will get a privilege management (not an API exclusive benefit)
You can not can restrict almost all resources to teams/users.
That will allow you to setup a docker-swarm as administrator. Deploy some "infrastructure"-stacks for logging, monitoring and the portainer agent but restrict the access to these stacks only to administration-users.
"Normal" Users/Teams cannot edit/remove these stacks.
- You can use the API to deploy stacks on different swarms via one entrypoint.
This gets really big, when you start adding multiple swarms to portainer. You just have to deploy the portainer agent on the swarms you want to manage. Have one docker-swarm for all your management stuff and several for processing.
With the privilege mangement, you can now give teams access to selected swarms. This all applies also to the API. So your teams can now deploy stacks via CI with HTTP on selected swarms not affecting swarms of other teams via a single "PAAS" entrypoint.
One thing you can only do with the portainer API is the deployment of a stack from a git repository. So you don't have to handle local docker-compose files or post the compose-data into the API. You can just give the API a path to a docker-compose-file in a git-repository. There is a downside. You cannot use config or env files at this moment.
:+1:
I'll defer to @BretFisher but I think this is interesting!
(I didn't check the formatting, the second slide seems a bit long maybe?)
Pinging @BretFisher about this PR that's been languishing...
Thanks @bridgetkromhout, @unglaublicherdude sorry for nearly a year delay on this. I forgot it existed. Thanks for your PR. Do you still want us to review it? Some thoughts:
- These slides are designed to work on a single 3-node cluster, so "add a second cluster" isn't possible. You could have a slide talking about some benefits of Portainer in that it can manage multiple docker engines and multiple swarms if you like.
- The instructions need to be exact so people reading these steps can follow along on their own, and any thing they have to do should be in an exercise block, to break out the learning from the doing, so things like "deploy an app template (which one, how)" and "http POST" (how are you doing that, with curl?" need to be cleared up.
Thanks!