Performance/Runbook/XHGui service
< Performance | Runbook
This is the internal runbook for XHGui service.
Hosts
Hosts as of Dec 2019 (T180761):
Provisioned by the Puppet role::xhgui::app, which installs the web app from the wikimedia/operations-software-xhgui repository, which is a manual mirror of the upstream perftools/xhgui project on GitHub.
Public web access is provided via an Apache proxy from the webperf host that serves performance.wikimedia.org.
Meta
- Public URL:
- Production: https://performance.wikimedia.org/xhgui/
- Beta cluster: https://performance.wikimedia.beta.wmflabs.org/xhgui/
- User documentation: XHGui
- Database: m2
Monitor XHGui
(TODO).
Upgrade XHGui
Ensure you have:
- a local git clone of our origin repo ssh://gerrit.wikimedia.org:29418/operations/software/xhgui
- a second remote on that local clone, for upstream. E.g.
git remote add upstream git@github.com:perftools/xhgui.git
. - owner access to operations/software/xhgui.git (granted to Gerrit group "performance", per access).
To update our mirror:
- In your local clone, fetch from origin and checkout
origin/wmf_deploy
. - Revert any hot fix commits in our wmf_deploy branch. Use
git revert aaa0
, and reference any relevant Phabricator task in the commit message. - Fetch from upstream and git-merge in all new commits to the desired upstream tag or commit hash. (e.g.
git merge upstream/master
) - Ensure a git clean working tree (
git reset --hard && git clean -dffx
) - Create a commit reflecting from which hash to which hash we are upgrading, and mention any relevant Phabricator tasks. Ensure the subject line starts with "WMF: " to clearly distinguish it from upstream commits.
- Create our standard patch on top:
- Ensure
/vendor
is absent from.gitignore
. Instead, ensure/vendor/**/.git
is present. - Ensure
/cache
is absent.git rm cache/
, if it is present. - Ensure a key for
config.platform.php
exists in composer.json and is set to"5.6.40"
(the oldest version currently used in production, e.g. tungsten.eqiad). Without this, Composer will expand its dependency tree based on the PHP version you have locally which may be unrelated/different from production. It is needed because xhgui-collector uses the PHP 7 "random_bytes()" function, and the optional polyfill package is skipped by Composer if installed on PHP 7+. (Upgrade to PH7 tracked at T180761). - Ensure a key for
config.platform.ext-mongodb
exists in composer.json and is set to"1.2.3"
. This is again to make sure the Mongo-related packages are expanded correctly based on production. - Run
composer require --no-update alcaeus/mongo-php-adapter:1.1.0
to accept this suggested dependency (it is required for XHGui on PHP 7. It is harmless for Tungsten/PHP5). - Run
composer install --prefer-dist --no-dev
. - Stage any changes made to
.gitignore
,composer.json
,vendor
orcache
. - Commit them. Ensure the subject line starts with "WMF: " to clearly distinguish it from upstream commits.
- Ensure
- If any of our reverted hot fixes are still needed (e.g. not fixed by this new upstream version), re-apply them now using
git cherry-pick
. - Push to Gerrit.
git push origin HEAD:wmf_deploy
To deploy in production:
- (This happens automatically every 30 minutes via Puppet.)
To deploy to Beta Cluster:
- Ensure relevant changes are pushed to operations/software/xhgui.git in Gerrit.
ssh deployment-xhgui01.deployment-prep.eqiad.wmnet
sudo puppet agent -tv
(this will effectively rungit pull
in the place where Puppet installs XHGui)