ReleaseEngineering/PuppetAgain/Modules/config

From MozillaWiki
Jump to navigation Jump to search

This module handles retrieving and access of the org specific config values.

Summary

Configuration is specified in an org-specific file, manifests-/$org-config.pp, which is symlinked from manifests/config.pp. This file defines a class, "config", which inherits from "config::base", which defines all config variables. The inherited class only needs to define variables whose values must change.

Usage

in manifests

class foo {
  include config
  if ($config::builder_username == "")
     fail("bad settings")
  }
}

in templates (note use of empty namespace designation)

Username is <%= scope.lookupvar('::config::builder_username') %>

Variables

These are the currently-defined configuration variables:

puppet_notif_email
The e-mail address or list to send errors of the puppet daemon to. (Defaults to dustin@mozilla.com)
puppet_server
The hostname of the puppet master we should connect to. Qualified or unqualified hostnames are acceptable. (Defaults to puppet)
puppet_servers
A list of all puppet servers, so clients can try other servers if puppet_server is down (Defaults to a one-element list containing the value of puppet_server)
data_server
The hostname of the data server (Defaults to the repos)
data_servers
A list of all data servers (Defaults to a one-element list containing data_server)
builder_username
The username for the build and test slaves (Defaults to cltbld)
nrpe_allowed_hosts
A comma-separated list of IPs from which NRPE should accept check requests (added in bug 733545)
relay_domains
The fqdn where your smarthost will send mail (added in bug 733536)
puppet_again_repo
The repository from which the PuppetAgain source should be fetched by puppet masters
global_authorized_keys
Names for SSH keys (see the ssh module) that will be accepted for root and (where applicable) builder on all hosts. All names listed here must have corresponding keys in modules/ssh/manifests/keys.pp.
puppet_server_reports
The 'reports' parameter that should be configured on puppet masters
puppet_server_reporturl
The 'reporturl' parameter that should be configured on puppet masters
buildbot_configs_hg_repo
mercurial repository for buildbot-configs it should point to: http://hg.mozilla.org/build/buildbot-configs (used in buildmaster)
buildbot_configs_branch
buildbot-configs branch to be checked out (used in buildmaster)
buildbot_mail_to
email address for buildbotmaster notifications (used in buildmaster)
buildbot_tools_hg_repo
mercurial repository for buildbot-configs http://hg.mozilla.org/build/tools (used in buildmaster)
master_json
URL for masters.json (note confusion about plurality) (used in buildmaster)
distinguished_master
This specifies the "distinguished" puppetmaster, which is the one that all of the others synchronize from. It should be one of the masters in $puppet_masters.
puppetmaster_upstream_rsync_source
rsync "URL" from which puppetmasters will synchronize their /data directory. Non-moco installations probably want to use rsync://puppetagain.pub.build.mozilla.org/data/ here. If this is blank, no upstream rsync is done.
puppetmaster_upstream_rsync_args
rsync arguments for the upstream rsync. You may want to add --delete here or some --exclude=.. options.
vmwaretools_version
numeric version of VMware Tools that should be installed on VMware hosts. Note that you must supply the tarball for this in the 'repos/private/vmware' data directory - see https://github.com/craigwatson/puppet-vmwaretools
vmwaretools_md5
hash of the VMware Tools tarball, used to validate the download
graphite_cluster_fqdn
fqdn of default graphite cluster

Functions

This module also defines the secret function; see ReleaseEngineering/PuppetAgain/Secrets.