@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 128 lines 4.2 kB view raw
1@title Upgrading Phorge 2@group intro 3 4This document contains instructions for keeping Phorge up to date. 5 6Overview 7======== 8 9Phorge is under active development, and releases are published regularly. 10Staying up to date will keep your install secure. 11 12We recommend installs upgrade regularly. Upgrades usually go 13smoothly and complete in a few minutes. If you put off upgrades for a long 14time, it may take a lot more work to bring things up to date if you want access 15to a useful new feature or an important security change. 16 17 18Staying On Top of Changes 19========================= 20 21We release a [[https://we.phorge.it/w/changelog | Changelog]], 22which describes changes over time. You can look at the changelogs 23for an idea of what new features are available, upcoming changes, security 24information, and warnings about compatibility issues or migrations. 25 26 27Stable Branch 28============= 29 30You can either run the `master` or `stable` branch of Phorge. The `stable` 31branch is a little more stable than `master`, and may be helpful if you 32administrate a larger install. 33 34We promote `master` to `stable` regularly, then publish the changelog. 35 36To switch to `stable`, check the branch out in each working copy: 37 38 phorge/ $ git checkout stable 39 arcanist/ $ git checkout stable 40 41You can now follow the upgrade process normally. 42 43 44Upgrade Process 45=============== 46 47IMPORTANT: You **MUST** restart Phorge after upgrading. For help, see 48@{article:Restarting Phorge}. 49 50IMPORTANT: You **MUST** upgrade `arcanist` and `phorge` at the same time. 51 52Phorge runs on many different systems, with many different webservers. 53Given this diversity, we don't currently maintain a comprehensive upgrade 54script which can work on any system. However, the general steps are the same 55on every system: 56 57 - Stop the webserver (including `php-fpm`, if you use it). 58 - Stop the daemons with `phorge/bin/phd stop` or `systemctl stop phorge-phd`. 59 - Run `git pull` in `arcanist/` and `phorge/`. 60 - Run `phorge/bin/storage upgrade`. 61 - If using systemd, `systemctl daemon-reload`. 62 - Start the daemons, with `phorge/bin/phd start` 63 or `systemctl start phorge-phd`. 64 - Restart the webserver (and `php-fpm`, if you stopped it earlier). 65 66For some more discussion details, see @{article:Configuration Guide}. 67 68This template script roughly outlines the steps required to upgrade Phorge. 69You'll need to adjust paths and commands a bit for your particular system: 70 71```lang=sh 72#!/bin/sh 73 74set -e 75set -x 76 77# This is an example script for updating Phorge, similar to the one used to 78# update <https://we.phorge.it/>. It might not work perfectly on your 79# system, but hopefully it should be easy to adapt. This script is not intended 80# to work without modifications. 81 82# NOTE: This script assumes you are running it from a directory which contains 83# arcanist/, and phorge/. 84 85ROOT=`pwd` # You can hard-code the path here instead. 86 87### STOP WEB SERVER AND DAEMONS ############################################### 88 89# Stop daemons. 90$ROOT/phorge/bin/phd stop 91# If using systemd to manage the daemons: 92# systemctl stop phorge-phd 93 94# If running the notification server, stop it. 95# $ROOT/phorge/bin/aphlict stop 96 97# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ 98# depending on which system and webserver you are running: replace it with an 99# appropriate command for your system. 100# NOTE: If you're running php-fpm, you should stop it here too. 101 102sudo /etc/init.d/httpd stop 103 104### UPDATE WORKING COPIES ###################################################### 105 106cd $ROOT/arcanist 107git pull 108 109cd $ROOT/phorge 110git pull 111 112# Upgrade the database schema. You may want to add the "--force" flag to allow 113# this script to run noninteractively. 114$ROOT/phorge/bin/storage upgrade 115 116# Restart the webserver. As above, this depends on your system and webserver. 117# NOTE: If you're running php-fpm, restart it here too. 118sudo /etc/init.d/httpd start 119 120# Restart daemons. 121# If using systemd, you may need to pick up changes to the phorge-phd unit: 122# systemctl daemon-reload 123# systemctl start phorge-phd 124$ROOT/phorge/bin/phd start 125 126# If running the notification server, start it. 127# $ROOT/phorge/bin/aphlict start 128```