ReleaseEngineering/PuppetAgain/Data: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "Each tree in the puppet data store needs to be available at puppet:///$tree and http://repos/$tree, except the $repos tree, which is omitted from puppet:/// for efficiency. = Ho...")
 
No edit summary
Line 1: Line 1:
Each tree in the puppet data store needs to be available at puppet:///$tree and http://repos/$tree, except the $repos tree, which is omitted from puppet:/// for efficiency.
Each tree in the puppet data store needs to be available at puppet:///$tree and http://repos/$tree, except the $repos tree, which is omitted from puppet:/// for efficiency.
= Trees =
The currently-defined trees are:
* [[ReleaseEngineering/PuppetAgain/Repositories|repos]] - yum repositories
* [[ReleaseEngineering/PuppetAgain/Python|python]] - python stuff


= How to =
= How to =

Revision as of 00:05, 3 May 2012

Each tree in the puppet data store needs to be available at puppet:///$tree and http://repos/$tree, except the $repos tree, which is omitted from puppet:/// for efficiency.

Trees

The currently-defined trees are:

How to

(for the moco setup - other installs may have different procedures)

.. add a data file

As root, login to any puppet master and add the file in the appropriate place under /data. Or remove a file, if that's your thing.

To accelerate the file-distribution process, run `puppetagain-sync -v`. Note that this is run periodically on a crontask, so this step is not required. Whether you run it manually or from cron, a change-management email will be sent to indicate teh changes you made.

How it works

Here's how we run this at moco:

All data is stored under /data/$tree on each master. A virtualhost makes all of /data available:

<VirtualHost *:80>
        DocumentRoot /data
</VirtualHost>

and a puppet fileserver.conf entry makes each tree available:

[python]
path /data/python
allow 0.0.0.0/0

The trees are synchronized using csync2, using a config something like

group puppetagain-data-root {
    host puppetagain1.mozilla.com;
    host puppetagain2.mozilla.com;
    key /etc/csync2/keys/puppetagain-data-root.key;
    include /data;
    auto first;
}

A crontask triggers csync2 periodically, via a hand-written synchronization script that can also be run by hand when desired. In either modality, the script sends a change-management email with the output of `csync2 -T`, so that we have a record of what has changed.