Infrastructure Team/Puppet

Sugar Labs Puppet infrastructure.

Recipes

There are two kinds of Puppet recipes:

  • 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

Puppet modules configure particular services (e.g., mysqld) and are not tied to final configurations. All modules are collected as repositories in 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.

Auto generated documentation.

Final configuration

Final recipes are stored on puppetmaster host in private git repository:

  • /var/lib/puppet/etc/puppet.git
  • /var/lib/puppet/etc/puppet detached working directory
  • /etc/puppet symlink to detached working directory
  • /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"
  • /var/lib/puppet/etc/puppet.git/description:
Sugar Labs Puppet configuration
  • /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 puppets project. All submodules are checked out to production branch.

Nodes

In progress

End-usage nodes. Configuration settings are tracked by local git repository only since contain private data.

jita.sugarlabs.org