ghe upgrade - aetas-github-training/Support GitHub Wiki
Upgrading GitHub Enterprise
:information_source: These instructions assume that you've already configured a High Availability replica instance and the GitHub Enteprise backup utilities
- Connect to the GitHub Enterprise administrative shell of the primary instance over SSH as the "admin" user on port 122
- Use the
ghe-announce
command to set a scheduled maintenance banner that will be displayed to users on the GitHub Enterprise web interface, e.g.:
ghe-announce -s "GitHub Enterprise will be down for a scheduled upgrade on 2015-11-14 23:00 Eastern Time. We expect the upgrade to take no longer than 30 minutes."
- Visit the GitHub Enterprise Download Page, select the version you want to ugprade to, and copy the URL for the appropriate upgrade package (.pkg file) to the clipboard.
- Download the upgrade package to the primary instance using
curl
, e.g.:
curl -L -O https://github-enterprise.s3.amazonaws.com/ova/updates/github-enterprise-esx-2.4.0.pkg
- Enable maintenance mode on the primary instance from the management console.
- Wait for all active processes to complete on the GitHub Enterprise instance.
- Take a
backup-utils
snapshot of the primary instance. Note the timestamp of the backup directory. - Take a VM snapshot of the primary instance. This VM-layer backup at this point provides an extra level of fallback should it be necessary. By taking a snapshot at this point, the restored VM would still be in maintenance mode after restoration.
- Connect to the replica instance over SSH as the "admin" user on port 122:
- On the replica instance, run
ghe-repl-stop
to stop replication. - On the primary instance, run the
ghe-upgrade
command providing the package file name downloaded in the previous step, e.g.:
ghe-upgrade github-enterprise-esx-2.4.0.pkg
Follow the on-screen instructions to complete the upgrade. 12. Once the primary instance has rebooted, browse to https://[hostname]/setup/settings and click Save settings. 13. Remove the downtime announcement banner by SSHing into the primary instance and running:
ghe-announce -u
- Disable maintenance mode on the primary instance.
- Download the upgrade package to the replica instance using
curl
- On the replica instance, run the
ghe-upgrade
command providing the package file name downloaded in the previous step. - After the replica instance reboots, connect to it over SSH on port 122 as the "admin" user.
- Verify the upgrade by running:
cat /etc/github/enterprise-release
- On the replica instance, replication will automatically start. To ensure all replication services are running appropriately, run
ghe-repl-status
. This command will returnOK
for all services when a successful replication is in progress.
If the command returns Replication is not running
, the replication may still be starting. Wait about one minute before running ghe-repl-status
again.
If replication started correctly, the replica is successfully upgraded and you're finished. Otherwise, continue with the next steps to manually start the replication.