| layout | architecture |
|---|---|
| title | Load Balanced |
| date | 2023-08-06 |
| version | v0.0.2 |
| summary | A complete server/agent architecture with multiple compilers and load balancing for redundancy. |
This architecture is intended for large infrastructures or dynamic infrastructures that require the redundancy of multiple compilers.
MainPuppetServer{Main Puppet Server}
subgraph Compilers[Compilers] Compile1[Compile1] Compile2[Compile2] Compile3[Compile3] end
LoadBalancer[Load Balancer]
Agent1(Agent 1) Agent2(Agent 2) Agent_n(Agent n)
click HDM "https://github.com/betadots/hdm" "HDM is a web interface for analyzing and managing hiera data." click Foreman "https://www.theforeman.org" "Foreman is a complete lifecycle management tool for physical and virtual servers." click Webhook "https://github.com/voxpupuli/puppet_webhook" "A webhook service that can trigger code deploys from source code repository updates."
git --webhook--> Webhook Webhook --r10k code deploy--> MainPuppetServer Webhook -.r10k code deploy.-> AllCompilers
Foreman --> MainPuppetServer MainPuppetServer --> Foreman HDM --> MainPuppetServer MainPuppetServer --> HDM
Compile1 --> MainPuppetServer Compile2 --> MainPuppetServer Compile3 --> MainPuppetServer
LoadBalancer --> Compile1 LoadBalancer --> Compile2 LoadBalancer --> Compile3
Agent1 --> LoadBalancer Agent2 --> LoadBalancer Agent3 --> LoadBalancer Agent_n --> LoadBalancer
{write a guide on how to deploy, configure, and use this architecture}
We recommend organizing your code as a Control Repository with branches for environments. See the reference repository for an example.
Foreman is a complete lifecycle management tool for physical and virtual servers. It will provide you with a graphical classifier, a Hiera data source, and report monitoring. It also includes the power to easily automate repetitive tasks, quickly deploy applications, and proactively manage servers, on-premise or in the cloud.
Configure Puppet Webhook to receive webhook events from your code repository and automate your code deploys. This service should be installed on the main Puppet Server. You might consider using the Bolt task from the puppet-r10k module to trigger code deployments on each compiler, or you can also install Puppet Webhook on each.
r10k is considered the default Puppet code deployment tool. Install it on the main Puppet Server and each compiler in your infrastructure and use it to deploy your control repository as needed.
If you're a Golang shop, you might consider g10k as well.
Puppet Agent Server connections are connections with long duration. Therfore it is highly recommended to use least_connection algorithm.
Any kind of load-balancer is sufficient. HAProxy is well supported and allows flexibility.
We recommend managing each of these components with the supported module.
- PuppetDB
- puppetlabs/puppetdb
- The default PostgreSQL database is recommended.
- Puppet Server
- Puppet Agents
- Puppet Metrics Dashboard
- Hiera Data Manager (HDM)
- HAproxy LoadBalancer