ReleaseEngineering/Puppet/Usage: Difference between revisions

Jump to navigation Jump to search
Line 286: Line 286:
* mv-production-puppet.build.mozilla.org
* mv-production-puppet.build.mozilla.org
* scl-production-puppet.build.scl1.mozilla.com
* scl-production-puppet.build.scl1.mozilla.com
'''NOTE: there are a lot of files that differ between the various directories, so using rsync involves a lot of whack-a-mole to avoid syncing files that aren't part of your change.  It may be easier to simply use 'cp' for this step'''
When you're ready to land in production it's important to sync your files from staging to ensure you don't end up with a different result in production. Here's the process to do that. On production-puppet as root, run:
When you're ready to land in production it's important to sync your files from staging to ensure you don't end up with a different result in production. Here's the process to do that. On production-puppet as root, run:
  rsync -n --delete -av --include="**usr/local" --exclude=local /N/staging/ /N/production/
  rsync -n --delete -av --include="**usr/local" --exclude=local /N/staging/ /N/production/
Line 292: Line 295:
  rsync --delete -av --include="**usr/local" --exclude=local /N/staging/ /N/production/
  rsync --delete -av --include="**usr/local" --exclude=local /N/staging/ /N/production/


<p>If there are things that shouldn't be synced carefully adjust the rsync command with --exclude or more specific paths.</p>
If there are things that shouldn't be synced carefully adjust the rsync command with --exclude or more specific paths.


Once you've landed into /N/production on production-puppet, the other production puppet masters need to be updated:
Once you've landed into /N/production on production-puppet, the other production puppet masters need to be updated:  In theory, this is done as 'filesync', but that user does not have permission to update the relevant directories, so in practice I suspect it's done as root.  Anyway, here's the example:
  sudo su - filesync
  sudo su - filesync
  rsync -av --exclude=**/local/etc/sysconfig/puppet* --exclude=**/local/Library/LaunchDaemons/com.reductivelabs.puppet.plist* --exclude=**/local/home/cltbld/.config/autostart/gnome-terminal.desktop* --delete  filesync@production-puppet.build.mozilla.org:/N/production/ /N/production/
  rsync -av --exclude=**/local/etc/sysconfig/puppet* --exclude=**/local/Library/LaunchDaemons/com.reductivelabs.puppet.plist* --exclude=**/local/home/cltbld/.config/autostart/gnome-terminal.desktop* --delete  filesync@production-puppet.build.mozilla.org:/N/production/ /N/production/
again, rsync is finicky, so scp may be your friend here:
  scp {root@production-puppet.build.mozilla.org:/N/production,/N/production}/darwin9-i386/build/Library/Preferences/com.apple.Bluetooth.plist


When you're ready, update the manifests on the masters with:
When you're ready, update the manifests on the masters with:
  hg -R /etc/puppet/manifests pull
  hg -R /etc/puppet/manifests pull
  hg -R /etc/puppet/manifests update
  hg -R /etc/puppet/manifests update
Note that some changes may require manifest updates first - think carefully about the intermediate state and what it will do to slaves!


Be sure to do this on all Puppet masters.
Be sure to do this on all Puppet masters.
canmove, Confirmed users
1,394

edits

Navigation menu