Portainer and GitOps
Portainer
Portainer's hybrid & multi-cloud container management software supports Kubernetes, Docker, Swarm in any Data Center, Cloud, Network Edge or IIoT Device.
The main instance of Portainer is hosted on Espresso but each other Docker host also has the Portainer Edge Agent installed, which enable central management.
Flowchart
As Portainer needs to be installed BEFORE we can use GitOps compose files, we do not use have a Compose file for it.
The above run command also enables the Watchtower to update Portainer. Watchtower (only enabled for containers with the watchtower enabled label) is deployed to all hosts as part of the 'all' edge stack. This ensures that Portainer is always up to date, as Portainer cannot update or manage itself.
Instances
Portainer
Edge Agent
Managing Portainer
Tags and Groups
Applying a tag to a Portainer instance allows us to organize instances into groups which makes identifying each individual servers function easier as well as some automation.
Currently, we have 4 tags;
Production
Production Bare Metal
Production Synology
Test
Assigning one or any of these tags to a Portainer instance will add it to the group by the same name
Stacks
Stacks are Portainers take on Docker Compose. The Compose file can be managed directly in Portainer or via a third party service, such as GitHub. Refer to the GitOps documentation for more information
Edge Stacks
Edge Stacks are stacks that are assigned to groups, which are then pushed to any Portainer instance in that group.
Unfortunately, Edge Stacks cannot be managed centrally via GitHub but instead centrally managed in Portainer.
GitHub / GitOps
GitOps gives you tools and a framework to take DevOps practices, like collaboration, CI/CD, and version control, and apply them to infrastructure automation and application deployment. Developers can work in the code repositories they already know, while operations can put the other necessary pieces into place.
This app is hosted externally
Last updated