Phabricator/Deployment: Difference between revisions

From Wikitech
Content deleted Content added
Mention maintenance windows.
Add sections
Line 14: Line 14:


== Tagging a release ==
== Tagging a release ==

=== On your development system ===


* scripts for tagging and pushing
* scripts for tagging and pushing
Line 20: Line 22:
** outputs markup for milestone (but this sometimes fails)
** outputs markup for milestone (but this sometimes fails)
** make sure everything got pushed
** make sure everything got pushed

* phab1001
=== On phab1001 ===
** /srv/phab

** make sure it can pull
* /srv/phab
** fetch all submodules on prod
* make sure it can pull
** ends at detached HEAD state
* fetch all submodules on prod
** make sure tags are there
* ends at detached HEAD state
** <code>update.sh</code> in mukunda's homedir on phab1001
* make sure tags are there
*** puppet disable
* <code>update.sh</code> in mukunda's homedir on phab1001
*** stops `phd`
** puppet disable
*** checks out the version
*** stops apache and php
** stops `phd`
** checks out the version
*** /usr/local/sbin/phab_deploy_finalize does db migrations and stuff
** stops apache and php
** `!log starting phabricator deploy, momentary downtime expected while apache restarts`
** /usr/local/sbin/phab_deploy_finalize does db migrations and stuff
** `sudo ~/update.sh` and hope for best
* `!log starting phabricator deploy, momentary downtime expected while apache restarts`
** `systemctl status phd` to make sure that's running
** `tail /var/log/phd.log` to check for problems
* `sudo ~/update.sh` and hope for best
* `systemctl status phd` to make sure that's running
*** always a lot of errors in here because of repo syncing, etc.
** check `/var/log/apache2/phabricator.log` ???
* `tail /var/log/phd.log` to check for problems
** always a lot of errors in here because of repo syncing, etc.
* check `/var/log/apache2/phabricator.log` ???


== Make milestone ==
== Make milestone ==

Revision as of 22:21, 3 June 2022

Deployment windows

Except for emergencies, Phabricator deployments should be conducted during mw:Phabricator/Maintenance windows.

Initial setup

You'll need:

Tagging a release

On your development system

  • scripts for tagging and pushing
  • ./scripts/tag-release.sh
    • tags all submodules
    • outputs markup for milestone (but this sometimes fails)
    • make sure everything got pushed

On phab1001

  • /srv/phab
  • make sure it can pull
  • fetch all submodules on prod
  • ends at detached HEAD state
  • make sure tags are there
  • update.sh in mukunda's homedir on phab1001
    • puppet disable
    • stops `phd`
    • checks out the version
    • stops apache and php
    • /usr/local/sbin/phab_deploy_finalize does db migrations and stuff
  • `!log starting phabricator deploy, momentary downtime expected while apache restarts`
  • `sudo ~/update.sh` and hope for best
  • `systemctl status phd` to make sure that's running
  • `tail /var/log/phd.log` to check for problems
    • always a lot of errors in here because of repo syncing, etc.
  • check `/var/log/apache2/phabricator.log` ???

Make milestone

  • Go into phab project and rename "next" milestone to the date of the deploy
    • i.e. 2020-02-13
    • paste generated markup with stuff from release
    • create a new "next" milestone
      • "This is for tasks ... next phabricator update"
    • mukunda's script used to do this automatically, may need some updating
    • archive the old one