Infrastructure Team/Puppet: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
Sugar Labs Puppet infrastructure. | |||
== Recipes == | |||
There are two kinds of Puppet recipes: | |||
Sugar Labs | * Puppet modules that are abstracted from final usage on particular Sugar Labs sites, | ||
* and recipes that composite modules and describe final configurations of Sugar Labs services. | |||
== Modules == | === Modules === | ||
Puppet modules configure particular service, e.g., mysqld and are not tied to final configurations. 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. Model repository might have followed branches: | |||
* ''master'', development version (might be absent if project is mirrorred from upstream), | |||
* ''production'', version is being used in production, | |||
* ''upstream'', if it is mirrorred project. | |||
=== Final configuration === | |||
Final recipes are stored on [[Machine/lightwave|puppetmaster host]] in private git repository: | |||
* {{Code|/var/lib/puppet/etc/puppet.git}} | |||
* {{Code|/var/lib/puppet/etc/puppet}} detached working directory | |||
* {{Code|/etc/puppet}} symlink to detached working directory | |||
* {{Code|/var/lib/puppet/etc/puppet.git/config}}: | |||
[core] | |||
[ | repositoryformatversion = 0 | ||
filemode = true | |||
bare = false | |||
sharedRepository = true | |||
logallrefupdates = true | |||
worktree = /etc/puppet | |||
[receive] | |||
denycurrentbranch = ignore | |||
[hooks] | |||
mailinglist = systems-logs@... | |||
emailprefix = "[PUPPET] " | |||
showrev = "git show -C %s; echo" | |||
* {{Code|/var/lib/puppet/etc/puppet.git/description}}: | |||
Sugar Labs Puppet configuration | |||
* {{Code|/var/lib/puppet/etc/puppet.git/hooks/post-receive}} | |||
#!/bin/bash | |||
/bin/bash /usr/share/doc/git-core/contrib/hooks/post-receive-email | |||
git checkout -f | |||
tail -n0 -f /var/log/daemon.log & | |||
puppet kick --all | |||
sleep 3 | |||
Git repository has submodules to all, used on all puppetized hosts, modules from [http://git.sugarlabs.org/puppets puppets] project. All submodules are checked out to ''production'' branch. | |||
== Nodes == | == Nodes == | ||