This document discusses using Puppet in non-traditional ways for deploying distributed applications across heterogeneous servers. It outlines pushing configuration from a central node using MCollective instead of relying on Puppet's master-agent architecture. Issues with the traditional approach are noted along with experiments trying different methods to dynamically generate configurations, including passing parameters via facts instead of using site.pp. The goal is to eliminate single points of failure and scalability bottlenecks. Future steps proposed include deploying in stages based on dependency graphs and allowing other configuration management tools.
3. ● Heterogenous servers
● User-defined roles for distributed application
● Operations
○ Remove / add nodes
○ Add roles and deploy
● Deployment is activated by user
● Multiple envs, different versions of code to be
deployed
● Simultaneous deployments and other actions
1.1 Use case
4. 1. Puppet Master serving the configuration code
2. Puppet agents are ran by cron every 30min
3. Text file site.pp with definition what to deploy
and where
4. PuppetDB to share data between nodes
5. ENC to get variables from external source
6. Hiera: Key-value store
1.2 Traditional Puppet Usage
5. 1. Use Puppet
2. It should run by click on Deploy, not every 30min
3. Multiple environments
4. Simultaneous deployment where possible
5. Operations (redeployment, adding roles, etc.)
1.3 Our Initial Requirements
7. ● Publish-subscribe middleware over AMQP
(STOMP)
● Simple agents, written in Ruby
● Agents on nodes can be run by simple command
from master node
● Agent to run puppet already existed
● MCollective can be used as a library
2.1 Marionette Collective
9. ● Multithreading issues
● Existing agent for puppet had multiple issues
● Time synchronization sensitive
● No reconnect after network failure
2.3 And we tried...
13. Pros: unknown for our purposes
Cons:
● site.pp is code, and logic to write it properly is
required
● concurrency issues if simultaneous deployment
3.3 site.pp
Data
Calculation
Puppet
agent
site.pp
Puppet
master
14. Pros:
● Simple well-known mechanism of passing params
Cons:
● Architecture gets complicated
○ Have to make sure that nothing changes data
for ENC before puppet reads
○ Hard to develop: data must be in storage
3.4 ENC
Data
Calculation
Puppet
agent
Puppet
master
Storage
ENC
15. Cons:
● Additional point of failure
● Two storages: need to handle consistency
● Additional dependency: Cobbler is not just PXE
anymore, hard to replace
3.5 ENC + Cobbler YAML Storage
Data
Calculation
Puppet
agent
Puppet
master
Cobbler
YAML
Storage
ENC
16. Pros:
● Puppet Master is optional
● Easy to debug and develop: all data in one file
Cons:
● Facts can be strings only
● All variables loaded are global
3.6 Passing parameters via facts
Data
Calculation
Puppet
agent
facts
on
nodes
Puppet
master
17. ● YAML config is generated for every puppet run
● Placed to /etc/ by MCollective
3.6.1 YAML config is created on node
Data
Calculation
---
role: compute
nova:
- rabbitmq: ":5672"
api: ":8774"
ip: 10.20.0.2/24
21. Main reasons:
1. Additional SPoF
2. Scalability issues
3. Issues with certificates
4. Multiple envs with multiple versions of manifests
5. Temptation to use PuppetDB and other, which
add points of failure
4.1 Next steps: Get rid of Puppet Master
22. ● Controller role
○ nova-api
○ nova-scheduler
○ MySQL <- what if customer wants it on the other
server?
○ glance-api
○ glance-registry
○ keystone
4.2 Next steps: Deployment by stages
DB
Controller
node 1 node 2