Account confirmers, Anti-spam team, Confirmed users, Bureaucrats and Sysops emeriti
1,529
edits
No edit summary |
|||
| Line 162: | Line 162: | ||
* Disable a random production slave, commenting with whatever bug you need it for, (you're essentially doing a loan - but need puppet running) | * Disable a random production slave, commenting with whatever bug you need it for, (you're essentially doing a loan - but need puppet running) | ||
** ''There is no need for puppet environment for this, its a builder and already has xcode'' | ** ''There is no need for puppet environment for this, its a builder and already has xcode'' | ||
* login to your host as cltbld | |||
* Get the necessary file: | |||
mkdir mercurial | |||
cd mercurial | |||
wget -O py27_mercurial-dmg.sh \ | |||
http://hg.mozilla.org/build/puppet/raw-file/default/modules/packages/manifests/mozilla/py27_mercurial-dmg.sh | |||
chmod 755 ./py27_mercurial-dmg.sh | |||
* Update the script to be the correct version | |||
OLDHGVER=3.2.1 | |||
NEWHGVER=4.0 | |||
sed -i "s/version=$OLDHGVER/version=$NEWHGVER/" ./py27_mercurial-dmg.sh | |||
* Get the new tar.gz | |||
wget http://mercurial.selenic.com/release/mercurial-$NEWHGVER.tar.gz | |||
* Run the script | |||
./py27_mercurial-dmg.sh | |||
* The script will output where the dmg is, copy it outside the host (storing it in a way that you know it was for 10.7) | |||
* You now want to reimage the slave following [https://mana.mozilla.org/wiki/pages/viewpage.action?pageId=34014655 this mana doc], and put it back in production in slavealloc | |||
==== 10.8 (Mountain Lion) ==== | ==== 10.8 (Mountain Lion) ==== | ||
| Line 177: | Line 194: | ||
include packages::xcode | include packages::xcode | ||
} | } | ||
* login to your host and run puppet | |||
** '''''CHANGE THE PUPPET ARGS APPROPRIATELY'''' | |||
ssh root@talos-mtnlion-r5-XXX.build.mozilla.org | |||
puppet agent --server foo --test --environment jwood | |||
* change to cltbld | |||
su - cltbld | |||
* Get the necessary file: | |||
mkdir mercurial | |||
cd mercurial | |||
wget -O py27_mercurial-dmg.sh \ | |||
http://hg.mozilla.org/build/puppet/raw-file/default/modules/packages/manifests/mozilla/py27_mercurial-dmg.sh | |||
chmod 755 ./py27_mercurial-dmg.sh | |||
* Update the script to be the correct version | |||
OLDHGVER=3.2.1 | |||
NEWHGVER=4.0 | |||
sed -i "s/version=$OLDHGVER/version=$NEWHGVER/" ./py27_mercurial-dmg.sh | |||
* Get the new tar.gz | |||
wget http://mercurial.selenic.com/release/mercurial-$NEWHGVER.tar.gz | |||
* Run the script | |||
./py27_mercurial-dmg.sh | |||
* The script will output where the dmg is, copy it outside the host (storing it in a way that you know it was for 10.8) | |||
* You now want to reimage the slave following [https://mana.mozilla.org/wiki/pages/viewpage.action?pageId=34014655 this mana doc], and put it back in production in slavealloc | |||
==== 10.9 (Mavericks) ==== | ==== 10.9 (Mavericks) ==== | ||
* '''WARNING''' As of this writing we only have mac-v2-signing using mavericks, however we do need mercurial on these systems. | * '''WARNING''' As of this writing we only have mac-v2-signing using mavericks, however we do need mercurial on these systems. | ||
* The version built on 10.8 worked with mavericks as of this docs writing, so instead of giving full docs here for building a mavericks version, I'm hopeful next hg ver works on mavericks when built on 10.8 '''or''' we no longer have mavericks in production. | * The version built on 10.8 worked with mavericks as of this docs writing, so instead of giving full docs here for building a mavericks version, I'm hopeful next hg ver works on mavericks when built on 10.8 '''or''' we no longer have mavericks in production. | ||
* Deployment section will do the deploy of the 10.8 version for Mavericks | |||
==== 10.10 (Yosemite) ==== | ==== 10.10 (Yosemite) ==== | ||
| Line 196: | Line 236: | ||
include packages::xcode | include packages::xcode | ||
} | } | ||
* login to your host and run puppet | |||
** '''''CHANGE THE PUPPET ARGS APPROPRIATELY'''' | |||
ssh root@talos-t-yosemite-r5-XXXX.build.mozilla.org | |||
puppet agent --server foo --test --environment jwood | |||
* change to cltbld | |||
su - cltbld | |||
* Get the necessary file: | |||
mkdir mercurial | |||
cd mercurial | |||
wget -O py27_mercurial-dmg.sh \ | |||
http://hg.mozilla.org/build/puppet/raw-file/default/modules/packages/manifests/mozilla/py27_mercurial-dmg.sh | |||
chmod 755 ./py27_mercurial-dmg.sh | |||
* Update the script to be the correct version | |||
OLDHGVER=3.2.1 | |||
NEWHGVER=4.0 | |||
sed -i "s/version=$OLDHGVER/version=$NEWHGVER/" ./py27_mercurial-dmg.sh | |||
* Get the new tar.gz | |||
wget http://mercurial.selenic.com/release/mercurial-$NEWHGVER.tar.gz | |||
* Run the script | |||
./py27_mercurial-dmg.sh | |||
* The script will output where the dmg is, copy it outside the host (storing it in a way that you know it was for 10.10) | |||
* You now want to reimage the slave following [https://mana.mozilla.org/wiki/pages/viewpage.action?pageId=34014655 this mana doc], and put it back in production in slavealloc | |||
=== Windows === | |||
As of this doc's writing; this is done via GPO installing to <code><mozilla-build>/hg</code> as a ''blow-away-what-was-there'' install. This needs to be created for both builders (c.f. {{bug|1056981}}) and testers (c.f. {{bug|1110304}}) | |||
== Package Deployment == | |||
=== CentOS === | |||
'''Note''': This is an informative depiction of https://wiki.mozilla.org/ReleaseEngineering/PuppetAgain/Packages#CentOS:_Adding_New_Packages | |||
CentOS needs the files on releng-puppet2 (the distinguished puppetmaster). | |||
* Transfer the files from local to releng-puppet2 (your user dir) | |||
scp ./*.rpm `whoami`@releng-puppet2.srv.releng.scl3.mozilla.com:mercurial/ | |||
* As root, copy the files over and fixup | |||
**CHANGE THE USERNAME** | |||
sudo su - | |||
for i in `ls ~jwood/mercurial/mozilla-python27-mercurial-*.el6.{src,x86_64,i686}.rpm`; | |||
do | |||
cp ./$i /data/repos/yum/releng/public/CentOS/6/x86_64/$i; | |||
done | |||
for i in `ls ~jwood/mercurial/mozilla-python27-mercurial-*.el6.{src,i686}.rpm`; | |||
do | |||
cp ./$i /data/repos/yum/releng/public/CentOS/6/i386/$i; | |||
done | |||
pushd /data/repos/yum/releng/public/CentOS/6/i386 | |||
puppetmaster-fixperms | |||
popd | |||
pushd /data/repos/yum/releng/public/CentOS/6/x86_64 | |||
puppetmaster-fixperms | |||
popd | |||
=== Ubuntu === | |||
'''Note''': This is an informative depiction of https://wiki.mozilla.org/ReleaseEngineering/PuppetAgain/Packages#Ubuntu:_Adding_New_Packages | |||
* Transfer the files from local to releng-puppet2 (your user dir) | |||
scp ./* `whoami`@releng-puppet2.srv.releng.scl3.mozilla.com:mercurial-apt/ | |||
* As root, copy the files over and fixup | |||
**CHANGE THE USERNAME** | |||
sudo su - | |||
cd /data/repos/apt/custom/mozilla-mercurial | |||
cp -v ~jwood/mercurial-apt/amd64/mozilla-python27-mercurial_*{_amd64.changes,_amd64.deb,.debian.tar.gz,.dsc,.orig.tar.gz} ./pool/precise/ | |||
cp -v ~jwood/mercurial-apt/i386/mozilla-python27-mercurial_*{_i386.changes,_i386.deb,.debian.tar.gz,.dsc,.orig.tar.gz} ./pool/precise/ | |||
./update.sh | |||
puppetmaster-fixperms | |||
=== OSX === | |||
'''Note''': This is an informative depiction of https://wiki.mozilla.org/ReleaseEngineering/PuppetAgain/Packages#Darwin | |||
* Transfer the files from local to releng-puppet2 (your user dir) | |||
scp ./*.dmg `whoami`@releng-puppet2.srv.releng.scl3.mozilla.com:mercurial-DMGs/ | |||
** This instruction assumes your DMGs are located at 10.X/ under that directory | |||
* As root, copy the files over and fixup | |||
**CHANGE THE USERNAME** | |||
sudo su - | |||
cd /data/repos/DMGs | |||
cp -v ~jwood/mercurial-DMGs/10.6/* 10.6/ | |||
cp -v ~jwood/mercurial-DMGs/10.7/* 10.7/ | |||
cp -v ~jwood/mercurial-DMGs/10.8/* 10.8/ | |||
cp -v ~jwood/mercurial-DMGs/10.10/* 10.10/ | |||
# 10.9 uses the same build as 10.8 | |||
cp -v ~jwood/mercurial-DMGs/10.8/* 10.9/ | |||
puppetmaster-fixperms | |||
== Create puppet patch == | |||
* replace the spec file for CentOS | |||
** The final spec file you used above for the CentOS build you should place at <code><path-to-local-puppet-repo>/modules/packages/manifests/mozilla/py27_mercurial.spec</code> | |||
* replace all files for the Debian packaging | |||
** The final files you use above for Ubuntu should be replace the entire contents of the directory at <code><path-to-local-puppet-repo>modules/packages/manifests/mozilla/mozilla-python27-mercurial-debian</code> | |||
* replace the dmg creation script | |||
** If you changed the package building script above for OSX, replace the one at <code><path-to-local-puppet-repo>modules/packages/manifests/mozilla/py27_mercurial-dmg.sh</code> | |||
* Update the mercurial versions in <code><path-to-local-puppet-repo>modules/packages/manifests/mozilla/py27_mercurial.pp</code> | |||
** You can do this by hand too, be sure to change the versions specified | |||
sed -i "s/3.2.1/3.2.2/" modules/packages/manifests/mozilla/py27_mercurial.pp | |||
* Update the repoflag to cause the system package repository cache to refresh | |||
** Inside modules/packages/manifests/setup.pp you want to increase the repoflag var everwhere | |||
* Post the patch to the upgrade bug, and request review. (testing first if desired, see next section) | |||
== Testing the patch == | |||
* On a puppetmaster you should apply the above created patch and run against one of each of the host types (centos builder both arch's, ubuntu testers both arch's, all vers of OSX) | |||
== Deploy the change == | |||
* Commit the reviewed patch to default branch of puppet | |||
* Merge patch to production branch of puppet | |||
* push patch | |||
* Inform sheriffs of the deploy | |||
* Allow 24 hours for AWS slaves to regen their "golden image" to ensure no breakage there. | |||
* Patch should begin deploying to all server and "atboot" class machines within about 30 minutes of push. | |||
edits