ReleaseEngineering/Puppet/Usage: Difference between revisions

m
Line 144: Line 144:
* scl-production-puppet.build.scl1.mozilla.com
* scl-production-puppet.build.scl1.mozilla.com
* scl3-production-puppet.srv.releng.scl3.mozilla.com
* scl3-production-puppet.srv.releng.scl3.mozilla.com
* master-puppet1.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'''
'''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 scl3-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 155: Line 156:
If there are things that shouldn't be synced carefully adjust the rsync command with --exclude or more specific paths.
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:  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:
Once you've landed into /N/production on scl3-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@scl3-production-puppet.build.mozilla.org:/N/production/ /N/production/


again, rsync is finicky, so scp may be your friend here:
again, rsync is finicky, so scp may be your friend here:
   # mv-production-puppet   
   # mv-production-puppet   
   scp -p {root@production-puppet.build.mozilla.org:/N/production,/N/production}/darwin9-i386/build/Library/Preferences/com.apple.Bluetooth.plist
   scp -p {root@scl3-production-puppet.build.mozilla.org:/N/production,/N/production}/darwin9-i386/build/Library/Preferences/com.apple.Bluetooth.plist
   
   
   # scl-production-puppet (bug 615313)
   # scl-production-puppet (bug 615313)
   scp -p {root@production-puppet.build.mozilla.org:/N/production,/builds/production}/darwin9-i386/build/Library/Preferences/com.apple.Bluetooth.plist
   scp -p {root@scl3-production-puppet.build.mozilla.org:/N/production,/builds/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:
470

edits