ReleaseEngineering/PuppetAgain/Data: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
(details on mirrors)
Line 7: Line 7:
* [[ReleaseEngineering/PuppetAgain/Repositories|repos]] - yum repositories
* [[ReleaseEngineering/PuppetAgain/Repositories|repos]] - yum repositories
* [[ReleaseEngineering/PuppetAgain/Python|python]] - python stuff
* [[ReleaseEngineering/PuppetAgain/Python|python]] - python stuff
Each tree has a `private` subdirectory which is not publicly mirrored.  '''Everything else is publicly mirrored!''' Do not place proprietary or secret documents outside of a private subdirectory!
= Mirror =
All of the public data for puppetagain is mirrored publicly on puppetagain.pub.build.mozilla.org.  If you are running a puppet master outside of Mozilla, please set it up to rsync periodically from this mirror:
  rsync -a rsync://puppetagain.pub.build.mozilla.org/data /data
The mirror is also available through HTTP at http://puppetagain.pub.build.mozilla.org/data.  This is primarily intended for manual download of particular files used to build releng systems, rather than as part of an automated system.  It is not built to handle direct access by external puppet clients (e.g., via an HTTP proxy).


= How to =
= How to =
Line 14: Line 24:
== .. add a data file ==
== .. 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.
As root, login to the designated puppet master (currently releng-puppet1.srv.releng.scl3.mozilla.com) and add the file in the appropriate place under /data.  In general, we try not to remove or overwrite files, but if you need to, do so.


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.
To accelerate the file-distribution process, run `puppetagain-sync`.  Note that this is run once an hour 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 the changes you made.


= How it works =
= How it works =
Line 36: Line 46:
</pre>
</pre>


The trees are synchronized using [http://oss.linbit.com/csync2/ csync2], using a config something like
The trees are synchronized, currently using rdist, although this is awful slow so we may look for another solution.
<pre>
group puppetagain-data-root {
    host puppetagain1.mozilla.com;
    host puppetagain2.mozilla.com;
    key /etc/csync2/keys/puppetagain-data-root.key;
    include /data;
    auto first;
}
</pre>
 
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.

Revision as of 20:06, 29 June 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:

Each tree has a `private` subdirectory which is not publicly mirrored. Everything else is publicly mirrored! Do not place proprietary or secret documents outside of a private subdirectory!

Mirror

All of the public data for puppetagain is mirrored publicly on puppetagain.pub.build.mozilla.org. If you are running a puppet master outside of Mozilla, please set it up to rsync periodically from this mirror:

 rsync -a rsync://puppetagain.pub.build.mozilla.org/data /data

The mirror is also available through HTTP at http://puppetagain.pub.build.mozilla.org/data. This is primarily intended for manual download of particular files used to build releng systems, rather than as part of an automated system. It is not built to handle direct access by external puppet clients (e.g., via an HTTP proxy).

How to

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

.. add a data file

As root, login to the designated puppet master (currently releng-puppet1.srv.releng.scl3.mozilla.com) and add the file in the appropriate place under /data. In general, we try not to remove or overwrite files, but if you need to, do so.

To accelerate the file-distribution process, run `puppetagain-sync`. Note that this is run once an hour 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 the 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, currently using rdist, although this is awful slow so we may look for another solution.