Performance/Runbook/XHGui service

From Wikitech
Jump to navigation Jump to search

XHGui

Meta

Monitor XHGui

(TODO).

Upgrade XHGui

Ensure you have:

To update our mirror:

  1. In your local clone, fetch from origin and checkout origin/wmf_deploy.
  2. Revert any hot fix commits in our wmf_deploy branch. Use git revert aaa0, and reference any relevant Phabricator task in the commit message.
  3. Fetch from upstream and git-merge in all new commits to the desired upstream tag or commit hash. (e.g. git merge upstream/master)
  4. Ensure a git clean working tree (git reset --hard && git clean -dffx)
  5. 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.
  6. 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 or cache.
    • Commit them. Ensure the subject line starts with "WMF: " to clearly distinguish it from upstream commits.
  7. 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.
  8. Push to Gerrit. git push origin HEAD:wmf_deploy

To deploy in production:

  1. (This happens automatically every 30 minutes via Puppet.)

To deploy to Beta Cluster:

  1. Ensure relevant changes are pushed to operations/software/xhgui.git in Gerrit.
  2. ssh deployment-xhgui01.deployment-prep.eqiad.wmnet
  3. sudo puppet agent -tv (this will effectively run git pull in the place where Puppet installs XHGui)