Infrastructure Team/Puppet: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
Sugar Labs Puppet infrastructure. | Sugar Labs Puppet infrastructure. | ||
== | == Modules == | ||
Puppet modules configure particular services like [[Service/git|git.sugarlabs.org]] or MySQL but not tied to final configurations, they are being configured from [[#Master|puppetmaster]]. | |||
All modules are collected as repositories in [http://git.sugarlabs.org/puppets puppets] Gitorious project. Modules might be created from scratch or mirrored from upstream, so, all modules that are used within Sugar Labs are stored in one place. Module repository might have followed branches: | |||
* ''master'', development version (might be absent if project is mirrorred from upstream), | * ''master'', development version (might be absent if project is mirrorred from upstream), | ||
| Line 18: | Line 13: | ||
Auto generated [http://api.sugarlabs.org/puppets/ documentation]. | Auto generated [http://api.sugarlabs.org/puppets/ documentation]. | ||
=== | == Master == | ||
Only puppetmaster keeps final configuration for all Sugar Labs services. It is being started on [[Machine/lightwave|security machine]] in private git repository. | |||
=== Private repository === | |||
* {{Code|/var/lib/puppet/etc/puppet.git}} | * {{Code|/var/lib/puppet/etc/puppet.git}} | ||
| Line 56: | Line 53: | ||
sleep 3 | sleep 3 | ||
Git repository | === Repository hierarchy === | ||
Git repository consists of: | |||
* {{Code|modules/}}, all used modules from [http://git.sugarlabs.org/puppets puppets] project in form of submodules. | |||
* {{Code|manifests/site.pp}}, main recipe which contain common settings and includes nodes. | |||
* {{Code|manifests/roles/}}, recipes that describes final configuration for particular service. | |||
* {{Code|manifests/nodes/}}, puppetized nodes, configuration for hosts that ask puppetmaster. | |||
== Nodes == | == Nodes == | ||
' | Hosts that fetch configuration from the [[#Master|puppetmast]] need <code>puppet >= 2.6</code> package. If {{Code|puppet}} was installed from gems, it needs to be initially configured: | ||
puppetmasterd --mkusers | |||
Node's puppet agent might have optional configuration in {{Code|/etc/puppet/puppet.conf}}: | |||
[main] | |||
runinterval = <fetch-configuration-in-every-n-seconds> | |||
Every puppetized host should have particular node file in {{Code|manifests/nodes/<host-name>.pp}} on [[#Master|puppetmaster]]. | |||